diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-16 19:16:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-16 19:19:25 +0200 |
| commit | 7fb690f39a0394eb6691d7014d509c966836c8a1 (patch) | |
| tree | 62a5e1804b621a505dbaaa0682729fba634901e3 /sys/linux | |
| parent | c4a23770345cc78f32632970d4e9bff26519890b (diff) | |
sys/linux: improve binder descriptions
Always pass 3 objects in a transaction.
This allows to specify correct offsets for objects.
Let's see if this improves coverage.
Diffstat (limited to 'sys/linux')
| -rw-r--r-- | sys/linux/dev_binder.txt | 24 | ||||
| -rw-r--r-- | sys/linux/gen/386.go | 20 | ||||
| -rw-r--r-- | sys/linux/gen/amd64.go | 20 | ||||
| -rw-r--r-- | sys/linux/gen/arm.go | 20 | ||||
| -rw-r--r-- | sys/linux/gen/arm64.go | 20 | ||||
| -rw-r--r-- | sys/linux/gen/ppc64le.go | 20 |
6 files changed, 91 insertions, 33 deletions
diff --git a/sys/linux/dev_binder.txt b/sys/linux/dev_binder.txt index f163e6e40..e2748dcd8 100644 --- a/sys/linux/dev_binder.txt +++ b/sys/linux/dev_binder.txt @@ -105,8 +105,20 @@ binder_transaction_data { sender_euid const[0, int32] data_size bytesize[buffer, int64] offsets_size bytesize[offsets, int64] - buffer ptr64[in, array[binder_object, 0:3]] - offsets ptr64[in, array[flags[binder_buffer_offsets, int64]]] + buffer ptr64[in, binder_objects] + offsets ptr64[in, binder_offsets] +} + +binder_objects { + obj0 binder_object + obj1 binder_object + obj2 binder_object +} [packed, align_8] + +binder_offsets { + off0 offsetof[binder_transaction_data:buffer:obj0, int64] + off1 offsetof[binder_transaction_data:buffer:obj1, int64] + off2 offsetof[binder_transaction_data:buffer:obj2, int64] } binder_transaction_data_sg { @@ -115,10 +127,6 @@ binder_transaction_data_sg { buffers_size int64 } [packed] -# These are sizes of flat_binder_object, binder_fd_object, binder_fd_array_object and -# binder_buffer_object, and also sums of all pairs of these sizes. -# This allows guessing offsets for up to 3 objects. -binder_buffer_offsets = 0, 24, 32, 40, 48, 56, 64, 72 binder_transaction_flags = TF_ONE_WAY, TF_ACCEPT_FDS binder_object [ @@ -155,7 +163,7 @@ binder_fd_object { binder_fd_array_object { type const[BINDER_TYPE_FDA, int32] num_fds int64[0:10] - parnt int64[0:4] + parnt int64[0:2] parent_offset int64[0:64] } @@ -164,7 +172,7 @@ binder_buffer_object { flags bool32 buffer ptr64[in, array[int8]] length bytesize[buffer, int64] - parnt int64[0:4] + parnt int64[0:2] parent_offset int64[0:64] } diff --git a/sys/linux/gen/386.go b/sys/linux/gen/386.go index 39a4ec9c4..5a2a16d58 100644 --- a/sys/linux/gen/386.go +++ b/sys/linux/gen/386.go @@ -726,7 +726,7 @@ var structDescs_386 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flags", TypeSize: 4}}, Kind: 2, RangeEnd: 1}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "length", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_cmd_acquire"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_cmd_acquire", TypeSize: 8}, Fields: []Type{ @@ -802,7 +802,7 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1717854597}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "num_fds", TypeSize: 8}}, Kind: 2, RangeEnd: 10}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_fd_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_fd_object", TypeSize: 24}, Fields: []Type{ @@ -832,6 +832,16 @@ var structDescs_386 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"}, &StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"}, }}}, + {Key: StructKey{Name: "binder_objects"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_objects", IsVarlen: true}, Fields: []Type{ + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj0"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj1"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj2"}, + }, AlignAttr: 8}}, + {Key: StructKey{Name: "binder_offsets"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_offsets", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off0", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj0"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off1", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj1"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off2", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj2"}}, + }}}, {Key: StructKey{Name: "binder_transaction_data"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "handle", TypeSize: 4}}, Kind: 2, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 4}}}, @@ -842,8 +852,8 @@ var structDescs_386 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sender_euid", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "data_size", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "offsets_size", TypeSize: 8}}, BitSize: 8, Path: []string{"offsets"}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "binder_object"}}, Kind: 1, RangeEnd: 3}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_buffer_offsets", TypeSize: 8}}, Vals: []uint64{0, 24, 32, 40, 48, 56, 64, 72}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_objects"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_offsets"}}}, }}}, {Key: StructKey{Name: "binder_transaction_data_sg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data_sg", TypeSize: 72}, Fields: []Type{ &StructType{Key: StructKey{Name: "binder_transaction_data"}, FldName: "trx"}, @@ -51089,4 +51099,4 @@ var consts_386 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_386 = "224eac7d540d4949d0e846ae0490dadc4fc4f8fa" +const revision_386 = "9e0791cb47ca383c00ce30af7d22d82a9e577ecb" diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go index dcc3b30db..873968d66 100644 --- a/sys/linux/gen/amd64.go +++ b/sys/linux/gen/amd64.go @@ -727,7 +727,7 @@ var structDescs_amd64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flags", TypeSize: 4}}, Kind: 2, RangeEnd: 1}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "length", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_cmd_acquire"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_cmd_acquire", TypeSize: 8}, Fields: []Type{ @@ -803,7 +803,7 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1717854597}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "num_fds", TypeSize: 8}}, Kind: 2, RangeEnd: 10}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_fd_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_fd_object", TypeSize: 24}, Fields: []Type{ @@ -833,6 +833,16 @@ var structDescs_amd64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"}, &StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"}, }}}, + {Key: StructKey{Name: "binder_objects"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_objects", IsVarlen: true}, Fields: []Type{ + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj0"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj1"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj2"}, + }, AlignAttr: 8}}, + {Key: StructKey{Name: "binder_offsets"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_offsets", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off0", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj0"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off1", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj1"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off2", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj2"}}, + }}}, {Key: StructKey{Name: "binder_transaction_data"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "handle", TypeSize: 4}}, Kind: 2, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 4}}}, @@ -843,8 +853,8 @@ var structDescs_amd64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sender_euid", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "data_size", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "offsets_size", TypeSize: 8}}, BitSize: 8, Path: []string{"offsets"}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "binder_object"}}, Kind: 1, RangeEnd: 3}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_buffer_offsets", TypeSize: 8}}, Vals: []uint64{0, 24, 32, 40, 48, 56, 64, 72}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_objects"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_offsets"}}}, }}}, {Key: StructKey{Name: "binder_transaction_data_sg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data_sg", TypeSize: 72}, Fields: []Type{ &StructType{Key: StructKey{Name: "binder_transaction_data"}, FldName: "trx"}, @@ -51611,4 +51621,4 @@ var consts_amd64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_amd64 = "796c95beb9acee8fff397d4115ee6e4d2e87c26f" +const revision_amd64 = "cd2eb4279d86159e17ba9b36839db09b8b26b274" diff --git a/sys/linux/gen/arm.go b/sys/linux/gen/arm.go index b5f083900..90e4aba38 100644 --- a/sys/linux/gen/arm.go +++ b/sys/linux/gen/arm.go @@ -724,7 +724,7 @@ var structDescs_arm = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flags", TypeSize: 4}}, Kind: 2, RangeEnd: 1}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "length", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_cmd_acquire"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_cmd_acquire", TypeSize: 8}, Fields: []Type{ @@ -800,7 +800,7 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1717854597}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "num_fds", TypeSize: 8}}, Kind: 2, RangeEnd: 10}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_fd_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_fd_object", TypeSize: 24}, Fields: []Type{ @@ -830,6 +830,16 @@ var structDescs_arm = []*KeyedStruct{ &StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"}, &StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"}, }}}, + {Key: StructKey{Name: "binder_objects"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_objects", IsVarlen: true}, Fields: []Type{ + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj0"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj1"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj2"}, + }, AlignAttr: 8}}, + {Key: StructKey{Name: "binder_offsets"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_offsets", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off0", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj0"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off1", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj1"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off2", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj2"}}, + }}}, {Key: StructKey{Name: "binder_transaction_data"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "handle", TypeSize: 4}}, Kind: 2, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 4}}}, @@ -840,8 +850,8 @@ var structDescs_arm = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sender_euid", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "data_size", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "offsets_size", TypeSize: 8}}, BitSize: 8, Path: []string{"offsets"}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "binder_object"}}, Kind: 1, RangeEnd: 3}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_buffer_offsets", TypeSize: 8}}, Vals: []uint64{0, 24, 32, 40, 48, 56, 64, 72}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_objects"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_offsets"}}}, }}}, {Key: StructKey{Name: "binder_transaction_data_sg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data_sg", TypeSize: 72}, Fields: []Type{ &StructType{Key: StructKey{Name: "binder_transaction_data"}, FldName: "trx"}, @@ -50576,4 +50586,4 @@ var consts_arm = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm = "17900de599cb20dcbc2ea5714909d3329c138a01" +const revision_arm = "7d053eac58a9358cfe0b7b3c851aa83c846a6af0" diff --git a/sys/linux/gen/arm64.go b/sys/linux/gen/arm64.go index 9e7b962b0..ba3add397 100644 --- a/sys/linux/gen/arm64.go +++ b/sys/linux/gen/arm64.go @@ -725,7 +725,7 @@ var structDescs_arm64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flags", TypeSize: 4}}, Kind: 2, RangeEnd: 1}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "length", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_cmd_acquire"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_cmd_acquire", TypeSize: 8}, Fields: []Type{ @@ -801,7 +801,7 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1717854597}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "num_fds", TypeSize: 8}}, Kind: 2, RangeEnd: 10}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_fd_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_fd_object", TypeSize: 24}, Fields: []Type{ @@ -831,6 +831,16 @@ var structDescs_arm64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"}, &StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"}, }}}, + {Key: StructKey{Name: "binder_objects"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_objects", IsVarlen: true}, Fields: []Type{ + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj0"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj1"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj2"}, + }, AlignAttr: 8}}, + {Key: StructKey{Name: "binder_offsets"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_offsets", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off0", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj0"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off1", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj1"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off2", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj2"}}, + }}}, {Key: StructKey{Name: "binder_transaction_data"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "handle", TypeSize: 4}}, Kind: 2, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 4}}}, @@ -841,8 +851,8 @@ var structDescs_arm64 = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sender_euid", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "data_size", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "offsets_size", TypeSize: 8}}, BitSize: 8, Path: []string{"offsets"}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "binder_object"}}, Kind: 1, RangeEnd: 3}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_buffer_offsets", TypeSize: 8}}, Vals: []uint64{0, 24, 32, 40, 48, 56, 64, 72}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_objects"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_offsets"}}}, }}}, {Key: StructKey{Name: "binder_transaction_data_sg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data_sg", TypeSize: 72}, Fields: []Type{ &StructType{Key: StructKey{Name: "binder_transaction_data"}, FldName: "trx"}, @@ -50871,4 +50881,4 @@ var consts_arm64 = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_arm64 = "323f6689f696d59c14729de482ab8d8f8fcf1f5a" +const revision_arm64 = "9dcef55b76a549a6030e2bee954532c4026cf9d6" diff --git a/sys/linux/gen/ppc64le.go b/sys/linux/gen/ppc64le.go index 651ea5452..f074478dd 100644 --- a/sys/linux/gen/ppc64le.go +++ b/sys/linux/gen/ppc64le.go @@ -724,7 +724,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flags", TypeSize: 4}}, Kind: 2, RangeEnd: 1}, &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "length", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_cmd_acquire"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_cmd_acquire", TypeSize: 8}, Fields: []Type{ @@ -800,7 +800,7 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1717854597}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "num_fds", TypeSize: 8}}, Kind: 2, RangeEnd: 10}, - &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 4}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parnt", TypeSize: 8}}, Kind: 2, RangeEnd: 2}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64}, }}}, {Key: StructKey{Name: "binder_fd_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_fd_object", TypeSize: 24}, Fields: []Type{ @@ -830,6 +830,16 @@ var structDescs_ppc64le = []*KeyedStruct{ &StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"}, &StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"}, }}}, + {Key: StructKey{Name: "binder_objects"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_objects", IsVarlen: true}, Fields: []Type{ + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj0"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj1"}, + &UnionType{Key: StructKey{Name: "binder_object"}, FldName: "obj2"}, + }, AlignAttr: 8}}, + {Key: StructKey{Name: "binder_offsets"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_offsets", TypeSize: 24}, Fields: []Type{ + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off0", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj0"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off1", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj1"}}, + &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "offsetof", FldName: "off2", TypeSize: 8}}, BitSize: 8, Offset: true, Path: []string{"binder_transaction_data", "buffer", "obj2"}}, + }}}, {Key: StructKey{Name: "binder_transaction_data"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data", TypeSize: 64}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "handle", TypeSize: 4}}, Kind: 2, RangeEnd: 4}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 4}}}, @@ -840,8 +850,8 @@ var structDescs_ppc64le = []*KeyedStruct{ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "sender_euid", TypeSize: 4}}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "data_size", TypeSize: 8}}, BitSize: 8, Path: []string{"buffer"}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "offsets_size", TypeSize: 8}}, BitSize: 8, Path: []string{"offsets"}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "binder_object"}}, Kind: 1, RangeEnd: 3}}, - &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_buffer_offsets", TypeSize: 8}}, Vals: []uint64{0, 24, 32, 40, 48, 56, 64, 72}}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "buffer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_objects"}}}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr64", FldName: "offsets", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_offsets"}}}, }}}, {Key: StructKey{Name: "binder_transaction_data_sg"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_transaction_data_sg", TypeSize: 72}, Fields: []Type{ &StructType{Key: StructKey{Name: "binder_transaction_data"}, FldName: "trx"}, @@ -50838,4 +50848,4 @@ var consts_ppc64le = []ConstValue{ {Name: "bpf_insn_load_imm_dw", Value: 24}, } -const revision_ppc64le = "7e3189303ae7568ed68f54f518e34367eb7c23fa" +const revision_ppc64le = "73abae86d3eb155f7ca4a5d586216fa41b11e505" |
