aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2021-03-02 15:59:19 -0800
committerDmitry Vyukov <dvyukov@google.com>2021-03-03 14:51:11 +0100
commit06ed56cd22e24a55c40d152880b66b108834c8f2 (patch)
tree2b04318ad627521216584f07420116d32087a845 /sys/linux
parente5b64d68915ed04952cef2f5dcb3f3ccbb7cfa57 (diff)
sys/linux: describe FS_IOC_READ_VERITY_METADATA
Add a description for the FS_IOC_READ_VERITY_METADATA ioctl, which is new in Linux v5.12-rc1. See https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#fs-ioc-read-verity-metadata
Diffstat (limited to 'sys/linux')
-rw-r--r--sys/linux/fs_ioctl_fsverity.txt13
-rw-r--r--sys/linux/fs_ioctl_fsverity.txt.const4
2 files changed, 17 insertions, 0 deletions
diff --git a/sys/linux/fs_ioctl_fsverity.txt b/sys/linux/fs_ioctl_fsverity.txt
index 8505f09ed..c42ec6f1e 100644
--- a/sys/linux/fs_ioctl_fsverity.txt
+++ b/sys/linux/fs_ioctl_fsverity.txt
@@ -1,11 +1,14 @@
# Copyright 2019 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+# Reference: https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#user-api
+
include <uapi/linux/fs.h>
include <uapi/linux/fsverity.h>
ioctl$FS_IOC_ENABLE_VERITY(fd fd, cmd const[FS_IOC_ENABLE_VERITY], arg ptr[in, fsverity_enable_arg])
ioctl$FS_IOC_MEASURE_VERITY(fd fd, cmd const[FS_IOC_MEASURE_VERITY], arg ptr[inout, fsverity_digest])
+ioctl$FS_IOC_READ_VERITY_METADATA(fd fd, cmd const[FS_IOC_READ_VERITY_METADATA], arg ptr[in, fsverity_read_metadata_arg])
fsverity_hash_alg = FS_VERITY_HASH_ALG_SHA256, FS_VERITY_HASH_ALG_SHA512
@@ -26,3 +29,13 @@ fsverity_digest {
digest_size len[digest, int16]
digest array[int8]
}
+
+fsverity_metadata_type = FS_VERITY_METADATA_TYPE_MERKLE_TREE, FS_VERITY_METADATA_TYPE_DESCRIPTOR, FS_VERITY_METADATA_TYPE_SIGNATURE
+
+fsverity_read_metadata_arg {
+ metadata_type flags[fsverity_metadata_type, int64]
+ offset int64
+ length len[buf_ptr, int64]
+ buf_ptr ptr64[out, array[int8]]
+ reserved const[0, int64]
+}
diff --git a/sys/linux/fs_ioctl_fsverity.txt.const b/sys/linux/fs_ioctl_fsverity.txt.const
index e21521073..224dcc2cf 100644
--- a/sys/linux/fs_ioctl_fsverity.txt.const
+++ b/sys/linux/fs_ioctl_fsverity.txt.const
@@ -2,6 +2,10 @@
arches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x
FS_IOC_ENABLE_VERITY = 1082156677, mips64le:ppc64le:2155898501
FS_IOC_MEASURE_VERITY = 3221513862
+FS_IOC_READ_VERITY_METADATA = 3223873159
FS_VERITY_HASH_ALG_SHA256 = 1
FS_VERITY_HASH_ALG_SHA512 = 2
+FS_VERITY_METADATA_TYPE_DESCRIPTOR = 2
+FS_VERITY_METADATA_TYPE_MERKLE_TREE = 1
+FS_VERITY_METADATA_TYPE_SIGNATURE = 3
__NR_ioctl = 54, amd64:16, arm64:riscv64:29, mips64le:5015