diff options
author | Eric Biggers <ebiggers@google.com> | 2021-01-15 21:18:17 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2021-02-08 01:51:14 +0300 |
commit | 622699cfe6ec5578f52727002d5717ff3f092e23 (patch) | |
tree | 70afcd4d36b8ca0d535043f3e64ec23000bc6bff /include/uapi/linux/fsverity.h | |
parent | e17fe6579de023725ec22a16965e9099e4a05ac9 (diff) | |
download | linux-622699cfe6ec5578f52727002d5717ff3f092e23.tar.xz |
fs-verity: support reading Merkle tree with ioctl
Add support for FS_VERITY_METADATA_TYPE_MERKLE_TREE to
FS_IOC_READ_VERITY_METADATA. This allows a userspace server program to
retrieve the Merkle tree of a verity file for serving to a client which
implements fs-verity compatible verification. See the patch which
introduced FS_IOC_READ_VERITY_METADATA for more details.
This has been tested using a new xfstest which calls this ioctl via a
new subcommand for the 'fsverity' program from fsverity-utils.
Link: https://lore.kernel.org/r/20210115181819.34732-5-ebiggers@kernel.org
Reviewed-by: Victor Hsieh <victorhsieh@google.com>
Reviewed-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'include/uapi/linux/fsverity.h')
-rw-r--r-- | include/uapi/linux/fsverity.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/fsverity.h b/include/uapi/linux/fsverity.h index e062751294d0..94003b153cb3 100644 --- a/include/uapi/linux/fsverity.h +++ b/include/uapi/linux/fsverity.h @@ -83,6 +83,8 @@ struct fsverity_formatted_digest { __u8 digest[]; }; +#define FS_VERITY_METADATA_TYPE_MERKLE_TREE 1 + struct fsverity_read_metadata_arg { __u64 metadata_type; __u64 offset; |