diff options
| author | Victor Hsieh <victorhsieh@gmail.com> | 2018-12-18 01:34:52 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-18 10:34:52 +0100 |
| commit | f4815544c1bd24e9151ffa64edda7bc68f0e156d (patch) | |
| tree | d4860866219ffec3bc0276dc5a6a9f4642b62648 /sys/linux/gen/amd64.go | |
| parent | bd8b4220d51d391adeba08cfcd2c886b9f0b0599 (diff) | |
sys/linux: add fs-verity ioctls
This adds 2 ioctls and an argument type:
- FS_IOC_ENABLE_VERITY
- FS_IOC_MEASURE_VERITY
- struct fsverity_digest
Note fs-verity on-disk structs are not yet added.
Diffstat (limited to 'sys/linux/gen/amd64.go')
| -rw-r--r-- | sys/linux/gen/amd64.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index 966b7e2f7..42caffcec 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -4872,6 +4872,11 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "len", TypeSize: 8}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "minlen", TypeSize: 8}}}, }}}, + {Key: StructKey{Name: "fsverity_digest", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fsverity_digest", ArgDir: 2, IsVarlen: true}, Fields: []Type{ + &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fsverity_digest_algorithm_flags", FldName: "digest_algorithm", TypeSize: 2, ArgDir: 2}}, Vals: []uint64{1, 2, 3}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "digest_size", TypeSize: 2, ArgDir: 2}}, Buf: "digest"}, + &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "digest", ArgDir: 2, IsVarlen: true}}, + }}}, {Key: StructKey{Name: "fsxattr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fsxattr", TypeSize: 32}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "fsx_xflags", TypeSize: 4}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "fsx_extsize", TypeSize: 4}}}, @@ -28671,6 +28676,10 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2150105623}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "floppy_write_errors", Dir: 1}}}, }}, + {NR: 16, Name: "ioctl$FS_IOC_ENABLE_VERITY", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 26245}, + }}, {NR: 16, Name: "ioctl$FS_IOC_FIEMAP", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3223348747}, @@ -28716,6 +28725,11 @@ var syscalls_amd64 = []*Syscall{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074816532}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fscrypt_policy", Dir: 1}}}, }}, + {NR: 16, Name: "ioctl$FS_IOC_MEASURE_VERITY", CallName: "ioctl", Args: []Type{ + &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3221513862}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fsverity_digest", Dir: 2}}}, + }}, {NR: 16, Name: "ioctl$FS_IOC_RESVSP", CallName: "ioctl", Args: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1076910120}, @@ -39405,6 +39419,7 @@ var consts_amd64 = []ConstValue{ {Name: "FS_ENCRYPTION_MODE_AES_256_XTS", Value: 1}, {Name: "FS_ENCRYPTION_MODE_SPECK128_256_CTS", Value: 8}, {Name: "FS_ENCRYPTION_MODE_SPECK128_256_XTS", Value: 7}, + {Name: "FS_IOC_ENABLE_VERITY", Value: 26245}, {Name: "FS_IOC_FIEMAP", Value: 3223348747}, {Name: "FS_IOC_FSGETXATTR", Value: 2149341215}, {Name: "FS_IOC_FSSETXATTR", Value: 1075599392}, @@ -39414,6 +39429,7 @@ var consts_amd64 = []ConstValue{ {Name: "FS_IOC_GETVERSION", Value: 2148038145}, {Name: "FS_IOC_GET_ENCRYPTION_POLICY", Value: 1074554389}, {Name: "FS_IOC_GET_ENCRYPTION_PWSALT", Value: 1074816532}, + {Name: "FS_IOC_MEASURE_VERITY", Value: 3221513862}, {Name: "FS_IOC_RESVSP", Value: 1076910120}, {Name: "FS_IOC_SETFLAGS", Value: 1074292226}, {Name: "FS_IOC_SETFSLABEL", Value: 1090556978}, @@ -39423,6 +39439,9 @@ var consts_amd64 = []ConstValue{ {Name: "FS_POLICY_FLAGS_PAD_16", Value: 2}, {Name: "FS_POLICY_FLAGS_PAD_4"}, {Name: "FS_POLICY_FLAGS_PAD_8", Value: 1}, + {Name: "FS_VERITY_ALG_CRC32C", Value: 3}, + {Name: "FS_VERITY_ALG_SHA256", Value: 1}, + {Name: "FS_VERITY_ALG_SHA512", Value: 2}, {Name: "FTD_MSG", Value: 16}, {Name: "FUSE_ABORT_ERROR", Value: 2097152}, {Name: "FUSE_ASYNC_DIO", Value: 32768}, @@ -45054,4 +45073,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "d3c0cb876de4a8b5fb805efe83f674970a1348e7" +const revision_amd64 = "b7e39f3128ea124913623c5b44f8f4cf11321d3b" |
