Skip to content

Commit 9dae0f8

Browse files
committed
unix: add fs-verity consts and types
See https://www.kernel.org/doc/html/latest/filesystems/fsverity.html for details. Change-Id: I5b02d0ef84f21d05ea3f1ac8e905232733ea3739 Reviewed-on: https://go-review.googlesource.com/c/sys/+/225698 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 85ca7c5 commit 9dae0f8

17 files changed

+57
-1
lines changed

unix/linux/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ struct termios2 {
8888
#include <linux/fanotify.h>
8989
#include <linux/filter.h>
9090
#include <linux/fs.h>
91+
#include <linux/fsverity.h>
9192
#include <linux/genetlink.h>
9293
#include <linux/hdreg.h>
9394
#include <linux/icmpv6.h>
@@ -2283,3 +2284,9 @@ const (
22832284
DEVLINK_DPIPE_HEADER_IPV4 = C.DEVLINK_DPIPE_HEADER_IPV4
22842285
DEVLINK_DPIPE_HEADER_IPV6 = C.DEVLINK_DPIPE_HEADER_IPV6
22852286
)
2287+
2288+
// fs-verity
2289+
2290+
type FsverityDigest C.struct_fsverity_digest
2291+
2292+
type FsverityEnableArg C.struct_fsverity_enable_arg

unix/mkerrors.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ struct ltchars {
200200
#include <linux/filter.h>
201201
#include <linux/fs.h>
202202
#include <linux/fscrypt.h>
203+
#include <linux/fsverity.h>
203204
#include <linux/genetlink.h>
204205
#include <linux/hdreg.h>
205206
#include <linux/icmpv6.h>
@@ -506,7 +507,8 @@ ccflags="$@"
506507
$2 ~ /^CAP_/ ||
507508
$2 ~ /^ALG_/ ||
508509
$2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ ||
509-
$2 ~ /^FS_IOC_.*ENCRYPTION/ ||
510+
$2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|GETFLAGS)/ ||
511+
$2 ~ /^FS_VERITY_/ ||
510512
$2 ~ /^FSCRYPT_/ ||
511513
$2 ~ /^GRND_/ ||
512514
$2 ~ /^RND/ ||

unix/zerrors_linux.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_386.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_amd64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_arm.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_arm64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_mips.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_mips64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_mips64le.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_mipsle.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_ppc64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_ppc64le.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_riscv64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_s390x.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/zerrors_linux_sparc64.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)