common/verity: add common functions for testing fs-verity
authorEric Biggers <ebiggers@google.com>
Mon, 30 Sep 2019 21:15:47 +0000 (14:15 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Oct 2019 13:01:30 +0000 (21:01 +0800)
commit0467d90019ddfcd681810fb3fe9145ff62dcd726
treeae8effb57d6b33851573a907394e6ef6a113be2a
parent12629d54e2facf919bc1702399de6cc87b5a46b6
common/verity: add common functions for testing fs-verity

Add common functions for setting up and testing fs-verity.  fs-verity is
an ext4 and f2fs filesystem feature which provides Merkle tree based
hashing (similar to dm-verity) for individual read-only files, mainly
for the purpose of efficient authenticity verification.  Other
filesystems may add fs-verity support later, using the same API.

Running the fs-verity tests will require:

- Kernel v5.4-rc1 or later configured with CONFIG_FS_VERITY=y

- The 'fsverity' utility program from
  https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git

- e2fsprogs v1.45.2 or later for ext4 tests, or f2fs-tools v1.11.0 or
  later for f2fs tests

Some individual tests will have additional requirements.

For more information about fs-verity, see
https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/config
common/verity [new file with mode: 0644]