From 58fca249ef46c67eeb8e5f495bd3c289d19974f8 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 26 Sep 2018 15:37:33 +0200 Subject: sys/linux: add encrypted key instantiation payloads --- sys/linux/filesystem.txt | 2 +- sys/linux/gen/386.go | 57 ++++++++++++++++++++++++++++++++++++++---------- sys/linux/gen/amd64.go | 57 ++++++++++++++++++++++++++++++++++++++---------- sys/linux/gen/arm.go | 57 ++++++++++++++++++++++++++++++++++++++---------- sys/linux/gen/arm64.go | 57 ++++++++++++++++++++++++++++++++++++++---------- sys/linux/gen/ppc64le.go | 57 ++++++++++++++++++++++++++++++++++++++---------- sys/linux/key.txt | 54 ++++++++++++++++++++++++++++++++++++++++----- 7 files changed, 274 insertions(+), 67 deletions(-) (limited to 'sys') diff --git a/sys/linux/filesystem.txt b/sys/linux/filesystem.txt index 90e78954c..83d13661a 100644 --- a/sys/linux/filesystem.txt +++ b/sys/linux/filesystem.txt @@ -178,7 +178,7 @@ uuid_str { p4 array[flags[hex_chars, int8], 8] } -hex_chars = '0', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' +hex_chars = '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' ima_funcs = "FILE_CHECK", "PATH_CHECK", "MODULE_CHECK", "FIRMWARE_CHECK", "FILE_MMAP", "MMAP_CHECK", "BPRM_CHECK", "CREDS_CHECK", "KEXEC_KERNEL_CHECK", "KEXEC_INITRAMFS_CHECK", "POLICY_CHECK" ima_masks = "MAY_EXEC", "MAY_WRITE", "MAY_READ", "MAY_APPEND", "^MAY_EXEC", "^MAY_WRITE", "^MAY_READ", "^MAY_APPEND" diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 81c95e980..8084c6c79 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -7744,11 +7744,44 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "memsz", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "key_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_desc", TypeSize: 5}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name0", TypeSize: 1}}, Val: 115}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name1", TypeSize: 1}}, Val: 121}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name2", TypeSize: 1}}, Val: 122}, - &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "name3", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name4", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "prefix", TypeSize: 3}, Kind: 2, Values: []string{"syz"}, NoZ: true}, + &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_load"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_load", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 5}, Kind: 2, Values: []string{"load "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp2", TypeSize: 1}}, Val: 32}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "iv_data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_new"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_new", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 4}, Kind: 2, Values: []string{"new "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_update"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_update", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 7}, Kind: 2, Values: []string{"update "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_instantiate_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_instantiate_payload", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "key_encrypted_new"}, FldName: "encrypted_new"}, + &StructType{Key: StructKey{Name: "key_encrypted_load"}, FldName: "encrypted_load"}, + &StructType{Key: StructKey{Name: "key_encrypted_update"}, FldName: "encrypted_update"}, }}}, {Key: StructKey{Name: "keyctl_dh_params"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "keyctl_dh_params", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "user_key", FldName: "private", TypeSize: 4}}, @@ -19424,15 +19457,15 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "modtime", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "uuid_str"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "uuid_str", TypeSize: 32}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d0", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d1", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d2", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d3", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, }}}, {Key: StructKey{Name: "v4l2_audio"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "v4l2_audio", TypeSize: 52}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "index", TypeSize: 4}}}, @@ -29384,7 +29417,7 @@ var syscalls_386 = []*Syscall{ {NR: 288, Name: "keyctl$instantiate", CallName: "keyctl", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 12}, &ResourceType{TypeCommon: TypeCommon{TypeName: "key", FldName: "key", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "payload", TypeSize: 4, IsOptional: true}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "payload", TypeSize: 4, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "key_instantiate_payload"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "paylen", TypeSize: 4}}, Buf: "payload"}, &ResourceType{TypeCommon: TypeCommon{TypeName: "keyring", FldName: "keyring", TypeSize: 4, IsOptional: true}}, }}, @@ -41288,4 +41321,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "10c2e1963a361ef4b695fc01b80376454adc6331" +const revision_386 = "642a145ebbc67e85c1215435c6b534d306e9817c" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index aa63ccae2..5118406fa 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -7858,11 +7858,44 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "memsz", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "key_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_desc", TypeSize: 5}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name0", TypeSize: 1}}, Val: 115}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name1", TypeSize: 1}}, Val: 121}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name2", TypeSize: 1}}, Val: 122}, - &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "name3", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name4", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "prefix", TypeSize: 3}, Kind: 2, Values: []string{"syz"}, NoZ: true}, + &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_load"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_load", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 5}, Kind: 2, Values: []string{"load "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp2", TypeSize: 1}}, Val: 32}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "iv_data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_new"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_new", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 4}, Kind: 2, Values: []string{"new "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_update"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_update", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 7}, Kind: 2, Values: []string{"update "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_instantiate_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_instantiate_payload", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "key_encrypted_new"}, FldName: "encrypted_new"}, + &StructType{Key: StructKey{Name: "key_encrypted_load"}, FldName: "encrypted_load"}, + &StructType{Key: StructKey{Name: "key_encrypted_update"}, FldName: "encrypted_update"}, }}}, {Key: StructKey{Name: "keyctl_dh_params"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "keyctl_dh_params", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "user_key", FldName: "private", TypeSize: 4}}, @@ -19751,15 +19784,15 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "modtime", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "uuid_str"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "uuid_str", TypeSize: 32}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d0", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d1", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d2", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d3", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, }}}, {Key: StructKey{Name: "v4l2_audio"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "v4l2_audio", TypeSize: 52}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "index", TypeSize: 4}}}, @@ -29854,7 +29887,7 @@ var syscalls_amd64 = []*Syscall{ {NR: 250, Name: "keyctl$instantiate", CallName: "keyctl", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 12}, &ResourceType{TypeCommon: TypeCommon{TypeName: "key", FldName: "key", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "key_instantiate_payload"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "paylen", TypeSize: 8}}, Buf: "payload"}, &ResourceType{TypeCommon: TypeCommon{TypeName: "keyring", FldName: "keyring", TypeSize: 4, IsOptional: true}}, }}, @@ -41982,4 +42015,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "1447eaca66233217c692400c6a0e8788838aeb8a" +const revision_amd64 = "4bf7088eb1e77eb4525156890f346c4c426308df" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index fb298bc7e..a0c4f8969 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -7761,11 +7761,44 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "memsz", TypeSize: 4}}}, }}}, {Key: StructKey{Name: "key_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_desc", TypeSize: 5}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name0", TypeSize: 1}}, Val: 115}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name1", TypeSize: 1}}, Val: 121}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name2", TypeSize: 1}}, Val: 122}, - &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "name3", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name4", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "prefix", TypeSize: 3}, Kind: 2, Values: []string{"syz"}, NoZ: true}, + &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_load"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_load", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 5}, Kind: 2, Values: []string{"load "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp2", TypeSize: 1}}, Val: 32}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "iv_data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_new"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_new", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 4}, Kind: 2, Values: []string{"new "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_update"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_update", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 7}, Kind: 2, Values: []string{"update "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_instantiate_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_instantiate_payload", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "key_encrypted_new"}, FldName: "encrypted_new"}, + &StructType{Key: StructKey{Name: "key_encrypted_load"}, FldName: "encrypted_load"}, + &StructType{Key: StructKey{Name: "key_encrypted_update"}, FldName: "encrypted_update"}, }}}, {Key: StructKey{Name: "keyctl_dh_params"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "keyctl_dh_params", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "user_key", FldName: "private", TypeSize: 4}}, @@ -19289,15 +19322,15 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nampac2", TypeSize: 4, ArgDir: 1}}}, }}}, {Key: StructKey{Name: "uuid_str"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "uuid_str", TypeSize: 32}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d0", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d1", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d2", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d3", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, }}}, {Key: StructKey{Name: "v4l2_audio"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "v4l2_audio", TypeSize: 52}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "index", TypeSize: 4}}}, @@ -29148,7 +29181,7 @@ var syscalls_arm = []*Syscall{ {NR: 311, Name: "keyctl$instantiate", CallName: "keyctl", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 4}}, Val: 12}, &ResourceType{TypeCommon: TypeCommon{TypeName: "key", FldName: "key", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "payload", TypeSize: 4, IsOptional: true}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "payload", TypeSize: 4, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "key_instantiate_payload"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "paylen", TypeSize: 4}}, Buf: "payload"}, &ResourceType{TypeCommon: TypeCommon{TypeName: "keyring", FldName: "keyring", TypeSize: 4, IsOptional: true}}, }}, @@ -41154,4 +41187,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "d41b34f2fcca37bad6a4f08a943f8f086e05be6c" +const revision_arm = "87d9b5b947c05cd6232361b1c5ed052568f6d8ed" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 43cc13d91..2b14c8fe6 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -7858,11 +7858,44 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "memsz", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "key_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_desc", TypeSize: 5}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name0", TypeSize: 1}}, Val: 115}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name1", TypeSize: 1}}, Val: 121}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name2", TypeSize: 1}}, Val: 122}, - &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "name3", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name4", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "prefix", TypeSize: 3}, Kind: 2, Values: []string{"syz"}, NoZ: true}, + &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_load"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_load", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 5}, Kind: 2, Values: []string{"load "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp2", TypeSize: 1}}, Val: 32}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "iv_data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_new"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_new", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 4}, Kind: 2, Values: []string{"new "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_update"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_update", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 7}, Kind: 2, Values: []string{"update "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_instantiate_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_instantiate_payload", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "key_encrypted_new"}, FldName: "encrypted_new"}, + &StructType{Key: StructKey{Name: "key_encrypted_load"}, FldName: "encrypted_load"}, + &StructType{Key: StructKey{Name: "key_encrypted_update"}, FldName: "encrypted_update"}, }}}, {Key: StructKey{Name: "keyctl_dh_params"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "keyctl_dh_params", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "user_key", FldName: "private", TypeSize: 4}}, @@ -19543,15 +19576,15 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "data", TypeSize: 1}}}, }}}, {Key: StructKey{Name: "uuid_str"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "uuid_str", TypeSize: 32}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d0", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d1", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d2", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d3", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, }}}, {Key: StructKey{Name: "v4l2_audio"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "v4l2_audio", TypeSize: 52}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "index", TypeSize: 4}}}, @@ -29470,7 +29503,7 @@ var syscalls_arm64 = []*Syscall{ {NR: 219, Name: "keyctl$instantiate", CallName: "keyctl", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 12}, &ResourceType{TypeCommon: TypeCommon{TypeName: "key", FldName: "key", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "key_instantiate_payload"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "paylen", TypeSize: 8}}, Buf: "payload"}, &ResourceType{TypeCommon: TypeCommon{TypeName: "keyring", FldName: "keyring", TypeSize: 4, IsOptional: true}}, }}, @@ -41376,4 +41409,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "2c7bc4391c335ad2b8211cba05c292d1ec5281ad" +const revision_arm64 = "4c268588881cd3c4d4195b7ec7fb71c90732ef6c" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index f3092057f..49d6a9c1b 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -7836,11 +7836,44 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "memsz", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "key_desc"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_desc", TypeSize: 5}, Fields: []Type{ - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name0", TypeSize: 1}}, Val: 115}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name1", TypeSize: 1}}, Val: 121}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name2", TypeSize: 1}}, Val: 122}, - &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "name3", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, - &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "name4", TypeSize: 1}}}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "prefix", TypeSize: 3}, Kind: 2, Values: []string{"syz"}, NoZ: true}, + &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 1}}, ValuesStart: 32, ValuesPerProc: 4}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_load"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_load", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 5}, Kind: 2, Values: []string{"load "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp2", TypeSize: 1}}, Val: 32}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "iv_data", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_new"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_new", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 4}, Kind: 2, Values: []string{"new "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp1", TypeSize: 1}}, Val: 32}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", TypeSize: 20}, ArgFormat: 2}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_encrypted_update"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_encrypted_update", IsVarlen: true}, Fields: []Type{ + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "cmd", TypeSize: 7}, Kind: 2, Values: []string{"update "}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "format", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_format", Values: []string{"ecryptfs", "default"}, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sp0", TypeSize: 1}}, Val: 32}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_type", IsVarlen: true}, Kind: 2, SubKind: "key_encrypted_key_type", Values: []string{"trusted:", "user:"}, NoZ: true}, + &BufferType{TypeCommon: TypeCommon{TypeName: "stringnoz", FldName: "key_desc", IsVarlen: true}, Kind: 2, NoZ: true}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "z", TypeSize: 1}}}, + }}}, + {Key: StructKey{Name: "key_instantiate_payload"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "key_instantiate_payload", IsVarlen: true}, Fields: []Type{ + &StructType{Key: StructKey{Name: "key_encrypted_new"}, FldName: "encrypted_new"}, + &StructType{Key: StructKey{Name: "key_encrypted_load"}, FldName: "encrypted_load"}, + &StructType{Key: StructKey{Name: "key_encrypted_update"}, FldName: "encrypted_update"}, }}}, {Key: StructKey{Name: "keyctl_dh_params"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "keyctl_dh_params", TypeSize: 12}, Fields: []Type{ &ResourceType{TypeCommon: TypeCommon{TypeName: "user_key", FldName: "private", TypeSize: 4}}, @@ -19374,15 +19407,15 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "modtime", TypeSize: 8}}}, }}}, {Key: StructKey{Name: "uuid_str"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "uuid_str", TypeSize: 32}, Fields: []Type{ - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p0", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d0", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p1", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d1", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p2", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d2", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p3", TypeSize: 4}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 4, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "d3", TypeSize: 1}}, Val: 45}, - &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, + &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "p4", TypeSize: 8}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "hex_chars", TypeSize: 1}}, Vals: []uint64{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102}}, Kind: 1, RangeBegin: 8, RangeEnd: 8}, }}}, {Key: StructKey{Name: "veth_policy"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "veth_policy", IsVarlen: true}, Fields: []Type{ &StructType{Key: StructKey{Name: "nlattr_t[const[VETH_INFO_PEER, int16], ifinfomsg[AF_UNSPEC]]"}, FldName: "VETH_INFO_PEER"}, @@ -27945,7 +27978,7 @@ var syscalls_ppc64le = []*Syscall{ {NR: 271, Name: "keyctl$instantiate", CallName: "keyctl", Args: []Type{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "code", TypeSize: 8}}, Val: 12}, &ResourceType{TypeCommon: TypeCommon{TypeName: "key", FldName: "key", TypeSize: 4}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "payload", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "key_instantiate_payload"}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "paylen", TypeSize: 8}}, Buf: "payload"}, &ResourceType{TypeCommon: TypeCommon{TypeName: "keyring", FldName: "keyring", TypeSize: 4, IsOptional: true}}, }}, @@ -38732,4 +38765,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "8afa0853ccd1c8eb144790312a22085146709af5" +const revision_ppc64le = "cdf0eb7c11ca182ba6df6598c596f4da9c7a489c" diff --git a/sys/linux/key.txt b/sys/linux/key.txt index 889460865..102b7fd73 100644 --- a/sys/linux/key.txt +++ b/sys/linux/key.txt @@ -32,7 +32,7 @@ keyctl$read(code const[KEYCTL_READ], key key, payload buffer[out], len len[paylo keyctl$chown(code const[KEYCTL_CHOWN], key key, uid uid, gid gid) # perm is a mask of KEY_POS_VIEW, etc consants, but they cover almost whole int32. keyctl$setperm(code const[KEYCTL_SETPERM], key key, perm flags[key_perm]) -keyctl$instantiate(code const[KEYCTL_INSTANTIATE], key key, payload buffer[in, opt], paylen len[payload], keyring keyring[opt]) +keyctl$instantiate(code const[KEYCTL_INSTANTIATE], key key, payload ptr[in, key_instantiate_payload, opt], paylen len[payload], keyring keyring[opt]) keyctl$negate(code const[KEYCTL_NEGATE], key key, timeout intptr, keyring keyring) keyctl$set_reqkey_keyring(code const[KEYCTL_SET_REQKEY_KEYRING], reqkey flags[reqkey_keyring]) keyctl$set_timeout(code const[KEYCTL_SET_TIMEOUT], key key, timeout int32) @@ -53,11 +53,9 @@ key_type = "asymmetric", "big_key", "blacklist", "ceph", "cifs.idmap", "cifs.spn # "syzP\x00" key_desc { - name0 const[115, int8] - name1 const[121, int8] - name2 const[122, int8] - name3 proc[32, 4, int8] - name4 const[0, int8] + prefix stringnoz["syz"] + id proc[' ', 4, int8] + z const[0, int8] } keyctl_dh_params { @@ -72,3 +70,47 @@ keyctl_kdf_params { otherinfolen len[otherinfo, int32] __spare array[const[0, int32], 8] } + +key_instantiate_payload [ + encrypted_new key_encrypted_new + encrypted_load key_encrypted_load + encrypted_update key_encrypted_update +] [varlen] + +key_encrypted_new { + cmd stringnoz["new "] + format stringnoz[key_encrypted_format] + sp0 const[' ', int8] + key_type stringnoz[key_encrypted_key_type] + key_desc stringnoz + sp1 const[' ', int8] + datalen fmt[dec, int64] + z const[0, int8] +} [packed] + +key_encrypted_load { + cmd stringnoz["load "] + format stringnoz[key_encrypted_format] + sp0 const[' ', int8] + key_type stringnoz[key_encrypted_key_type] + key_desc stringnoz + sp1 const[' ', int8] + datalen fmt[dec, int64] + sp2 const[' ', int8] +# TODO: this is something complex: hex-encoded iv of particular length, followed by delim? +# followed by something-hex-encoded of some particular length, followed by something more? + iv_data array[flags[hex_chars, int8]] + z const[0, int8] +} [packed] + +key_encrypted_update { + cmd stringnoz["update "] + format stringnoz[key_encrypted_format] + sp0 const[' ', int8] + key_type stringnoz[key_encrypted_key_type] + key_desc stringnoz + z const[0, int8] +} [packed] + +key_encrypted_format = "ecryptfs", "default" +key_encrypted_key_type = "trusted:", "user:" -- cgit mrf-deployment