aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/gen/amd64.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-14 19:18:17 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-14 19:28:01 +0200
commit2e6300854a5f61abb99404d2fbbc9b9a419694a3 (patch)
tree9c29da9e41cef7d91acc9669eef6078fcbb87676 /sys/linux/gen/amd64.go
parentc1caccc8334f39ba2bcae1dfe78e65c474af0160 (diff)
sys/linux: improve binder descriptions
Add few new ioctl's. Add some typedefs for clarity.
Diffstat (limited to 'sys/linux/gen/amd64.go')
-rw-r--r--sys/linux/gen/amd64.go59
1 files changed, 53 insertions, 6 deletions
diff --git a/sys/linux/gen/amd64.go b/sys/linux/gen/amd64.go
index 22f06feba..354be1fd1 100644
--- a/sys/linux/gen/amd64.go
+++ b/sys/linux/gen/amd64.go
@@ -724,7 +724,7 @@ var structDescs_amd64 = []*KeyedStruct{
{Key: StructKey{Name: "binder_buffer_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_buffer_object", TypeSize: 40}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1886661253},
&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: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 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: "parent_offset", TypeSize: 8}}, Kind: 2, RangeEnd: 64},
@@ -818,8 +818,16 @@ var structDescs_amd64 = []*KeyedStruct{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "has_strong_ref", TypeSize: 4, ArgDir: 2}}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "has_weak_ref", TypeSize: 4, ArgDir: 2}}},
}}},
+ {Key: StructKey{Name: "binder_node_info_for_ref"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_node_info_for_ref", TypeSize: 24}, 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: "strong_count", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "weak_count", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved1", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved2", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "reserved3", TypeSize: 4}}},
+ }}},
{Key: StructKey{Name: "binder_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "binder_object", IsVarlen: true}, Fields: []Type{
- &StructType{Key: StructKey{Name: "flat_binder_object"}, FldName: "flat"},
+ &UnionType{Key: StructKey{Name: "flat_binder_object"}, FldName: "flat"},
&StructType{Key: StructKey{Name: "binder_fd_object"}, FldName: "fd"},
&StructType{Key: StructKey{Name: "binder_fd_array_object"}, FldName: "fda"},
&StructType{Key: StructKey{Name: "binder_buffer_object"}, FldName: "ptr"},
@@ -4580,11 +4588,37 @@ var structDescs_amd64 = []*KeyedStruct{
&StructType{Key: StructKey{Name: "nlattr_t[const[TCA_CHAIN, int16], int32]"}, FldName: "TCA_CHAIN"},
}}},
{Key: StructKey{Name: "flat_binder_object"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flat_binder_object", TypeSize: 24}, Fields: []Type{
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_types", FldName: "type", TypeSize: 4}}, Vals: []uint64{1935813253, 2002922117, 1936206469, 2003315333}},
- &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 10, 256}, BitMask: true},
+ &StructType{Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_BINDER, binder_ptr]"}, FldName: "binder"},
+ &StructType{Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_WEAK_BINDER, binder_ptr]"}, FldName: "weak_binder"},
+ &StructType{Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_HANDLE, binder_handle]"}, FldName: "handle"},
+ &StructType{Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_WEAK_HANDLE, binder_handle]"}, FldName: "weak_handle"},
+ }}},
+ {Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_BINDER, binder_ptr]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flat_binder_object_t[BINDER_TYPE_BINDER, binder_ptr]", TypeSize: 24}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1935813253},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 10, 256, 4096}, BitMask: true},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "binder_ptr", FldName: "binder", TypeSize: 8}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "cookie", TypeSize: 8}}, Kind: 2, RangeEnd: 4},
+ }}},
+ {Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_HANDLE, binder_handle]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flat_binder_object_t[BINDER_TYPE_HANDLE, binder_handle]", TypeSize: 24}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1936206469},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 10, 256, 4096}, BitMask: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "binder", TypeSize: 4}}, Kind: 2, RangeEnd: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "cookie", TypeSize: 8}}, Kind: 2, RangeEnd: 4},
+ }}},
+ {Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_WEAK_BINDER, binder_ptr]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flat_binder_object_t[BINDER_TYPE_WEAK_BINDER, binder_ptr]", TypeSize: 24}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 2002922117},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 10, 256, 4096}, BitMask: true},
&ResourceType{TypeCommon: TypeCommon{TypeName: "binder_ptr", FldName: "binder", TypeSize: 8}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "cookie", TypeSize: 8}}, Kind: 2, RangeEnd: 4},
}}},
+ {Key: StructKey{Name: "flat_binder_object_t[BINDER_TYPE_WEAK_HANDLE, binder_handle]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flat_binder_object_t[BINDER_TYPE_WEAK_HANDLE, binder_handle]", TypeSize: 24}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 2003315333},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "binder_flat_flags", FldName: "flags", TypeSize: 4}}, Vals: []uint64{1, 10, 256, 4096}, BitMask: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "binder", TypeSize: 4}}, Kind: 2, RangeEnd: 4},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "cookie", TypeSize: 8}}, Kind: 2, RangeEnd: 4},
+ }}},
{Key: StructKey{Name: "flock"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "flock", TypeSize: 32}, Fields: []Type{
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "flock_type", FldName: "type", TypeSize: 2}}, Vals: []uint64{0, 1, 2}, BitMask: true},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "seek_whence", FldName: "whence", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 3, 4}},
@@ -31991,15 +32025,25 @@ var syscalls_amd64 = []*Syscall{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222823435},
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_node_debug_info", Dir: 2}}},
}},
+ {NR: 16, Name: "ioctl$BINDER_GET_NODE_INFO_FOR_REF", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_binder", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3222823436},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "binder_node_info_for_ref"}}},
+ }},
{NR: 16, Name: "ioctl$BINDER_SET_CONTEXT_MGR", CallName: "ioctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_binder", FldName: "fd", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074029063},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "arg", TypeSize: 8}}},
}},
+ {NR: 16, Name: "ioctl$BINDER_SET_CONTEXT_MGR_EXT", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_binder", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1075339789},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "flat_binder_object"}}},
+ }},
{NR: 16, Name: "ioctl$BINDER_SET_MAX_THREADS", CallName: "ioctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_binder", FldName: "fd", TypeSize: 4}},
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074029061},
- &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nthreads", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
}},
{NR: 16, Name: "ioctl$BINDER_THREAD_EXIT", CallName: "ioctl", Args: []Type{
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd_binder", FldName: "fd", TypeSize: 4}},
@@ -44040,7 +44084,9 @@ var consts_amd64 = []ConstValue{
{Name: "BC_TRANSACTION", Value: 1077961472},
{Name: "BC_TRANSACTION_SG", Value: 1078485777},
{Name: "BINDER_GET_NODE_DEBUG_INFO", Value: 3222823435},
+ {Name: "BINDER_GET_NODE_INFO_FOR_REF", Value: 3222823436},
{Name: "BINDER_SET_CONTEXT_MGR", Value: 1074029063},
+ {Name: "BINDER_SET_CONTEXT_MGR_EXT", Value: 1075339789},
{Name: "BINDER_SET_MAX_THREADS", Value: 1074029061},
{Name: "BINDER_THREAD_EXIT", Value: 1074029064},
{Name: "BINDER_TYPE_BINDER", Value: 1935813253},
@@ -45106,6 +45152,7 @@ var consts_amd64 = []ConstValue{
{Name: "FITHAW", Value: 3221510264},
{Name: "FITRIM", Value: 3222820985},
{Name: "FLAT_BINDER_FLAG_ACCEPTS_FDS", Value: 256},
+ {Name: "FLAT_BINDER_FLAG_TXN_SECURITY_CTX", Value: 4096},
{Name: "FLOW_MODE_HASH", Value: 1},
{Name: "FLOW_MODE_MAP"},
{Name: "FOPEN_CACHE_DIR", Value: 8},
@@ -51540,4 +51587,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
-const revision_amd64 = "1e8b2cbaae600fa5e394e2174cddf8ccf7041300"
+const revision_amd64 = "c3ca596ec5a418716e3ed1df1d9f03f6614fb8c9"