From f8f416fb8f2ce79d0cbf980ee53ddb68fac850ca Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 16 Oct 2015 18:16:10 +0200 Subject: preliminary description of kdbus syscalls --- executor/syscalls.h | 16 ++ prog/analysis.go | 9 +- prog/consts.go | 101 ++++++++++++ prog/mutation.go | 5 + prog/prio.go | 3 +- prog/prog.go | 2 + prog/rand.go | 18 ++- sys/decl.go | 6 + sys/sys.go | 18 ++- sys/sys.txt | 440 +++++++++++++++++++++++++++++++++++++++++++++++++++- sysgen/sysgen.go | 41 +++-- 11 files changed, 641 insertions(+), 18 deletions(-) diff --git a/executor/syscalls.h b/executor/syscalls.h index 0175b6dea..21b3d8db4 100644 --- a/executor/syscalls.h +++ b/executor/syscalls.h @@ -371,4 +371,20 @@ call_t syscalls[] = { {"sched_getattr", __NR_sched_getattr}, {"sched_setattr", __NR_sched_setattr}, {"sched_yield", __NR_sched_yield}, + {"ioctl$kdbus_bus_make", __NR_ioctl}, + {"ioctl$kdbus_ep_make", __NR_ioctl}, + {"ioctl$kdbus_ep_update", __NR_ioctl}, + {"ioctl$kdbus_hello", __NR_ioctl}, + {"ioctl$kdbus_name_acquire", __NR_ioctl}, + {"ioctl$kdbus_name_release", __NR_ioctl}, + {"ioctl$kdbus_free", __NR_ioctl}, + {"ioctl$kdbus_recv", __NR_ioctl}, + {"ioctl$kdbus_send", __NR_ioctl}, + {"ioctl$kdbus_update", __NR_ioctl}, + {"ioctl$kdbus_bye", __NR_ioctl}, + {"ioctl$kdbus_conn_info", __NR_ioctl}, + {"ioctl$kdbus_bus_info", __NR_ioctl}, + {"ioctl$kdbus_list", __NR_ioctl}, + {"ioctl$kdbus_match_add", __NR_ioctl}, + {"ioctl$kdbus_match_remove", __NR_ioctl}, }; diff --git a/prog/analysis.go b/prog/analysis.go index 43d0aa076..30c9542da 100644 --- a/prog/analysis.go +++ b/prog/analysis.go @@ -205,7 +205,7 @@ func assignTypeAndDir(c *Call) { } func sanitizeCall(c *Call) { - switch c.Meta.Name { + switch c.Meta.CallName { case "mmap": // Add MAP_FIXED flag, otherwise it produces non-deterministic results. addr := c.Args[0] @@ -245,6 +245,13 @@ func sanitizeCall(c *Call) { if cmd.Val == SYSLOG_ACTION_CONSOLE_OFF || cmd.Val == SYSLOG_ACTION_CONSOLE_ON { cmd.Val = SYSLOG_ACTION_SIZE_UNREAD } + case "ioctl": + cmd := c.Args[1] + // Freeze kills machine. Though, it is an interesting functions, + // so we need to test it somehow (TODO). + if uint32(cmd.Val) == uint32(FIFREEZE) { + cmd.Val = FITHAW + } case "exit", "exit_group": code := c.Args[0] // These codes are reserved by executor. diff --git a/prog/consts.go b/prog/consts.go index 93eb2be63..9df6be072 100644 --- a/prog/consts.go +++ b/prog/consts.go @@ -288,6 +288,107 @@ const ( KCMP_SIGHAND = 4 KCMP_SYSVSEM = 6 KCMP_VM = 1 + KDBUS_ATTACH_ANY = 18446744073709551615 + KDBUS_ATTACH_AUDIT = 4096 + KDBUS_ATTACH_AUXGROUPS = 8 + KDBUS_ATTACH_CAPS = 1024 + KDBUS_ATTACH_CGROUP = 512 + KDBUS_ATTACH_CMDLINE = 256 + KDBUS_ATTACH_CONN_DESCRIPTION = 8192 + KDBUS_ATTACH_CREDS = 2 + KDBUS_ATTACH_EXE = 128 + KDBUS_ATTACH_NAMES = 16 + KDBUS_ATTACH_PIDS = 4 + KDBUS_ATTACH_PID_COMM = 64 + KDBUS_ATTACH_SECLABEL = 2048 + KDBUS_ATTACH_TID_COMM = 32 + KDBUS_ATTACH_TIMESTAMP = 1 + KDBUS_CMD_BUS_CREATOR_INFO = 2147784069 + KDBUS_CMD_BUS_MAKE = 1074042112 + KDBUS_CMD_BYEBYE = 1074042242 + KDBUS_CMD_CONN_INFO = 2147784068 + KDBUS_CMD_ENDPOINT_MAKE = 1074042128 + KDBUS_CMD_ENDPOINT_UPDATE = 1074042129 + KDBUS_CMD_FREE = 1074042243 + KDBUS_CMD_HELLO = 3221525888 + KDBUS_CMD_LIST = 2147784070 + KDBUS_CMD_MATCH_ADD = 1074042288 + KDBUS_CMD_MATCH_REMOVE = 1074042289 + KDBUS_CMD_NAME_ACQUIRE = 1074042272 + KDBUS_CMD_NAME_RELEASE = 1074042273 + KDBUS_CMD_RECV = 2147784081 + KDBUS_CMD_SEND = 1074042256 + KDBUS_CMD_UPDATE = 1074042241 + KDBUS_HELLO_ACCEPT_FD = 1 + KDBUS_HELLO_ACTIVATOR = 2 + KDBUS_HELLO_MONITOR = 8 + KDBUS_HELLO_POLICY_HOLDER = 4 + KDBUS_IOCTL_MAGIC = 149 + KDBUS_ITEM_ATTACH_FLAGS_RECV = 13 + KDBUS_ITEM_ATTACH_FLAGS_SEND = 12 + KDBUS_ITEM_AUDIT = 4108 + KDBUS_ITEM_AUXGROUPS = 4099 + KDBUS_ITEM_BLOOM_FILTER = 8 + KDBUS_ITEM_BLOOM_MASK = 9 + KDBUS_ITEM_BLOOM_PARAMETER = 7 + KDBUS_ITEM_CANCEL_FD = 6 + KDBUS_ITEM_CAPS = 4106 + KDBUS_ITEM_CGROUP = 4105 + KDBUS_ITEM_CMDLINE = 4104 + KDBUS_ITEM_CONN_DESCRIPTION = 4109 + KDBUS_ITEM_CREDS = 4097 + KDBUS_ITEM_DST_ID = 16 + KDBUS_ITEM_DST_NAME = 10 + KDBUS_ITEM_EXE = 4103 + KDBUS_ITEM_FDS = 5 + KDBUS_ITEM_ID = 14 + KDBUS_ITEM_ID_ADD = 32771 + KDBUS_ITEM_ID_REMOVE = 32772 + KDBUS_ITEM_MAKE_NAME = 11 + KDBUS_ITEM_NAME = 15 + KDBUS_ITEM_NAME_ADD = 32768 + KDBUS_ITEM_NAME_CHANGE = 32770 + KDBUS_ITEM_NAME_REMOVE = 32769 + KDBUS_ITEM_NEGOTIATE = 1 + KDBUS_ITEM_OWNED_NAME = 4100 + KDBUS_ITEM_PAYLOAD_MEMFD = 4 + KDBUS_ITEM_PAYLOAD_OFF = 3 + KDBUS_ITEM_PAYLOAD_VEC = 2 + KDBUS_ITEM_PIDS = 4098 + KDBUS_ITEM_PID_COM = 4102 + KDBUS_ITEM_POLICY_ACCESS = 8192 + KDBUS_ITEM_REPLY_DEAD = 32774 + KDBUS_ITEM_REPLY_TIMEOUT = 32773 + KDBUS_ITEM_SECLABEL = 4107 + KDBUS_ITEM_TID_COMM = 4101 + KDBUS_ITEM_TIMESTAMP = 4096 + KDBUS_LIST_ACTIVATORS = 4 + KDBUS_LIST_NAMES = 2 + KDBUS_LIST_QUEUED = 8 + KDBUS_LIST_UNIQUE = 1 + KDBUS_MAKE_ACCESS_GROUP = 1 + KDBUS_MAKE_ACCESS_WORLD = 2 + KDBUS_MATCH_REPLACE = 1 + KDBUS_MSG_EXPECT_REPLY = 1 + KDBUS_MSG_NO_AUTO_START = 2 + KDBUS_MSG_SIGNAL = 4 + KDBUS_NAME_ACQUIRED = 64 + KDBUS_NAME_ACTIVATOR = 16 + KDBUS_NAME_ALLOW_REPLACEMENT = 2 + KDBUS_NAME_IN_QUEUE = 8 + KDBUS_NAME_PRIMARY = 32 + KDBUS_NAME_QUEUE = 4 + KDBUS_NAME_REPLACE_EXISTING = 1 + KDBUS_POLICY_ACCESS_GROUP = 2 + KDBUS_POLICY_ACCESS_NULL = 0 + KDBUS_POLICY_ACCESS_USER = 1 + KDBUS_POLICY_ACCESS_WORLD = 3 + KDBUS_POLICY_OWN = 2 + KDBUS_POLICY_SEE = 0 + KDBUS_POLICY_TALK = 1 + KDBUS_RECV_RETURN_DROPPED_MSGS = 2 + KDBUS_RECV_RETURN_INCOMPLETE_FDS = 1 + KDBUS_SEND_SYNC_REPLY = 1 KEXEC_ARCH_386 = 196608 KEXEC_ARCH_ARM = 2621440 KEXEC_ARCH_IA_64 = 3276800 diff --git a/prog/mutation.go b/prog/mutation.go index 022bd513e..fd4cef209 100644 --- a/prog/mutation.go +++ b/prog/mutation.go @@ -149,6 +149,8 @@ func (p *Prog) Mutate(rs rand.Source, ncalls int, ct *ChoiceTable) { } case sys.LenType: panic("bad arg returned by mutationArgs: LenType") + case sys.ConstType: + panic("bad arg returned by mutationArgs: ConstType") default: panic(fmt.Sprintf("bad arg returned by mutationArgs: %#v, type=%#v", *arg, arg.Type)) } @@ -301,6 +303,9 @@ func mutationArgs(c *Call) (args, bases []*Arg, parents []*[]*Arg) { case sys.LenType: // Size is updated when the size-of arg change. return + case sys.ConstType: + // Well, this is const. + return } if arg.Dir == DirOut { return diff --git a/prog/prio.go b/prog/prio.go index 91e69d777..ffc4cc3d6 100644 --- a/prog/prio.go +++ b/prog/prio.go @@ -208,7 +208,8 @@ func foreachArgType(meta *sys.Call, f func(sys.Type, ArgDir)) { rec(f, d) } case sys.ResourceType, sys.FileoffType, sys.BufferType, - sys.VmaType, sys.LenType, sys.FlagsType, sys.IntType, sys.FilenameType: + sys.VmaType, sys.LenType, sys.FlagsType, sys.ConstType, + sys.IntType, sys.FilenameType: default: panic("unknown type") } diff --git a/prog/prog.go b/prog/prog.go index 019873d99..615951918 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -61,6 +61,8 @@ func (a *Arg) Size(typ sys.Type) uintptr { return typ1.TypeSize case sys.FlagsType: return typ1.TypeSize + case sys.ConstType: + return typ1.TypeSize case sys.FileoffType: return typ1.TypeSize case sys.ResourceType: diff --git a/prog/rand.go b/prog/rand.go index 0f353ceb3..568df3a30 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -561,7 +561,19 @@ func (r *randGen) generateArgs(s *state, types []sys.Type, dir ArgDir) ([]*Arg, sizes[typ.Name()] = size } } - // Pass 2: fill in size arguments. + + // Pass 2: calculate size of the whole struct. + // Now we know sizes of all non-size arguments and size arguments are const-size. + var parentSize uintptr + for i, typ := range types { + parentSize += args[i].Size(typ) + } + if sizes["parent"] != nil { + panic("parent is reserved len name") + } + sizes["parent"] = constArg(parentSize) + + // Pass 3: fill in size arguments. for i, typ := range types { if a, ok := typ.(sys.LenType); ok { size := sizes[a.Buf] @@ -581,7 +593,7 @@ func (r *randGen) generateArg(s *state, typ sys.Type, dir ArgDir, sizes map[stri // in subsequent calls. For the same reason we do generate pointer/array/struct // output arguments (their elements can be referenced in subsequent calls). switch typ.(type) { - case sys.IntType, sys.FlagsType, sys.FileoffType, sys.ResourceType: + case sys.IntType, sys.FlagsType, sys.ConstType, sys.FileoffType, sys.ResourceType: return constArg(0), nil, nil } } @@ -668,6 +680,8 @@ func (r *randGen) generateArg(s *state, typ sys.Type, dir ArgDir, sizes map[stri return arg, pageSizeArg(npages, 0), nil case sys.FlagsType: return constArg(r.flags(a.Vals)), nil, nil + case sys.ConstType: + return constArg(a.Val), nil, nil case sys.IntType: v := r.randInt() switch a.Kind { diff --git a/sys/decl.go b/sys/decl.go index 048ee92b5..d65d4450f 100644 --- a/sys/decl.go +++ b/sys/decl.go @@ -210,6 +210,12 @@ type FlagsType struct { Vals []uintptr } +type ConstType struct { + TypeCommon + TypeSize uintptr + Val uintptr +} + type IntKind int const ( diff --git a/sys/sys.go b/sys/sys.go index a2a85f53b..aef0cf221 100644 --- a/sys/sys.go +++ b/sys/sys.go @@ -62,7 +62,7 @@ var Calls = []*Call{ &Call{ID: 57, Name: "munlock", CallName: "munlock", Args: []Type{VmaType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}}, LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "addr", TypeSize: 0}}}, &Call{ID: 58, Name: "mlockall", CallName: "mlockall", Args: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1, 2}}}}, &Call{ID: 59, Name: "munlockall", CallName: "munlockall", Args: []Type{}}, - &Call{ID: 60, Name: "memfd_create", CallName: "memfd_create", Args: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, Kind: BufferString}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1, 2}}}}, + &Call{ID: 60, Name: "memfd_create", CallName: "memfd_create", Ret: ResourceType{TypeCommon: TypeCommon{TypeName: "ret", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, Args: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, Kind: BufferString}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{1, 2}}}}, &Call{ID: 61, Name: "unshare", CallName: "unshare", Args: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{2097152, 16777216, 1024, 512, 2147483648, 134217728, 1073741824, 131072, 536870912, 67108864, 32768, 1048576, 8192, 524288, 2048, 262144, 65536, 8388608, 16384, 256}}}}, &Call{ID: 62, Name: "kcmp", CallName: "kcmp", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "pid1", IsOptional: false}, Kind: ResPid}, ResourceType{TypeCommon: TypeCommon{TypeName: "pid2", IsOptional: false}, Kind: ResPid}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0, 2, 3, 5, 4, 6, 1}}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd1", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd2", IsOptional: false}, Kind: ResFD, Subkind: ResAny}}}, &Call{ID: 63, Name: "futex", CallName: "futex", Args: []Type{PtrType{TypeCommon: TypeCommon{TypeName: "addr", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "op", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0, 9, 1, 3, 4}}, IntType{TypeCommon: TypeCommon{TypeName: "val", IsOptional: false}, TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "timeout", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "timespec", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "sec", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "nsec", IsOptional: false}, TypeSize: 8}}}, Dir: DirIn}, PtrType{TypeCommon: TypeCommon{TypeName: "addr2", IsOptional: false}, Type: IntType{TypeCommon: TypeCommon{TypeName: "", IsOptional: false}, TypeSize: 4}, Dir: DirIn}, IntType{TypeCommon: TypeCommon{TypeName: "val3", IsOptional: false}, TypeSize: 8}}}, @@ -362,4 +362,20 @@ var Calls = []*Call{ &Call{ID: 357, Name: "sched_getattr", CallName: "sched_getattr", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "pid", IsOptional: false}, Kind: ResPid}, PtrType{TypeCommon: TypeCommon{TypeName: "attr", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sched_attr", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 4, Vals: []uintptr{48}}, FlagsType{TypeCommon: TypeCommon{TypeName: "policy", IsOptional: false}, TypeSize: 4, Vals: []uintptr{0, 3, 5, 1, 2, 6}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{0, 1}}, IntType{TypeCommon: TypeCommon{TypeName: "nice", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "prio", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "runtime", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "deadlin", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "period", IsOptional: false}, TypeSize: 8}}}, Dir: DirOut}, LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "attr", TypeSize: 0}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0}}}}, &Call{ID: 358, Name: "sched_setattr", CallName: "sched_setattr", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "pid", IsOptional: false}, Kind: ResPid}, PtrType{TypeCommon: TypeCommon{TypeName: "attr", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "sched_attr", IsOptional: false}, Fields: []Type{FlagsType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 4, Vals: []uintptr{48}}, FlagsType{TypeCommon: TypeCommon{TypeName: "policy", IsOptional: false}, TypeSize: 4, Vals: []uintptr{0, 3, 5, 1, 2, 6}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{0, 1}}, IntType{TypeCommon: TypeCommon{TypeName: "nice", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "prio", IsOptional: false}, TypeSize: 4}, IntType{TypeCommon: TypeCommon{TypeName: "runtime", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "deadlin", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "period", IsOptional: false}, TypeSize: 8}}}, Dir: DirIn}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 0, Vals: []uintptr{0}}}}, &Call{ID: 359, Name: "sched_yield", CallName: "sched_yield", Args: []Type{}}, + &Call{ID: 360, Name: "ioctl$kdbus_bus_make", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042112)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_bus_make", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_bloom_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(7)}, IntType{TypeCommon: TypeCommon{TypeName: "bsize", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "hash", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 361, Name: "ioctl$kdbus_ep_make", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042128)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_ep_make", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 362, Name: "ioctl$kdbus_ep_update", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042129)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_ep_update", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_policy_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(8192)}, FlagsType{TypeCommon: TypeCommon{TypeName: "ptype", IsOptional: false}, TypeSize: 8, Vals: []uintptr{0, 1, 2, 3}}, FlagsType{TypeCommon: TypeCommon{TypeName: "access", IsOptional: false}, TypeSize: 8, Vals: []uintptr{2, 1, 0}}, ResourceType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, Kind: ResUid}}}}}, Dir: DirIn}}}, + &Call{ID: 363, Name: "ioctl$kdbus_hello", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(3221525888)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_hello", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, FlagsType{TypeCommon: TypeCommon{TypeName: "sflags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 18446744073709551615}}, FlagsType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 18446744073709551615}}, IntType{TypeCommon: TypeCommon{TypeName: "bflags", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "poolsz", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "isize", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "id0", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "id1", IsOptional: false}, TypeSize: 8}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_policy_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(8192)}, FlagsType{TypeCommon: TypeCommon{TypeName: "ptype", IsOptional: false}, TypeSize: 8, Vals: []uintptr{0, 1, 2, 3}}, FlagsType{TypeCommon: TypeCommon{TypeName: "access", IsOptional: false}, TypeSize: 8, Vals: []uintptr{2, 1, 0}}, ResourceType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, Kind: ResUid}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_pids_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(4098)}, ResourceType{TypeCommon: TypeCommon{TypeName: "pid", IsOptional: false}, Kind: ResPid}, IntType{TypeCommon: TypeCommon{TypeName: "pad0", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "tid", IsOptional: false}, Kind: ResPid}, IntType{TypeCommon: TypeCommon{TypeName: "pad1", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "ppid", IsOptional: false}, Kind: ResPid}, IntType{TypeCommon: TypeCommon{TypeName: "pad2", IsOptional: false}, TypeSize: 4}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_creds_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(4097)}, ResourceType{TypeCommon: TypeCommon{TypeName: "uid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad0", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "euid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad1", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "suid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad2", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "fsuid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad3", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "gid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad4", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "egid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad5", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "sgid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad6", IsOptional: false}, TypeSize: 4}, ResourceType{TypeCommon: TypeCommon{TypeName: "fsgid", IsOptional: false}, Kind: ResUid}, IntType{TypeCommon: TypeCommon{TypeName: "pad7", IsOptional: false}, TypeSize: 4}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_seclabel_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(4107)}, IntType{TypeCommon: TypeCommon{TypeName: "label", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 364, Name: "ioctl$kdbus_name_acquire", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042272)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_name_acquire", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 365, Name: "ioctl$kdbus_name_release", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042273)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_name_release", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 366, Name: "ioctl$kdbus_free", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042243)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_free", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}}}, Dir: DirIn}}}, + &Call{ID: 367, Name: "ioctl$kdbus_recv", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(2147784081)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_recv", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "prio", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "dropped", IsOptional: false}, TypeSize: 8}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_msg_info", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}}}, Dir: DirIn}}}, + &Call{ID: 368, Name: "ioctl$kdbus_send", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042256)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_send", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, PtrType{TypeCommon: TypeCommon{TypeName: "msg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_msg", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_payload_vec", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(2)}, LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "data", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Kind: BufferBlob}}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_payload_vec", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(2)}, LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "data", TypeSize: 8}, PtrType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Dir: DirIn, Type: BufferType{TypeCommon: TypeCommon{TypeName: "data", IsOptional: false}, Kind: BufferBlob}}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_payload_memfd", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(4)}, IntType{TypeCommon: TypeCommon{TypeName: "start", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 8}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, IntType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_payload_memfd", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(4)}, IntType{TypeCommon: TypeCommon{TypeName: "start", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 8}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, IntType{TypeCommon: TypeCommon{TypeName: "pad", IsOptional: false}, TypeSize: 4}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_fd_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(6)}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_bloom_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(7)}, IntType{TypeCommon: TypeCommon{TypeName: "bsize", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "hash", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_dst_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(10)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_msg_info", IsOptional: false}, Fields: []Type{IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_fd_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(6)}, ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}}}}}, Dir: DirIn}}}, + &Call{ID: 369, Name: "ioctl$kdbus_update", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042241)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_update", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_policy_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(8192)}, FlagsType{TypeCommon: TypeCommon{TypeName: "ptype", IsOptional: false}, TypeSize: 8, Vals: []uintptr{0, 1, 2, 3}}, FlagsType{TypeCommon: TypeCommon{TypeName: "access", IsOptional: false}, TypeSize: 8, Vals: []uintptr{2, 1, 0}}, ResourceType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, Kind: ResUid}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_attach_flags_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{12, 13}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 18446744073709551615}}}}}}, Dir: DirIn}}}, + &Call{ID: 370, Name: "ioctl$kdbus_bye", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042242)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_bye", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, Dir: DirIn}}}, + &Call{ID: 371, Name: "ioctl$kdbus_conn_info", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(2147784068)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_info", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "aflags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 18446744073709551615}}, IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "isize", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 372, Name: "ioctl$kdbus_bus_info", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(2147784069)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_info", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "aflags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 18446744073709551615}}, IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "isize", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_make_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(11)}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 373, Name: "ioctl$kdbus_list", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(2147784070)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_list", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "off", IsOptional: false}, TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "lsize", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, Dir: DirIn}}}, + &Call{ID: 374, Name: "ioctl$kdbus_match_add", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042288)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_match", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "cookie", IsOptional: false}, TypeSize: 8}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_bloom_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(7)}, IntType{TypeCommon: TypeCommon{TypeName: "bsize", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "hash", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_change_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{32771, 32772}}, ConstType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_change_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{32771, 32772}}, ConstType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{14, 16}}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{14, 16}}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, + &Call{ID: 375, Name: "ioctl$kdbus_match_remove", CallName: "ioctl", Args: []Type{ResourceType{TypeCommon: TypeCommon{TypeName: "fd", IsOptional: false}, Kind: ResFD, Subkind: ResAny}, ConstType{TypeCommon: TypeCommon{TypeName: "cmd", IsOptional: false}, TypeSize: 0, Val: uintptr(1074042289)}, PtrType{TypeCommon: TypeCommon{TypeName: "arg", IsOptional: false}, Type: StructType{TypeCommon: TypeCommon{TypeName: "kdbus_cmd_match", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1}}, ConstType{TypeCommon: TypeCommon{TypeName: "rflags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, IntType{TypeCommon: TypeCommon{TypeName: "cookie", IsOptional: false}, TypeSize: 8}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_bloom_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, ConstType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Val: uintptr(7)}, IntType{TypeCommon: TypeCommon{TypeName: "bsize", IsOptional: false}, TypeSize: 8}, IntType{TypeCommon: TypeCommon{TypeName: "hash", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_name_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{15, 32768, 32769, 32770}}, FlagsType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Vals: []uintptr{1, 2, 4, 8, 16, 32, 64}}, IntType{TypeCommon: TypeCommon{TypeName: "name", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_change_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{32771, 32772}}, ConstType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_change_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{32771, 32772}}, ConstType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}, ConstType{TypeCommon: TypeCommon{TypeName: "flags", IsOptional: false}, TypeSize: 8, Val: uintptr(0)}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{14, 16}}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}}}, StructType{TypeCommon: TypeCommon{TypeName: "kdbus_id_parameter", IsOptional: false}, Fields: []Type{LenType{TypeCommon: TypeCommon{TypeName: "size", IsOptional: false}, Buf: "parent", TypeSize: 8}, FlagsType{TypeCommon: TypeCommon{TypeName: "type", IsOptional: false}, TypeSize: 8, Vals: []uintptr{14, 16}}, IntType{TypeCommon: TypeCommon{TypeName: "id", IsOptional: false}, TypeSize: 8}}}}}, Dir: DirIn}}}, } diff --git a/sys/sys.txt b/sys/sys.txt index 0ec36f526..adfe4acef 100644 --- a/sys/sys.txt +++ b/sys/sys.txt @@ -146,7 +146,7 @@ mlock(addr vma, size len[addr]) munlock(addr vma, size len[addr]) mlockall(flags flags[mlockall_flags]) munlockall() -memfd_create(name string, flags flags[memfd_flags]) +memfd_create(name string, flags flags[memfd_flags]) fd unshare(flags flags[clone_flags]) kcmp(pid1 pid, pid2 pid, type flags[kcmp_flags], fd1 fd, fd2 fd) @@ -1433,3 +1433,441 @@ define F_SEAL_WRITE 0x0008 #define __NR_sched_get_priority_max 146 #define __NR_sched_get_priority_min 147 + + +ioctl$kdbus_bus_make(fd fd, cmd const[KDBUS_CMD_BUS_MAKE], arg ptr[in, kdbus_cmd_bus_make]) +ioctl$kdbus_ep_make(fd fd, cmd const[KDBUS_CMD_ENDPOINT_MAKE], arg ptr[in, kdbus_cmd_ep_make]) +ioctl$kdbus_ep_update(fd fd, cmd const[KDBUS_CMD_ENDPOINT_UPDATE], arg ptr[in, kdbus_cmd_ep_update]) +ioctl$kdbus_hello(fd fd, cmd const[KDBUS_CMD_HELLO], arg ptr[in, kdbus_cmd_hello]) +ioctl$kdbus_name_acquire(fd fd, cmd const[KDBUS_CMD_NAME_ACQUIRE], arg ptr[in, kdbus_cmd_name_acquire]) +ioctl$kdbus_name_release(fd fd, cmd const[KDBUS_CMD_NAME_RELEASE], arg ptr[in, kdbus_cmd_name_release]) +ioctl$kdbus_free(fd fd, cmd const[KDBUS_CMD_FREE], arg ptr[in, kdbus_cmd_free]) +ioctl$kdbus_recv(fd fd, cmd const[KDBUS_CMD_RECV], arg ptr[in, kdbus_cmd_recv]) +ioctl$kdbus_send(fd fd, cmd const[KDBUS_CMD_SEND], arg ptr[in, kdbus_cmd_send]) +ioctl$kdbus_update(fd fd, cmd const[KDBUS_CMD_UPDATE], arg ptr[in, kdbus_cmd_update]) +ioctl$kdbus_bye(fd fd, cmd const[KDBUS_CMD_BYEBYE], arg ptr[in, kdbus_cmd_bye]) +ioctl$kdbus_conn_info(fd fd, cmd const[KDBUS_CMD_CONN_INFO], arg ptr[in, kdbus_cmd_info]) +ioctl$kdbus_bus_info(fd fd, cmd const[KDBUS_CMD_BUS_CREATOR_INFO], arg ptr[in, kdbus_cmd_info]) +ioctl$kdbus_list(fd fd, cmd const[KDBUS_CMD_LIST], arg ptr[in, kdbus_cmd_list]) +ioctl$kdbus_match_add(fd fd, cmd const[KDBUS_CMD_MATCH_ADD], arg ptr[in, kdbus_cmd_match]) +ioctl$kdbus_match_remove(fd fd, cmd const[KDBUS_CMD_MATCH_REMOVE], arg ptr[in, kdbus_cmd_match]) + +kdbus_cmd_bus_make { + size len[parent, int64] + flags flags[kdbus_make_flags, int64] + rflags const[0, int64] + bloom kdbus_bloom_parameter + name kdbus_make_name_parameter +} + +kdbus_cmd_ep_make { + size len[parent, int64] + flags flags[kdbus_make_flags, int64] + rflags const[0, int64] + name kdbus_make_name_parameter +} + +kdbus_cmd_ep_update { + size len[parent, int64] + flags flags[kdbus_make_flags, int64] + rflags const[0, int64] + + name kdbus_make_name_parameter + policy kdbus_policy_parameter +} + +kdbus_cmd_hello { + size len[parent, int64] + flags flags[kdbus_hello_flags, int64] + rflags const[0, int64] + + sflags flags[kdbus_attach_flags, int64] + rflags flags[kdbus_attach_flags, int64] + bflags int64 + id int64 + poolsz int64 + off int64 + isize int64 + id0 int64 + id1 int64 + + name kdbus_make_name_parameter + policy kdbus_policy_parameter + pids kdbus_pids_parameter + creds kdbus_creds_parameter + seclab kdbus_seclabel_parameter +} + +kdbus_cmd_bye { + size len[parent, int64] + flags const[0, int64] + rflags const[0, int64] +} + +kdbus_cmd_list { + size len[parent, int64] + flags flags[kdbus_list_flags, int64] + rflags const[0, int64] + off int64 + lsize const[0, int64] +} + +kdbus_cmd_update { + size len[parent, int64] + flags flags[kdbus_name_flags, int64] + rflags const[0, int64] + + name kdbus_make_name_parameter + policy kdbus_policy_parameter + attach kdbus_attach_flags_parameter +} + +kdbus_cmd_name_acquire { + size len[parent, int64] + flags flags[kdbus_name_flags, int64] + rflags const[0, int64] + name kdbus_make_name_parameter +} + +kdbus_cmd_name_release { + size len[parent, int64] + flags const[0, int64] + rflags const[0, int64] + name kdbus_make_name_parameter +} + +kdbus_cmd_match { + size len[parent, int64] + flags flags[kdbus_match_flags, int64] + rflags const[0, int64] +# TODO: this needs to match between add and remove + cookie int64 + + bloom kdbus_bloom_parameter + name0 kdbus_name_parameter + name1 kdbus_name_parameter + name2 kdbus_name_parameter + name3 kdbus_name_parameter + idadd kdbus_id_change_parameter + idremov kdbus_id_change_parameter + id kdbus_id_parameter + dstid kdbus_id_parameter +} + +kdbus_cmd_free { + size len[parent, int64] + flags int64 + rflags const[0, int64] + off int64 +# TODO: followed by arbitrary sequence of parameters +} + +kdbus_cmd_recv { + size len[parent, int64] + flags flags[kdbus_recv_flags, int64] + rflags const[0, int64] + prio int64 + dropped int64 + msg kdbus_msg_info +# TODO: followed by arbitrary sequence of parameters +} + +kdbus_cmd_send { + size len[parent, int64] + flags flags[kdbus_send_flags, int64] + rflags const[0, int64] + msg ptr[in, kdbus_msg] + reply kdbus_msg_info + fd kdbus_fd_parameter +} + +kdbus_msg { + size len[parent, int64] + flags flags[kdbus_msg_flags, int64] + rflags const[0, int64] + + vec0 kdbus_payload_vec + vec1 kdbus_payload_vec + memfd0 kdbus_payload_memfd + memfd1 kdbus_payload_memfd + fds kdbus_fd_parameter + bloom kdbus_bloom_parameter + dname kdbus_dst_name_parameter +} + +kdbus_msg_info { + off int64 + size int64 + rflags const[0, int64] +} + +kdbus_cmd_info { + size len[parent, int64] + flags const[0, int64] + rflags const[0, int64] + +# TODO: this is connection id, need to extract it from somewhere + id int64 + aflags flags[kdbus_attach_flags, int64] +# TODO: off is offset in the caller's pool buffer where the kdbus_info struct result is stored. +# It needs to be passed to KDBUS_CMD_FREE, so it should be a resource. + off int64 + isize const[0, int64] +# TODO: name is optional if id is specified + name kdbus_make_name_parameter +} + +kdbus_bloom_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_BLOOM_PARAMETER, int64] + bsize int64 + hash int64 +} + +kdbus_make_name_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_MAKE_NAME, int64] +# TODO: this is embed strz buffer of variable-length + name int64 +} + +kdbus_dst_name_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_DST_NAME, int64] +# TODO: this is embed strz buffer of variable-length + name int64 +} + +kdbus_name_parameter { + size len[parent, int64] + type flags[kdbus_name_params, int64] + flags flags[kdbus_name_flags, int64] +# TODO: this is embed var-len string + name int64 +} + +kdbus_negotiate_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_NEGOTIATE, int64] +} + +kdbus_policy_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_POLICY_ACCESS, int64] + ptype flags[kdbus_policy_access, int64] + access flags[kdbus_policy_flags, int64] + id uid +} + +kdbus_attach_flags_parameter { + size len[parent, int64] + type flags[kdbug_attach_type, int64] + flags flags[kdbus_attach_flags, int64] +} + +kdbus_fd_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_CANCEL_FD, int64] +# TODO: this can be embed var-len array + fd fd +} + +kdbus_pids_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_PIDS, int64] + pid pid + pad0 int32 + tid pid + pad1 int32 + ppid pid + pad2 int32 +} + +kdbus_creds_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_CREDS, int64] + uid uid + pad0 int32 + euid uid + pad1 int32 + suid uid + pad2 int32 + fsuid uid + pad3 int32 + gid uid + pad4 int32 + egid uid + pad5 int32 + sgid uid + pad6 int32 + fsgid uid + pad7 int32 +} + +kdbus_seclabel_parameter { + size len[parent, int64] + type const[KDBUS_ITEM_SECLABEL, int64] +# TODO: this is some var-len string of unknown nature + label int64 +} + +kdbus_payload_vec { + size len[parent, int64] + type const[KDBUS_ITEM_PAYLOAD_VEC, int64] + size len[data, int64] + data buffer[in] +} + +kdbus_payload_memfd { + size len[parent, int64] + type const[KDBUS_ITEM_PAYLOAD_MEMFD, int64] + start int64 + size int64 + fd fd + pad int32 +} + +kdbus_id_change_parameter { + size len[parent, int64] + type flags[kdbus_id_change_type, int64] + id const[0, int64] + flags const[0, int64] +} + +kdbus_id_parameter { + size len[parent, int64] + type flags[kdbus_id_type, int64] +# TODO: what is this id? + id int64 +} + +kdbus_make_flags = KDBUS_MAKE_ACCESS_GROUP, KDBUS_MAKE_ACCESS_WORLD +kdbus_hello_flags = KDBUS_HELLO_ACCEPT_FD, KDBUS_HELLO_ACTIVATOR, KDBUS_HELLO_POLICY_HOLDER, KDBUS_HELLO_MONITOR +kdbus_attach_flags = KDBUS_ATTACH_TIMESTAMP, KDBUS_ATTACH_CREDS, KDBUS_ATTACH_PIDS, KDBUS_ATTACH_AUXGROUPS, KDBUS_ATTACH_NAMES, KDBUS_ATTACH_TID_COMM, KDBUS_ATTACH_PID_COMM, KDBUS_ATTACH_EXE, KDBUS_ATTACH_CMDLINE, KDBUS_ATTACH_CGROUP, KDBUS_ATTACH_CAPS, KDBUS_ATTACH_SECLABEL, KDBUS_ATTACH_AUDIT, KDBUS_ATTACH_CONN_DESCRIPTION, KDBUS_ATTACH_ANY +kdbus_name_flags = KDBUS_NAME_REPLACE_EXISTING, KDBUS_NAME_ALLOW_REPLACEMENT, KDBUS_NAME_QUEUE, KDBUS_NAME_IN_QUEUE, KDBUS_NAME_ACTIVATOR, KDBUS_NAME_PRIMARY, KDBUS_NAME_ACQUIRED +kdbus_recv_flags = KDBUS_RECV_RETURN_INCOMPLETE_FDS, KDBUS_RECV_RETURN_DROPPED_MSGS +kdbus_send_flags = KDBUS_SEND_SYNC_REPLY +kdbus_policy_access = KDBUS_POLICY_ACCESS_NULL, KDBUS_POLICY_ACCESS_USER, KDBUS_POLICY_ACCESS_GROUP, KDBUS_POLICY_ACCESS_WORLD +kdbus_policy_flags = KDBUS_POLICY_OWN, KDBUS_POLICY_TALK, KDBUS_POLICY_SEE +kdbug_attach_type = KDBUS_ITEM_ATTACH_FLAGS_SEND, KDBUS_ITEM_ATTACH_FLAGS_RECV +kdbus_msg_flags = KDBUS_MSG_EXPECT_REPLY, KDBUS_MSG_NO_AUTO_START, KDBUS_MSG_SIGNAL +kdbus_list_flags = KDBUS_LIST_UNIQUE, KDBUS_LIST_NAMES, KDBUS_LIST_ACTIVATORS, KDBUS_LIST_QUEUED +kdbus_match_flags = KDBUS_MATCH_REPLACE +kdbus_name_params = KDBUS_ITEM_NAME, KDBUS_ITEM_NAME_ADD, KDBUS_ITEM_NAME_REMOVE, KDBUS_ITEM_NAME_CHANGE +kdbus_id_change_type = KDBUS_ITEM_ID_ADD, KDBUS_ITEM_ID_REMOVE +kdbus_id_type = KDBUS_ITEM_ID, KDBUS_ITEM_DST_ID + +define KDBUS_IOCTL_MAGIC 0x95 +define KDBUS_CMD_BUS_MAKE _IOW(KDBUS_IOCTL_MAGIC, 0x00, int) +define KDBUS_CMD_ENDPOINT_MAKE _IOW(KDBUS_IOCTL_MAGIC, 0x10, int) +define KDBUS_CMD_ENDPOINT_UPDATE _IOW(KDBUS_IOCTL_MAGIC, 0x11, int) +define KDBUS_CMD_HELLO _IOWR(KDBUS_IOCTL_MAGIC, 0x80, int) +define KDBUS_CMD_UPDATE _IOW(KDBUS_IOCTL_MAGIC, 0x81, int) +define KDBUS_CMD_BYEBYE _IOW(KDBUS_IOCTL_MAGIC, 0x82, int) +define KDBUS_CMD_FREE _IOW(KDBUS_IOCTL_MAGIC, 0x83, int) +define KDBUS_CMD_CONN_INFO _IOR(KDBUS_IOCTL_MAGIC, 0x84, int) +define KDBUS_CMD_BUS_CREATOR_INFO _IOR(KDBUS_IOCTL_MAGIC, 0x85, int) +define KDBUS_CMD_LIST _IOR(KDBUS_IOCTL_MAGIC, 0x86, int) +define KDBUS_CMD_SEND _IOW(KDBUS_IOCTL_MAGIC, 0x90, int) +define KDBUS_CMD_RECV _IOR(KDBUS_IOCTL_MAGIC, 0x91, int) +define KDBUS_CMD_NAME_ACQUIRE _IOW(KDBUS_IOCTL_MAGIC, 0xa0, int) +define KDBUS_CMD_NAME_RELEASE _IOW(KDBUS_IOCTL_MAGIC, 0xa1, int) +define KDBUS_CMD_MATCH_ADD _IOW(KDBUS_IOCTL_MAGIC, 0xb0, int) +define KDBUS_CMD_MATCH_REMOVE _IOW(KDBUS_IOCTL_MAGIC, 0xb1, int) + +define KDBUS_MAKE_ACCESS_GROUP (1ULL << 0) +define KDBUS_MAKE_ACCESS_WORLD (1ULL << 1) + +define KDBUS_HELLO_ACCEPT_FD (1ULL << 0) +define KDBUS_HELLO_ACTIVATOR (1ULL << 1) +define KDBUS_HELLO_POLICY_HOLDER (1ULL << 2) +define KDBUS_HELLO_MONITOR (1ULL << 3) + +define KDBUS_ATTACH_TIMESTAMP 1ULL << 0 +define KDBUS_ATTACH_CREDS 1ULL << 1 +define KDBUS_ATTACH_PIDS 1ULL << 2 +define KDBUS_ATTACH_AUXGROUPS 1ULL << 3 +define KDBUS_ATTACH_NAMES 1ULL << 4 +define KDBUS_ATTACH_TID_COMM 1ULL << 5 +define KDBUS_ATTACH_PID_COMM 1ULL << 6 +define KDBUS_ATTACH_EXE 1ULL << 7 +define KDBUS_ATTACH_CMDLINE 1ULL << 8 +define KDBUS_ATTACH_CGROUP 1ULL << 9 +define KDBUS_ATTACH_CAPS 1ULL << 10 +define KDBUS_ATTACH_SECLABEL 1ULL << 11 +define KDBUS_ATTACH_AUDIT 1ULL << 12 +define KDBUS_ATTACH_CONN_DESCRIPTION 1ULL << 13 +define KDBUS_ATTACH_ANY ~0ULL + +define KDBUS_NAME_REPLACE_EXISTING 1ULL << 0 +define KDBUS_NAME_ALLOW_REPLACEMENT 1ULL << 1 +define KDBUS_NAME_QUEUE 1ULL << 2 +define KDBUS_NAME_IN_QUEUE 1ULL << 3 +define KDBUS_NAME_ACTIVATOR 1ULL << 4 +define KDBUS_NAME_PRIMARY 1ULL << 5 +define KDBUS_NAME_ACQUIRED 1ULL << 6 + +define KDBUS_RECV_RETURN_INCOMPLETE_FDS 1ULL << 0 +define KDBUS_RECV_RETURN_DROPPED_MSGS 1ULL << 1 + +define KDBUS_SEND_SYNC_REPLY 1ULL << 0 + +define KDBUS_LIST_UNIQUE 1ULL << 0 +define KDBUS_LIST_NAMES 1ULL << 1 +define KDBUS_LIST_ACTIVATORS 1ULL << 2 +define KDBUS_LIST_QUEUED 1ULL << 3 + +define KDBUS_POLICY_ACCESS_NULL 0 +define KDBUS_POLICY_ACCESS_USER 1 +define KDBUS_POLICY_ACCESS_GROUP 2 +define KDBUS_POLICY_ACCESS_WORLD 3 + +define KDBUS_POLICY_SEE 0 +define KDBUS_POLICY_TALK 1 +define KDBUS_POLICY_OWN 2 + +define KDBUS_MATCH_REPLACE 1ULL << 0 + +define KDBUS_MSG_EXPECT_REPLY 1ULL << 0 +define KDBUS_MSG_NO_AUTO_START 1ULL << 1 +define KDBUS_MSG_SIGNAL 1ULL << 2 + +define KDBUS_ITEM_NEGOTIATE 1 +define KDBUS_ITEM_PAYLOAD_VEC 2 +define KDBUS_ITEM_PAYLOAD_OFF 3 +define KDBUS_ITEM_PAYLOAD_MEMFD 4 +define KDBUS_ITEM_FDS 5 +define KDBUS_ITEM_CANCEL_FD 6 +define KDBUS_ITEM_BLOOM_PARAMETER 7 +define KDBUS_ITEM_BLOOM_FILTER 8 +define KDBUS_ITEM_BLOOM_MASK 9 +define KDBUS_ITEM_DST_NAME 10 +define KDBUS_ITEM_MAKE_NAME 11 +define KDBUS_ITEM_ATTACH_FLAGS_SEND 12 +define KDBUS_ITEM_ATTACH_FLAGS_RECV 13 +define KDBUS_ITEM_ID 14 +define KDBUS_ITEM_NAME 15 +define KDBUS_ITEM_DST_ID 16 +define KDBUS_ITEM_TIMESTAMP (0x1000 + 0) +define KDBUS_ITEM_CREDS (0x1000 + 1) +define KDBUS_ITEM_PIDS (0x1000 + 2) +define KDBUS_ITEM_AUXGROUPS (0x1000 + 3) +define KDBUS_ITEM_OWNED_NAME (0x1000 + 4) +define KDBUS_ITEM_TID_COMM (0x1000 + 5) +define KDBUS_ITEM_PID_COM (0x1000 + 6) +define KDBUS_ITEM_EXE (0x1000 + 7) +define KDBUS_ITEM_CMDLINE (0x1000 + 8) +define KDBUS_ITEM_CGROUP (0x1000 + 9) +define KDBUS_ITEM_CAPS (0x1000 + 10) +define KDBUS_ITEM_SECLABEL (0x1000 + 11) +define KDBUS_ITEM_AUDIT (0x1000 + 12) +define KDBUS_ITEM_CONN_DESCRIPTION (0x1000 + 13) +define KDBUS_ITEM_POLICY_ACCESS (0x2000 + 0) +define KDBUS_ITEM_NAME_ADD (0x8000 + 0) +define KDBUS_ITEM_NAME_REMOVE (0x8000 + 1) +define KDBUS_ITEM_NAME_CHANGE (0x8000 + 2) +define KDBUS_ITEM_ID_ADD (0x8000 + 3) +define KDBUS_ITEM_ID_REMOVE (0x8000 + 4) +define KDBUS_ITEM_REPLY_TIMEOUT (0x8000 + 5) +define KDBUS_ITEM_REPLY_DEAD (0x8000 + 6) + diff --git a/sysgen/sysgen.go b/sysgen/sysgen.go index 6431b3bad..25e1c4c7d 100644 --- a/sysgen/sysgen.go +++ b/sysgen/sysgen.go @@ -31,7 +31,7 @@ func main() { intFlags, flagVals := compileFlags(includes, defines, flags) out := new(bytes.Buffer) - generate(syscalls, structs, unnamed, intFlags, out) + generate(syscalls, structs, unnamed, intFlags, flagVals, out) writeSource("sys.go", out.Bytes()) out = new(bytes.Buffer) @@ -60,7 +60,7 @@ type Flag struct { Values []string } -func generate(syscalls []Syscall, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, out io.Writer) { +func generate(syscalls []Syscall, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, flagVals map[string]string, out io.Writer) { fmt.Fprintf(out, "// AUTOGENERATED FILE\n") fmt.Fprintf(out, "package sys\n\n") @@ -69,21 +69,21 @@ func generate(syscalls []Syscall, structs map[string]Struct, unnamed map[string] fmt.Fprintf(out, "&Call{ID: %v, Name: \"%v\", CallName: \"%v\"", i, s.Name, s.CallName) if len(s.Ret) != 0 { fmt.Fprintf(out, ", Ret: ") - generateArg("ret", s.Ret[0], s.Ret[1:], structs, unnamed, flags, false, out) + generateArg("ret", s.Ret[0], s.Ret[1:], structs, unnamed, flags, flagVals, false, out) } fmt.Fprintf(out, ", Args: []Type{") for i, a := range s.Args { if i != 0 { fmt.Fprintf(out, ", ") } - generateArg(a[0], a[1], a[2:], structs, unnamed, flags, false, out) + generateArg(a[0], a[1], a[2:], structs, unnamed, flags, flagVals, false, out) } fmt.Fprintf(out, "}},\n") } fmt.Fprintf(out, "}\n") } -func generateArg(name, typ string, a []string, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, isField bool, out io.Writer) { +func generateArg(name, typ string, a []string, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, flagVals map[string]string, isField bool, out io.Writer) { name = "\"" + name + "\"" opt := false for i, v := range a { @@ -220,6 +220,23 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname failf("unknown flag %v", a[0]) } fmt.Fprintf(out, "FlagsType{%v, TypeSize: %v, Vals: []uintptr{%v}}", common(), size, strings.Join(vals, ",")) + case "const": + var size uint64 + if isField { + if want := 2; len(a) != want { + failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a)) + } + size = typeToSize(a[1]) + } else { + if want := 1; len(a) != want { + failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a)) + } + } + val := flagVals[a[0]] + if val == "" { + val = a[0] + } + fmt.Fprintf(out, "ConstType{%v, TypeSize: %v, Val: uintptr(%v)}", common(), size, val) case "int8", "int16", "int32", "int64", "intptr": if want := 0; len(a) != want { failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a)) @@ -246,16 +263,16 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname if want := 1; len(a) != want { failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a)) } - fmt.Fprintf(out, "ArrayType{%v, Type: %v}", common(), generateType(a[0], structs, unnamed, flags)) + fmt.Fprintf(out, "ArrayType{%v, Type: %v}", common(), generateType(a[0], structs, unnamed, flags, flagVals)) case "ptr": if want := 2; len(a) != want { failf("wrong number of arguments for %v arg %v, want %v, got %v", typ, name, want, len(a)) } - fmt.Fprintf(out, "PtrType{%v, Type: %v, Dir: %v}", common(), generateType(a[1], structs, unnamed, flags), fmtDir(a[0])) + fmt.Fprintf(out, "PtrType{%v, Type: %v, Dir: %v}", common(), generateType(a[1], structs, unnamed, flags, flagVals), fmtDir(a[0])) default: if strings.HasPrefix(typ, "unnamed") { if inner, ok := unnamed[typ]; ok { - generateArg("", inner[0], inner[1:], structs, unnamed, flags, isField, out) + generateArg("", inner[0], inner[1:], structs, unnamed, flags, flagVals, isField, out) return } failf("unknown unnamed type '%v'", typ) @@ -266,7 +283,7 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname if i != 0 { fmt.Fprintf(out, ", ") } - generateArg(a[0], a[1], a[2:], structs, unnamed, flags, true, out) + generateArg(a[0], a[1], a[2:], structs, unnamed, flags, flagVals, true, out) } fmt.Fprintf(out, "}}") return @@ -275,9 +292,9 @@ func generateArg(name, typ string, a []string, structs map[string]Struct, unname } } -func generateType(typ string, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string) string { +func generateType(typ string, structs map[string]Struct, unnamed map[string][]string, flags map[string][]string, flagVals map[string]string) string { buf := new(bytes.Buffer) - generateArg("", typ, nil, structs, unnamed, flags, true, buf) + generateArg("", typ, nil, structs, unnamed, flags, flagVals, true, buf) return buf.String() } @@ -545,7 +562,7 @@ func parse(in io.Reader) (includes []string, defines map[string]string, syscalls if defines[key] != "" { failf("%v define is defined multiple times", key) } - defines[key] = string(val) + defines[key] = fmt.Sprintf("(%s)", val) } else { switch p.Char() { case '(': -- cgit mrf-deployment