aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@basename.se>2018-08-28 19:07:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-08-28 10:07:26 -0700
commitb771b17ec95715c24715d730363f6f07bc46fd4f (patch)
treecfdb14bb69866ad3bd3b35d21d6c803530b1f8b0 /sys
parent7ef1de9ea4b02a8799b3a7f4b1d7b06a586b3f37 (diff)
Add mandatory OpenBSD bits (#689)
all: add openbsd support squash of the following commits: * openbsd: add mandatory bits * report: add OpenBSD support * executor: skip building kvm on OpenBSD * executor: add OpenBSD support Linking against libutil is necessary due to usage of openpty(3). * executor: fix typo in fail() message * fixup! report: add OpenBSD support * fixup! openbsd: add mandatory bits * fixup! openbsd: add mandatory bits * fixup! openbsd: add mandatory bits * fixup! report: add OpenBSD support * gometalinter: skip sys/openbsd
Diffstat (limited to 'sys')
-rw-r--r--sys/openbsd/fs.txt69
-rw-r--r--sys/openbsd/fs_amd64.const45
-rw-r--r--sys/openbsd/gen/amd64.go1880
-rw-r--r--sys/openbsd/gen/empty.go3
-rw-r--r--sys/openbsd/init.go49
-rw-r--r--sys/openbsd/ipc.txt125
-rw-r--r--sys/openbsd/ipc_amd64.const41
-rw-r--r--sys/openbsd/kqueue.txt25
-rw-r--r--sys/openbsd/kqueue_amd64.const38
-rw-r--r--sys/openbsd/mm.txt19
-rw-r--r--sys/openbsd/mm_amd64.const26
-rw-r--r--sys/openbsd/socket.txt90
-rw-r--r--sys/openbsd/socket_amd64.const59
-rw-r--r--sys/openbsd/socket_inet.txt41
-rw-r--r--sys/openbsd/socket_inet6.txt66
-rw-r--r--sys/openbsd/socket_inet6_amd64.const17
-rw-r--r--sys/openbsd/socket_inet_amd64.const15
-rw-r--r--sys/openbsd/socket_unix.txt79
-rw-r--r--sys/openbsd/socket_unix_amd64.const18
-rw-r--r--sys/openbsd/sys.txt208
-rw-r--r--sys/openbsd/sys_amd64.const146
-rw-r--r--sys/openbsd/tty.txt69
-rw-r--r--sys/openbsd/tty_amd64.const38
-rw-r--r--sys/sys.go1
-rw-r--r--sys/syz-extract/extract.go1
-rw-r--r--sys/syz-extract/openbsd.go86
-rw-r--r--sys/targets/common.go2
-rw-r--r--sys/targets/targets.go15
28 files changed, 3271 insertions, 0 deletions
diff --git a/sys/openbsd/fs.txt b/sys/openbsd/fs.txt
new file mode 100644
index 000000000..62bb65659
--- /dev/null
+++ b/sys/openbsd/fs.txt
@@ -0,0 +1,69 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/stat.h>
+include <fcntl.h>
+include <unistd.h>
+
+resource fd[int32]: 0xffffffffffffffff, AT_FDCWD
+resource fd_dir[fd]
+
+resource pid[int32]: 0, 0xffffffffffffffff
+resource uid[int32]: 0, 0xffffffffffffffff
+resource gid[int32]: 0, 0xffffffffffffffff
+
+open(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd
+# Just so that we have something that creates fd_dir resources.
+open$dir(file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd_dir
+openat(fd fd_dir, file ptr[in, filename], flags flags[open_flags], mode flags[open_mode]) fd
+close(fd fd)
+read(fd fd, buf buffer[out], count len[buf])
+readv(fd fd, vec ptr[in, array[iovec_out]], vlen len[vec])
+preadv(fd fd, vec ptr[in, array[iovec_out]], vlen len[vec], off fileoff)
+write(fd fd, buf buffer[in], count len[buf])
+writev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec])
+pwritev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], off fileoff)
+lseek(fd fd, offset fileoff, whence flags[seek_whence])
+dup(oldfd fd) fd
+dup2(oldfd fd, newfd fd) fd
+pipe2(pipefd ptr[out, pipefd], flags flags[pipe_flags])
+
+pipefd {
+ rfd fd
+ wfd fd
+}
+
+iovec_in {
+ addr buffer[in]
+ len len[addr, intptr]
+}
+
+iovec_out {
+ addr buffer[out]
+ len len[addr, intptr]
+}
+
+stat {
+ dev int64
+ ino int64
+ mode int32
+ nlink int32
+ rdev int64
+ size int64
+ blksize int32
+ blocks int64
+ atime int64
+ ansec int64
+ mtime int64
+ mnsec int64
+ ctime int64
+ cnsec int64
+ pad1 int32
+ pad2 int32
+}
+
+open_flags = O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_TRUNC, O_EXCL, O_SHLOCK, O_EXLOCK, O_NOFOLLOW, O_CLOEXEC, O_DSYNC, O_SYNC, O_RSYNC, O_NOCTTY, O_DIRECTORY, O_ASYNC
+open_mode = S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+seek_whence = SEEK_SET, SEEK_CUR, SEEK_END
+pipe_flags = O_NONBLOCK, O_CLOEXEC
diff --git a/sys/openbsd/fs_amd64.const b/sys/openbsd/fs_amd64.const
new file mode 100644
index 000000000..5f39ed6f8
--- /dev/null
+++ b/sys/openbsd/fs_amd64.const
@@ -0,0 +1,45 @@
+# AUTOGENERATED FILE
+AT_FDCWD = 18446744073709551516
+O_APPEND = 8
+O_ASYNC = 64
+O_CLOEXEC = 65536
+O_CREAT = 512
+O_DIRECTORY = 131072
+O_DSYNC = 128
+O_EXCL = 2048
+O_EXLOCK = 32
+O_NOCTTY = 32768
+O_NOFOLLOW = 256
+O_NONBLOCK = 4
+O_RDONLY = 0
+O_RDWR = 2
+O_RSYNC = 128
+O_SHLOCK = 16
+O_SYNC = 128
+O_TRUNC = 1024
+O_WRONLY = 1
+SEEK_CUR = 1
+SEEK_END = 2
+SEEK_SET = 0
+SYS_close = 6
+SYS_dup = 41
+SYS_dup2 = 90
+SYS_lseek = 199
+SYS_open = 5
+SYS_openat = 321
+SYS_pipe2 = 101
+SYS_preadv = 267
+SYS_pwritev = 268
+SYS_read = 3
+SYS_readv = 120
+SYS_write = 4
+SYS_writev = 121
+S_IRGRP = 32
+S_IROTH = 4
+S_IRUSR = 256
+S_IWGRP = 16
+S_IWOTH = 2
+S_IWUSR = 128
+S_IXGRP = 8
+S_IXOTH = 1
+S_IXUSR = 64
diff --git a/sys/openbsd/gen/amd64.go b/sys/openbsd/gen/amd64.go
new file mode 100644
index 000000000..3ecb31c0a
--- /dev/null
+++ b/sys/openbsd/gen/amd64.go
@@ -0,0 +1,1880 @@
+// AUTOGENERATED FILE
+// +build !syz_target syz_target,syz_os_openbsd,syz_arch_amd64
+
+package gen
+
+import . "github.com/google/syzkaller/prog"
+import . "github.com/google/syzkaller/sys/openbsd"
+
+func init() {
+ RegisterTarget(&Target{OS: "openbsd", Arch: "amd64", Revision: revision_amd64, PtrSize: 8, PageSize: 4096, NumPages: 4096, DataOffset: 536870912, Syscalls: syscalls_amd64, Resources: resources_amd64, Structs: structDescs_amd64, Consts: consts_amd64}, InitTarget)
+}
+
+var resources_amd64 = []*ResourceDesc{
+ {Name: "fd", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "fd_dir", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_dir"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "fd_kqueue", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_kqueue"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "fd_tty", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "fd_tty"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "gid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"gid"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "ipc", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "ipc_msq", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_msq"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "ipc_sem", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_sem"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "ipc_shm", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"ipc", "ipc_shm"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "pid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"pid"}, Values: []uint64{0, 18446744073709551615}},
+ {Name: "shmaddr", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", TypeSize: 8}}}, Kind: []string{"shmaddr"}, Values: []uint64{0}},
+ {Name: "sock", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_in", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_in6", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_in6"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "sock_unix", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"fd", "sock", "sock_unix"}, Values: []uint64{18446744073709551615, 18446744073709551516}},
+ {Name: "uid", Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: []string{"uid"}, Values: []uint64{0, 18446744073709551615}},
+}
+
+var structDescs_amd64 = []*KeyedStruct{
+ {Key: StructKey{Name: "cmsghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr", IsVarlen: true}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "cmsg_len", TypeSize: 8}}, Buf: "parent"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "cmsg_levels", FldName: "cmsg_level", TypeSize: 4}}, Vals: []uint64{65535, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "cmsg_type", TypeSize: 4}}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "cmsghdr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un", IsVarlen: true}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "cmsghdr_un_rights"}, FldName: "rights"},
+ &StructType{Key: StructKey{Name: "cmsghdr_un_cred"}, FldName: "cred"},
+ }}},
+ {Key: StructKey{Name: "cmsghdr_un_cred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un_cred", TypeSize: 32}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "parent"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 4}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "cmsghdr_un_rights"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "cmsghdr_un_rights", IsVarlen: true}, Fields: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "parent"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 4}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "type", TypeSize: 4}}, Val: 1},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "fds", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", TypeSize: 4}}},
+ }, AlignAttr: 8}},
+ {Key: StructKey{Name: "fd_set", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "fd_set", TypeSize: 64, ArgDir: 2}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask0", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask1", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask2", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask3", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask4", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask5", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask6", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mask7", TypeSize: 8, ArgDir: 2}}},
+ }}},
+ {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{1, 3, 2}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "seek_whence", FldName: "whence", TypeSize: 2}}, Vals: []uint64{0, 1, 2}, BitMask: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "start", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "iovec_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "iovec_in", TypeSize: 16}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ }}},
+ {Key: StructKey{Name: "iovec_out"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "iovec_out", TypeSize: 16}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "addr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ }}},
+ {Key: StructKey{Name: "ipc_perm"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ipc_perm", TypeSize: 48}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "key", TypeSize: 4}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "cuid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "cgid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 4}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "seq", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad2", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "itimerval"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "itimerval", TypeSize: 32}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval"}, FldName: "interv"},
+ &StructType{Key: StructKey{Name: "timeval"}, FldName: "value"},
+ }}},
+ {Key: StructKey{Name: "itimerval", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "itimerval", TypeSize: 32, ArgDir: 1}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "interv"},
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "value"},
+ }}},
+ {Key: StructKey{Name: "kevent"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "kevent", TypeSize: 32}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "kevent_ident"}, FldName: "ident"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "kevent_filter", FldName: "filter", TypeSize: 2}}, Vals: []uint64{18446744073709551615, 18446744073709551614, 18446744073709551613, 18446744073709551612, 18446744073709551611, 18446744073709551610, 18446744073709551609, 18446744073709551608}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "kevent_flags", FldName: "flags", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "kevent_fflags", FldName: "fflags", TypeSize: 4}}, Vals: []uint64{1, 2, 1, 2, 4, 8, 16, 32, 64, 128, 2147483648, 1073741824, 536870912, 4026531840, 1048575, 1, 2, 4, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "data", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "udata", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "kevent_ident"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "kevent_ident", TypeSize: 8}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ident", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "linger"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "linger", TypeSize: 8}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "onoff", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "linger", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "linger", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "linger", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "onoff", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "linger", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "mf6cctl"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mf6cctl", TypeSize: 60}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "mf6cc_origin"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "mf6cc_mcastgrp"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mf6cc_parent", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "mf6cc_ifset", TypeSize: 32}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "mif6ctl"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "mif6ctl", TypeSize: 12}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mif6c_mifi", TypeSize: 2}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mif6c_flags", FldName: "mif6c_flags", TypeSize: 1}}, Vals: []uint64{1}, BitMask: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "vifc_threshold", TypeSize: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "mif6c_pifi", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "vifc_rate_limit", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "msgbuf"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msgbuf", IsVarlen: true}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", IsVarlen: true}},
+ }}},
+ {Key: StructKey{Name: "msgbuf", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msgbuf", ArgDir: 1, IsVarlen: true}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8, ArgDir: 1}}, Vals: []uint64{0, 1, 2, 3}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "data", ArgDir: 1, IsVarlen: true}},
+ }}},
+ {Key: StructKey{Name: "msghdr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msghdr_un", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 4}}, Buf: "addr"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ctrl", TypeSize: 8, IsOptional: true}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &UnionType{Key: StructKey{Name: "cmsghdr_un"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "ctrllen", TypeSize: 8}}, BitSize: 8, Buf: "ctrl"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "msqid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "msqid_ds", TypeSize: 120}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "qnum", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "qbytes", TypeSize: 8}}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lspid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lrpid", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "stime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "rtime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "cbytes", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "pipefd", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pipefd", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "rfd", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "wfd", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "pollfd"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "pollfd", TypeSize: 8}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pollfd_events", FldName: "events", TypeSize: 2}}, Vals: []uint64{1, 2, 4, 8, 16, 32, 64, 128, 4, 256}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "revents", TypeSize: 2}}},
+ }}},
+ {Key: StructKey{Name: "recv_msghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "recv_msghdr", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_name", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_namelen", TypeSize: 4}}, Buf: "msg_name"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_iov", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_iovlen", TypeSize: 8}}, Buf: "msg_iov"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "msg_control", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_controllen", TypeSize: 8}}, Buf: "msg_control"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "msg_flags", TypeSize: 4}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "rlimit"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rlimit", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "soft", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "hard", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "rlimit", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rlimit", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "soft", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "hard", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "rusage", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "rusage", TypeSize: 144, ArgDir: 1}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "utime"},
+ &StructType{Key: StructKey{Name: "timeval", Dir: 1}, FldName: "stime"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "maxrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ixrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "idrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "isrss", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "minflt", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "majflt", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nswap", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "inblock", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "oublock", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "msgsnd", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "msgrcv", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "signals", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nvcsw", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nivcsw", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "sembuf"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sembuf", TypeSize: 6}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "num", TypeSize: 2}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "op", TypeSize: 2}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semop_flags", FldName: "flg", TypeSize: 2}}, Vals: []uint64{2048, 4096}, BitMask: true},
+ }}},
+ {Key: StructKey{Name: "semid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "semid_ds", TypeSize: 88}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "otime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsems", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad0", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad1", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "send_msghdr"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "send_msghdr", TypeSize: 56}, Fields: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_name", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_namelen", TypeSize: 4}}, Buf: "msg_name"},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_iov", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "msg_iovlen", TypeSize: 8}}, Buf: "msg_iov"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg_control", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "cmsghdr"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "bytesize", FldName: "msg_controllen", TypeSize: 8}}, BitSize: 8, Buf: "msg_control"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "msg_flags", TypeSize: 4}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ }}},
+ {Key: StructKey{Name: "shmid_ds"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "shmid_ds", TypeSize: 112}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "ipc_perm"}, FldName: "perm"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "segsz", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "nattch", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "cpid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "lpid", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "atime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "dtime", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "ctime", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "unused0", TypeSize: 2}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 6}}, IsPad: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "unused1", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "unused2", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "sock_in6_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sock_in6_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "f0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "f1", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "sock_in_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sock_in_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "f0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "f1", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in", TypeSize: 12}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 2},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2}, ArgFormat: 1}, ValuesStart: 20000, ValuesPerProc: 4},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pad", TypeSize: 8}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 2},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, ValuesStart: 20000, ValuesPerProc: 4},
+ &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "pad", TypeSize: 8, ArgDir: 1}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 1, ArgDir: 1}}}, Kind: 1, RangeBegin: 8, RangeEnd: 8},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 12}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 24},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2}, ArgFormat: 1}, ValuesStart: 20000, ValuesPerProc: 4},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 24},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, ValuesStart: 20000, ValuesPerProc: 4},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "sockaddr_storage"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_storage", IsVarlen: true}, Fields: []Type{
+ &UnionType{Key: StructKey{Name: "sockaddr_un"}, FldName: "un"},
+ &StructType{Key: StructKey{Name: "sockaddr_in"}, FldName: "in"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6"}, FldName: "in6"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_storage", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_storage", ArgDir: 1, IsVarlen: true}, Fields: []Type{
+ &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}, FldName: "un"},
+ &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}, FldName: "in"},
+ &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, FldName: "in6"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un", IsVarlen: true}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_un_file"}, FldName: "file"},
+ &StructType{Key: StructKey{Name: "sockaddr_un_abstract"}, FldName: "abs"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un", ArgDir: 1, IsVarlen: true}, Fields: []Type{
+ &StructType{Key: StructKey{Name: "sockaddr_un_file", Dir: 1}, FldName: "file"},
+ &StructType{Key: StructKey{Name: "sockaddr_un_abstract", Dir: 1}, FldName: "abs"},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_abstract"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", TypeSize: 8}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2}}, Vals: []uint64{1, 0}, BitMask: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "ind", TypeSize: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 4}}, ValuesStart: 20000, ValuesPerProc: 4},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_abstract", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_abstract", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2, ArgDir: 1}}, Vals: []uint64{1, 0}, BitMask: true},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "ind", TypeSize: 1, ArgDir: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "id", TypeSize: 4, ArgDir: 1}}, ValuesStart: 20000, ValuesPerProc: 4},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_file"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", IsVarlen: true}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2}}, Vals: []uint64{1, 0}, BitMask: true},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "path", IsVarlen: true}, Kind: 3},
+ }}},
+ {Key: StructKey{Name: "sockaddr_un_file", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_un_file", ArgDir: 1, IsVarlen: true}, Fields: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_family", FldName: "family", TypeSize: 2, ArgDir: 1}}, Vals: []uint64{1, 0}, BitMask: true},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "filename", FldName: "path", ArgDir: 1, IsVarlen: true}, Kind: 3},
+ }}},
+ {Key: StructKey{Name: "stat", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "stat", TypeSize: 112, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "dev", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "ino", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "mode", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nlink", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "rdev", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "size", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "blksize", TypeSize: 4, ArgDir: 1}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 4}}, IsPad: true},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "blocks", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "atime", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "ansec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mtime", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "mnsec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "ctime", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "cnsec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pad1", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "pad2", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "termios"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "termios", TypeSize: 44}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "iflag", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "oflag", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "cflag", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "lflag", TypeSize: 4}}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "cc", TypeSize: 20}, Kind: 1, RangeBegin: 20, RangeEnd: 20},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ispeed", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ospeed", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "termios", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "termios", TypeSize: 44, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "iflag", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "oflag", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "cflag", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "lflag", TypeSize: 4, ArgDir: 1}}},
+ &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "cc", TypeSize: 20, ArgDir: 1}, Kind: 1, RangeBegin: 20, RangeEnd: 20},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ispeed", TypeSize: 4, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "ospeed", TypeSize: 4, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timespec"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timespec", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "timespec", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timespec", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "nsec", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timeval"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8}}},
+ }}},
+ {Key: StructKey{Name: "timeval", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8, ArgDir: 1}}},
+ }}},
+ {Key: StructKey{Name: "timeval", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "timeval", TypeSize: 16, ArgDir: 2}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "sec", TypeSize: 8, ArgDir: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "usec", TypeSize: 8, ArgDir: 2}}},
+ }}},
+ {Key: StructKey{Name: "tstamps"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "tstamps", TypeSize: 8}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "set", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "clr", TypeSize: 4}}},
+ }}},
+ {Key: StructKey{Name: "ucred"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }}},
+ {Key: StructKey{Name: "ucred", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "ucred", TypeSize: 12, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "unix_pair", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "unix_pair", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd0", TypeSize: 4, ArgDir: 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd1", TypeSize: 4, ArgDir: 1}},
+ }}},
+ {Key: StructKey{Name: "winsize"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "xpixel", TypeSize: 2}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "ypixel", TypeSize: 2}}},
+ }}},
+ {Key: StructKey{Name: "winsize", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "winsize", TypeSize: 8, ArgDir: 1}, Fields: []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "row", TypeSize: 2, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "col", TypeSize: 2, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "xpixel", TypeSize: 2, ArgDir: 1}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "ypixel", TypeSize: 2, ArgDir: 1}}},
+ }}},
+}
+
+var syscalls_amd64 = []*Syscall{
+ {NR: 30, Name: "accept", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 30, Name: "accept$inet", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 30, Name: "accept$inet6", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 30, Name: "accept$unix", CallName: "accept", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 104, Name: "bind", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 104, Name: "bind$inet", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 104, Name: "bind$inet6", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 104, Name: "bind$unix", CallName: "bind", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 12, Name: "chdir", CallName: "chdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dir", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 15, Name: "chmod", CallName: "chmod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }},
+ {NR: 16, Name: "chown", CallName: "chown", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {NR: 61, Name: "chroot", CallName: "chroot", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "dir", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 89, Name: "clock_getres", CallName: "clock_getres", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 2, 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {NR: 87, Name: "clock_gettime", CallName: "clock_gettime", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 2, 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {NR: 88, Name: "clock_settime", CallName: "clock_settime", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "clock_id", FldName: "id", TypeSize: 8}}, Vals: []uint64{0, 3, 2, 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ }},
+ {NR: 6, Name: "close", CallName: "close", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {NR: 98, Name: "connect", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 98, Name: "connect$inet", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 98, Name: "connect$inet6", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 98, Name: "connect$unix", CallName: "connect", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 41, Name: "dup", CallName: "dup", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 90, Name: "dup2", CallName: "dup2", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "newfd", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 59, Name: "execve", CallName: "execve", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "argv", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "envp", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}}}},
+ }},
+ {NR: 313, Name: "faccessat", CallName: "faccessat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pathname", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "faccessat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true},
+ }},
+ {NR: 13, Name: "fchdir", CallName: "fchdir", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {NR: 124, Name: "fchmod", CallName: "fchmod", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }},
+ {NR: 314, Name: "fchmodat", CallName: "fchmodat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "at_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2, 4}, BitMask: true},
+ }},
+ {NR: 123, Name: "fchown", CallName: "fchown", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {NR: 315, Name: "fchownat", CallName: "fchownat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "at_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2, 4}, BitMask: true},
+ }},
+ {NR: 92, Name: "fcntl$dupfd", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_dupfd", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{0, 10}, BitMask: true},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "arg", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 92, Name: "fcntl$getflags", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_getflags", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{1, 3}},
+ }},
+ {NR: 92, Name: "fcntl$getown", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 5},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 92, Name: "fcntl$lock", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_lock", FldName: "cmd", TypeSize: 8}}, Vals: []uint64{8, 9, 7}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "lock", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "flock"}}},
+ }},
+ {NR: 92, Name: "fcntl$setflags", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
+ }},
+ {NR: 92, Name: "fcntl$setown", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 6},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ }},
+ {NR: 92, Name: "fcntl$setstatus", CallName: "fcntl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fcntl_status", FldName: "flags", TypeSize: 8}}, Vals: []uint64{8, 64, 4, 128, 128}},
+ }},
+ {NR: 131, Name: "flock", CallName: "flock", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "flock_op", FldName: "op", TypeSize: 8}}, Vals: []uint64{1, 2, 8, 4}, BitMask: true},
+ }},
+ {NR: 95, Name: "fsync", CallName: "fsync", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ }},
+ {NR: 201, Name: "ftruncate", CallName: "ftruncate", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ }},
+ {NR: 99, Name: "getdents", CallName: "getdents", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "ent", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "ent"},
+ }},
+ {NR: 43, Name: "getegid", CallName: "getegid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 25, Name: "geteuid", CallName: "geteuid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 47, Name: "getgid", CallName: "getgid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 79, Name: "getgroups", CallName: "getgroups", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "list"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "list", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 2, IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", TypeSize: 4, ArgDir: 2}}}},
+ }},
+ {NR: 70, Name: "getitimer", CallName: "getitimer", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "getitimer_which", FldName: "which", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "cur", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval", Dir: 1}}},
+ }},
+ {NR: 31, Name: "getpeername", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {NR: 31, Name: "getpeername$inet", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {NR: 31, Name: "getpeername$inet6", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {NR: 31, Name: "getpeername$unix", CallName: "getpeername", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peer", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "peerlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "peer"}},
+ }},
+ {NR: 207, Name: "getpgid", CallName: "getpgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 81, Name: "getpgrp", CallName: "getpgrp", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 20, Name: "getpid", CallName: "getpid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 39, Name: "getppid", CallName: "getppid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 194, Name: "getrlimit", CallName: "getrlimit", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rlimit_type", FldName: "res", TypeSize: 8}}, Vals: []uint64{4, 0, 2, 1, 6, 8, 7, 5, 3, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rlim", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rlimit", Dir: 1}}},
+ }},
+ {NR: 19, Name: "getrusage", CallName: "getrusage", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rusage_who", FldName: "who", TypeSize: 8}}, Vals: []uint64{0, 18446744073709551615}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "usage", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rusage", Dir: 1}}},
+ }},
+ {NR: 32, Name: "getsockname", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {NR: 32, Name: "getsockname$inet", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {NR: 32, Name: "getsockname$inet6", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {NR: 32, Name: "getsockname$unix", CallName: "getsockname", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addrlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "addr"}},
+ }},
+ {NR: 118, Name: "getsockopt", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "level", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "optname", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 118, Name: "getsockopt$SO_PEERCRED", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 4130},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred", Dir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 118, Name: "getsockopt$inet_opts", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_ip_opts", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 118, Name: "getsockopt$sock_cred", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 4130},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 118, Name: "getsockopt$sock_int", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_int", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1, 4, 512, 8, 16, 128, 32, 256, 4097, 4098, 4099, 4100, 2048, 4104, 4103}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 118, Name: "getsockopt$sock_linger", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 128},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "linger", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 118, Name: "getsockopt$sock_timeval", CallName: "getsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_timeval", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4102, 4101}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval", Dir: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optlen", TypeSize: 8}, Type: &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", TypeSize: 4, ArgDir: 2}}, Buf: "optval"}},
+ }},
+ {NR: 24, Name: "getuid", CallName: "getuid", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 54, Name: "ioctl$TIOCCBRK", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900730},
+ }},
+ {NR: 54, Name: "ioctl$TIOCCDTR", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900728},
+ }},
+ {NR: 54, Name: "ioctl$TIOCCHKVERAUTH", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900638},
+ }},
+ {NR: 54, Name: "ioctl$TIOCCLRVERAUTH", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900637},
+ }},
+ {NR: 54, Name: "ioctl$TIOCCONS", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775586},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCDRAIN", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900702},
+ }},
+ {NR: 54, Name: "ioctl$TIOCEXCL", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900621},
+ }},
+ {NR: 54, Name: "ioctl$TIOCFLUSH", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775504},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCGETA", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1076655123},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "termios", Dir: 1}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCGETD", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074033690},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCGFLAGS", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074033757},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCGTSTAMP", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074820187},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval", Dir: 1}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCGWINSZ", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074295912},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "winsize", Dir: 1}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCMBIC", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775595},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCMBIS", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775596},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCMGET", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074033770},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCMSET", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775597},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCNOTTY", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900721},
+ }},
+ {NR: 54, Name: "ioctl$TIOCNXCL", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900622},
+ }},
+ {NR: 54, Name: "ioctl$TIOCOUTQ", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074033779},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSBRK", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900731},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSCTTY", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900705},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSDTR", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900729},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSETA", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2150396948},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "termios"}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSETAF", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2150396950},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "termios"}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSETAW", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2150396949},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "termios"}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSETD", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775515},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSETVERAUTH", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775516},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSFLAGS", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2147775580},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSPGRP", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1074033783},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSTART", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900718},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSTAT", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900709},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSTOP", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 536900719},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSTSTAMP", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148037722},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "tstamps"}}},
+ }},
+ {NR: 54, Name: "ioctl$TIOCSWINSZ", CallName: "ioctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2148037735},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "winsize"}}},
+ }},
+ {NR: 72, Name: "kevent", CallName: "kevent", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kqueue", FldName: "kd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "changelist", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "kevent"}}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nchanges", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "eventlist", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "kevent"}}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "nevents", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "timeout", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ }},
+ {NR: 269, Name: "kqueue", CallName: "kqueue", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_kqueue", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 254, Name: "lchown", CallName: "lchown", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {NR: 9, Name: "link", CallName: "link", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 317, Name: "linkat", CallName: "linkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "oldfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "linkat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4}, BitMask: true},
+ }},
+ {NR: 106, Name: "listen", CallName: "listen", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "backlog", TypeSize: 4}}},
+ }},
+ {NR: 199, Name: "lseek", CallName: "lseek", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "offset", TypeSize: 8}}, Kind: 1},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "seek_whence", FldName: "whence", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
+ }},
+ {NR: 40, Name: "lstat", CallName: "lstat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "statbuf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "stat", Dir: 1}}},
+ }},
+ {NR: 75, Name: "madvise", CallName: "madvise", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "madvise_flags", FldName: "advice", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4, 6}},
+ }},
+ {NR: 78, Name: "mincore", CallName: "mincore", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "vec", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 136, Name: "mkdir", CallName: "mkdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }},
+ {NR: 318, Name: "mkdirat", CallName: "mkdirat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }},
+ {NR: 14, Name: "mknod", CallName: "mknod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{61440, 32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "dev", TypeSize: 4}}},
+ }},
+ {NR: 14, Name: "mknod$loop", CallName: "mknod", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{61440, 32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "dev", TypeSize: 8}}, ValuesStart: 1792, ValuesPerProc: 2},
+ }},
+ {NR: 320, Name: "mknodat", CallName: "mknodat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dirfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mknod_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{61440, 32768, 8192, 24576, 4096, 49152, 256, 128, 64, 32, 16, 8, 4, 2, 1}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "dev", TypeSize: 4}}},
+ }},
+ {NR: 203, Name: "mlock", CallName: "mlock", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 271, Name: "mlockall", CallName: "mlockall", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mlockall_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{1, 2}, BitMask: true},
+ }},
+ {NR: 197, Name: "mmap", CallName: "mmap", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mmap_prot", FldName: "prot", TypeSize: 8}}, Vals: []uint64{4, 1, 2, 0}, BitMask: true},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mmap_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4096, 4096, 16, 2, 1}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "pad", TypeSize: 8}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "offset", TypeSize: 8}}, Kind: 1},
+ }},
+ {NR: 74, Name: "mprotect", CallName: "mprotect", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "mmap_prot", FldName: "prot", TypeSize: 8}}, Vals: []uint64{4, 1, 2, 0}, BitMask: true},
+ }},
+ {NR: 297, Name: "msgctl$IPC_RMID", CallName: "msgctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
+ }},
+ {NR: 297, Name: "msgctl$IPC_SET", CallName: "msgctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msqid_ds"}}},
+ }},
+ {NR: 297, Name: "msgctl$IPC_STAT", CallName: "msgctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 225, Name: "msgget", CallName: "msgget", Args: []Type{
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039379027, ValuesPerProc: 4},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 225, Name: "msgget$private", CallName: "msgget", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 227, Name: "msgrcv", CallName: "msgrcv", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msgp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msgbuf", Dir: 1}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "sz", TypeSize: 8}}, Buf: "msgp"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgbuf_type", FldName: "typ", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgrcv_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2048, 4096}, BitMask: true},
+ }},
+ {NR: 226, Name: "msgsnd", CallName: "msgsnd", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_msq", FldName: "msqid", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msgp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msgbuf"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "sz", TypeSize: 8}}, Buf: "msgp"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "msgsnd_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{2048}, BitMask: true},
+ }},
+ {NR: 204, Name: "munlock", CallName: "munlock", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 272, Name: "munlockall", CallName: "munlockall"},
+ {NR: 73, Name: "munmap", CallName: "munmap", Args: []Type{
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 91, Name: "nanosleep", CallName: "nanosleep", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "req", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timespec"}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rem", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "timespec", Dir: 1}}},
+ }},
+ {NR: 5, Name: "open", CallName: "open", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 5, Name: "open$dir", CallName: "open", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 321, Name: "openat", CallName: "openat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 8, 512, 1024, 2048, 16, 32, 256, 65536, 128, 128, 128, 32768, 131072, 64}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 263, Name: "pipe", CallName: "pipe", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
+ }},
+ {NR: 101, Name: "pipe2", CallName: "pipe2", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pipefd", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pipe_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{4, 65536}, BitMask: true},
+ }},
+ {NR: 108, Name: "pledge", CallName: "pledge", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "promises", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "execpromises", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", IsVarlen: true}, Kind: 2}},
+ }},
+ {NR: 252, Name: "poll", CallName: "poll", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "pollfd"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "nfds", TypeSize: 8}}, Buf: "fds"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "timeout", TypeSize: 4}}},
+ }},
+ {NR: 267, Name: "preadv", CallName: "preadv", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "off", TypeSize: 8}}, Kind: 1},
+ }},
+ {NR: 268, Name: "pwritev", CallName: "pwritev", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "fileoff", FldName: "off", TypeSize: 8}}, Kind: 1},
+ }},
+ {NR: 3, Name: "read", CallName: "read", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {NR: 58, Name: "readlink", CallName: "readlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "siz", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {NR: 322, Name: "readlinkat", CallName: "readlinkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "siz", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {NR: 120, Name: "readv", CallName: "readv", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_out"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ }},
+ {NR: 29, Name: "recvfrom", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 29, Name: "recvfrom$inet", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 29, Name: "recvfrom$inet6", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 29, Name: "recvfrom$unix", CallName: "recvfrom", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 27, Name: "recvmsg", CallName: "recvmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "recv_msghdr"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "recv_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{2048, 1, 2, 64}, BitMask: true},
+ }},
+ {NR: 128, Name: "rename", CallName: "rename", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 323, Name: "renameat", CallName: "renameat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "oldfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 137, Name: "rmdir", CallName: "rmdir", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 71, Name: "select", CallName: "select", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "n", TypeSize: 8}}, Buf: "inp"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "inp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "outp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "exp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "fd_set", Dir: 2}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "tvp", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval", Dir: 2}}},
+ }},
+ {NR: 442, Name: "semctl$GETALL", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 6},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$GETNCNT", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$GETPID", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$GETVAL", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 5},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$GETZCNT", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 7},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$IPC_RMID", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
+ }},
+ {NR: 442, Name: "semctl$IPC_SET", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "semid_ds"}}},
+ }},
+ {NR: 442, Name: "semctl$IPC_STAT", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "arg", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 442, Name: "semctl$SETALL", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "semnum", TypeSize: 8}}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 9},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", TypeSize: 2}}}}},
+ }},
+ {NR: 442, Name: "semctl$SETVAL", CallName: "semctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "semnum", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 8},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "arg", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ }},
+ {NR: 221, Name: "semget", CallName: "semget", Args: []Type{
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039359027, ValuesPerProc: 4},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "nsems", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 221, Name: "semget$private", CallName: "semget", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sem_sem_id", FldName: "nsems", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3, 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "semget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 290, Name: "semop", CallName: "semop", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_sem", FldName: "semid", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ops", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "sembuf"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "nops", TypeSize: 8}}, Buf: "ops"},
+ }},
+ {NR: 28, Name: "sendmsg", CallName: "sendmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "send_msghdr"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ }},
+ {NR: 28, Name: "sendmsg$unix", CallName: "sendmsg", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "msg", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "msghdr_un"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ }},
+ {NR: 133, Name: "sendto", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_storage"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 133, Name: "sendto$inet", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 133, Name: "sendto$inet6", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "sockaddr_in6"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 133, Name: "sendto$unix", CallName: "sendto", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Buf: "buf"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "send_flags", FldName: "f", TypeSize: 8}}, Vals: []uint64{1, 2, 4, 8, 1024}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "addr", TypeSize: 8, IsOptional: true}, Type: &UnionType{Key: StructKey{Name: "sockaddr_un"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "addrlen", TypeSize: 8}}, Buf: "addr"},
+ }},
+ {NR: 182, Name: "setegid", CallName: "setegid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "egid", TypeSize: 4}},
+ }},
+ {NR: 183, Name: "seteuid", CallName: "seteuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "euid", TypeSize: 4}},
+ }},
+ {NR: 181, Name: "setgid", CallName: "setgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "gid", TypeSize: 4}},
+ }},
+ {NR: 80, Name: "setgroups", CallName: "setgroups", Args: []Type{
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "list"},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "list", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", TypeSize: 4}}}},
+ }},
+ {NR: 69, Name: "setitimer", CallName: "setitimer", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "getitimer_which", FldName: "which", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "itimerval", Dir: 1}}},
+ }},
+ {NR: 82, Name: "setpgid", CallName: "setpgid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pgid", TypeSize: 4}},
+ }},
+ {NR: 127, Name: "setregid", CallName: "setregid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "rgid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "gid", FldName: "egid", TypeSize: 4}},
+ }},
+ {NR: 126, Name: "setreuid", CallName: "setreuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "ruid", TypeSize: 4}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "euid", TypeSize: 4}},
+ }},
+ {NR: 195, Name: "setrlimit", CallName: "setrlimit", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "rlimit_type", FldName: "res", TypeSize: 8}}, Vals: []uint64{4, 0, 2, 1, 6, 8, 7, 5, 3, 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "rlim", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "rlimit"}}},
+ }},
+ {NR: 105, Name: "setsockopt", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "level", TypeSize: 4}}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "optname", TypeSize: 4}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$inet6_MRT6_ADD_MFC", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 104},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mf6cctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$inet6_MRT6_ADD_MIF", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 102},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mif6ctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$inet6_MRT6_DEL_MFC", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 41},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 105},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "mf6cctl"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$inet_opts", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_ip_opts", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "optval", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$sock_cred", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 4130},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "ucred"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$sock_int", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_int", FldName: "optname", TypeSize: 8}}, Vals: []uint64{1, 4, 512, 8, 16, 128, 32, 256, 4097, 4098, 4099, 4100, 2048, 4104, 4103}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$sock_linger", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "optname", TypeSize: 8}}, Val: 128},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "linger"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 105, Name: "setsockopt$sock_timeval", CallName: "setsockopt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "level", TypeSize: 8}}, Val: 65535},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "sockopt_opt_sock_timeval", FldName: "optname", TypeSize: 8}}, Vals: []uint64{4102, 4101}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "optval", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "timeval"}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "optlen", TypeSize: 8}}, Buf: "optval"},
+ }},
+ {NR: 23, Name: "setuid", CallName: "setuid", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "uid", FldName: "uid", TypeSize: 4}},
+ }},
+ {NR: 228, Name: "shmat", CallName: "shmat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{8192, 4096}, BitMask: true},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "shmaddr", FldName: "ret", TypeSize: 8, ArgDir: 1}}},
+ {NR: 296, Name: "shmctl$IPC_RMID", CallName: "shmctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}},
+ }},
+ {NR: 296, Name: "shmctl$IPC_SET", CallName: "shmctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 1},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "buf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "shmid_ds"}}},
+ }},
+ {NR: 296, Name: "shmctl$IPC_STAT", CallName: "shmctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 2},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ }},
+ {NR: 296, Name: "shmctl$SHM_LOCK", CallName: "shmctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 3},
+ }},
+ {NR: 296, Name: "shmctl$SHM_UNLOCK", CallName: "shmctl", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "shmid", TypeSize: 4}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "cmd", TypeSize: 8}}, Val: 4},
+ }},
+ {NR: 230, Name: "shmdt", CallName: "shmdt", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "shmaddr", FldName: "addr", TypeSize: 8}},
+ }},
+ {NR: 289, Name: "shmget", CallName: "shmget", Args: []Type{
+ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "key", TypeSize: 8}}, ValuesStart: 2039339027, ValuesPerProc: 4},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "unused"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "unused", TypeSize: 8}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 289, Name: "shmget$private", CallName: "shmget", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "key", TypeSize: 8}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Buf: "unused"},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shmget_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{512, 1024, 256, 128, 64, 32, 16, 8, 4, 2, 1}, BitMask: true},
+ &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "unused", TypeSize: 8}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "ipc_shm", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 134, Name: "shutdown", CallName: "shutdown", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "fd", TypeSize: 4}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "shutdown_flags", FldName: "how", TypeSize: 8}}, Vals: []uint64{0, 1, 2}, BitMask: true},
+ }},
+ {NR: 97, Name: "socket", CallName: "socket", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_domain", FldName: "domain", TypeSize: 8}}, Vals: []uint64{1, 2, 24, 6, 32, 16}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 97, Name: "socket$inet", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 97, Name: "socket$inet6", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 24},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_in6", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 97, Name: "socket$unix", CallName: "socket", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 1},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 5}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}},
+ }, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "sock_unix", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 135, Name: "socketpair", CallName: "socketpair", Args: []Type{
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_domain", FldName: "domain", TypeSize: 8}}, Vals: []uint64{1, 2, 24, 6, 32, 16}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "pipefd", Dir: 1}}},
+ }},
+ {NR: 135, Name: "socketpair$inet", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 2},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sock_in_pair", Dir: 1}}},
+ }},
+ {NR: 135, Name: "socketpair$inet6", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 24},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 3, 4, 5, 16384, 32768}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "proto", TypeSize: 1}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "sock_in6_pair", Dir: 1}}},
+ }},
+ {NR: 135, Name: "socketpair$unix", CallName: "socketpair", Args: []Type{
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "domain", TypeSize: 8}}, Val: 1},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unix_socket_type", FldName: "type", TypeSize: 8}}, Vals: []uint64{1, 2, 5}},
+ &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "proto", TypeSize: 8}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "fds", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "unix_pair", Dir: 1}}},
+ }},
+ {NR: 38, Name: "stat", CallName: "stat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "statbuf", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "stat", Dir: 1}}},
+ }},
+ {NR: 57, Name: "symlink", CallName: "symlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 324, Name: "symlinkat", CallName: "symlinkat", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "old", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "newfd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "new", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 36, Name: "sync", CallName: "sync"},
+ {Name: "syz_open_pts", CallName: "syz_open_pts", Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_tty", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
+ {NR: 200, Name: "truncate", CallName: "truncate", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "file", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "len", TypeSize: 8}}},
+ }},
+ {NR: 10, Name: "unlink", CallName: "unlink", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ }},
+ {NR: 325, Name: "unlinkat", CallName: "unlinkat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "unlinkat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 8}, BitMask: true},
+ }},
+ {NR: 114, Name: "unveil", CallName: "unveil", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "permissions", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "string", TypeSize: 2}, Kind: 2, SubKind: "unveil_permissions", Values: []string{"r\x00", "W\x00", "x\x00", "c\x00"}}},
+ }},
+ {NR: 84, Name: "utimensat", CallName: "utimensat", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd_dir", FldName: "dir", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "pathname", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "times", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "utimensat_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 2}, BitMask: true},
+ }},
+ {NR: 76, Name: "utimes", CallName: "utimes", Args: []Type{
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "filename", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "times", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "itimerval"}}},
+ }},
+ {NR: 11, Name: "wait4", CallName: "wait4", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "pid", FldName: "pid", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "status", TypeSize: 8, IsOptional: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", TypeSize: 4, ArgDir: 1}}}},
+ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "wait_options", FldName: "options", TypeSize: 8}}, Vals: []uint64{8, 1, 2}, BitMask: true},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "ru", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "rusage", Dir: 1}}},
+ }},
+ {NR: 4, Name: "write", CallName: "write", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "buf", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{IsVarlen: true}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "count", TypeSize: 8}}, Buf: "buf"},
+ }},
+ {NR: 121, Name: "writev", CallName: "writev", Args: []Type{
+ &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "fd", TypeSize: 4}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, Type: &ArrayType{TypeCommon: TypeCommon{TypeName: "array", IsVarlen: true}, Type: &StructType{Key: StructKey{Name: "iovec_in"}}}},
+ &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "vlen", TypeSize: 8}}, Buf: "vec"},
+ }},
+}
+
+var consts_amd64 = []ConstValue{
+ {Name: "AF_APPLETALK", Value: 16},
+ {Name: "AF_BLUETOOTH", Value: 32},
+ {Name: "AF_INET", Value: 2},
+ {Name: "AF_INET6", Value: 24},
+ {Name: "AF_LOCAL", Value: 1},
+ {Name: "AF_NS", Value: 6},
+ {Name: "AF_UNIX", Value: 1},
+ {Name: "AF_UNSPEC"},
+ {Name: "AT_EACCESS", Value: 1},
+ {Name: "AT_FDCWD", Value: 18446744073709551516},
+ {Name: "AT_REMOVEDIR", Value: 8},
+ {Name: "AT_SYMLINK_FOLLOW", Value: 4},
+ {Name: "AT_SYMLINK_NOFOLLOW", Value: 2},
+ {Name: "CLOCK_MONOTONIC", Value: 3},
+ {Name: "CLOCK_PROCESS_CPUTIME_ID", Value: 2},
+ {Name: "CLOCK_REALTIME"},
+ {Name: "CLOCK_THREAD_CPUTIME_ID", Value: 4},
+ {Name: "EVFILT_AIO", Value: 18446744073709551613},
+ {Name: "EVFILT_DEVICE", Value: 18446744073709551608},
+ {Name: "EVFILT_PROC", Value: 18446744073709551611},
+ {Name: "EVFILT_READ", Value: 18446744073709551615},
+ {Name: "EVFILT_SIGNAL", Value: 18446744073709551610},
+ {Name: "EVFILT_TIMER", Value: 18446744073709551609},
+ {Name: "EVFILT_VNODE", Value: 18446744073709551612},
+ {Name: "EVFILT_WRITE", Value: 18446744073709551614},
+ {Name: "EV_ADD", Value: 1},
+ {Name: "EV_CLEAR", Value: 32},
+ {Name: "EV_DELETE", Value: 2},
+ {Name: "EV_DISABLE", Value: 8},
+ {Name: "EV_DISPATCH", Value: 128},
+ {Name: "EV_ENABLE", Value: 4},
+ {Name: "EV_ONESHOT", Value: 16},
+ {Name: "EV_RECEIPT", Value: 64},
+ {Name: "FD_CLOEXEC", Value: 1},
+ {Name: "F_DUPFD"},
+ {Name: "F_DUPFD_CLOEXEC", Value: 10},
+ {Name: "F_GETFD", Value: 1},
+ {Name: "F_GETFL", Value: 3},
+ {Name: "F_GETLK", Value: 7},
+ {Name: "F_GETOWN", Value: 5},
+ {Name: "F_RDLCK", Value: 1},
+ {Name: "F_SETFD", Value: 2},
+ {Name: "F_SETFL", Value: 4},
+ {Name: "F_SETLK", Value: 8},
+ {Name: "F_SETLKW", Value: 9},
+ {Name: "F_SETOWN", Value: 6},
+ {Name: "F_UNLCK", Value: 2},
+ {Name: "F_WRLCK", Value: 3},
+ {Name: "GETALL", Value: 6},
+ {Name: "GETNCNT", Value: 3},
+ {Name: "GETPID", Value: 4},
+ {Name: "GETVAL", Value: 5},
+ {Name: "GETZCNT", Value: 7},
+ {Name: "IPC_CREAT", Value: 512},
+ {Name: "IPC_EXCL", Value: 1024},
+ {Name: "IPC_NOWAIT", Value: 2048},
+ {Name: "IPC_PRIVATE"},
+ {Name: "IPC_RMID"},
+ {Name: "IPC_SET", Value: 1},
+ {Name: "IPC_STAT", Value: 2},
+ {Name: "IPPROTO_ICMP", Value: 1},
+ {Name: "IPPROTO_IP"},
+ {Name: "IPPROTO_IPV6", Value: 41},
+ {Name: "IP_OPTIONS", Value: 1},
+ {Name: "ITIMER_PROF", Value: 2},
+ {Name: "ITIMER_REAL"},
+ {Name: "ITIMER_VIRTUAL", Value: 1},
+ {Name: "LOCK_EX", Value: 2},
+ {Name: "LOCK_NB", Value: 4},
+ {Name: "LOCK_SH", Value: 1},
+ {Name: "LOCK_UN", Value: 8},
+ {Name: "MADV_DONTNEED", Value: 4},
+ {Name: "MADV_FREE", Value: 6},
+ {Name: "MADV_NORMAL"},
+ {Name: "MADV_RANDOM", Value: 1},
+ {Name: "MADV_SEQUENTIAL", Value: 2},
+ {Name: "MADV_WILLNEED", Value: 3},
+ {Name: "MAP_ANON", Value: 4096},
+ {Name: "MAP_ANONYMOUS", Value: 4096},
+ {Name: "MAP_FIXED", Value: 16},
+ {Name: "MAP_PRIVATE", Value: 2},
+ {Name: "MAP_SHARED", Value: 1},
+ {Name: "MCL_CURRENT", Value: 1},
+ {Name: "MCL_FUTURE", Value: 2},
+ {Name: "MIFF_REGISTER", Value: 1},
+ {Name: "MRT6_ADD_MFC", Value: 104},
+ {Name: "MRT6_ADD_MIF", Value: 102},
+ {Name: "MRT6_DEL_MFC", Value: 105},
+ {Name: "MSG_CMSG_CLOEXEC", Value: 2048},
+ {Name: "MSG_DONTROUTE", Value: 4},
+ {Name: "MSG_EOR", Value: 8},
+ {Name: "MSG_NOERROR", Value: 4096},
+ {Name: "MSG_NOSIGNAL", Value: 1024},
+ {Name: "MSG_OOB", Value: 1},
+ {Name: "MSG_PEEK", Value: 2},
+ {Name: "MSG_WAITALL", Value: 64},
+ {Name: "NCCS", Value: 20},
+ {Name: "NOTE_ATTRIB", Value: 8},
+ {Name: "NOTE_CHANGE", Value: 1},
+ {Name: "NOTE_CHILD", Value: 4},
+ {Name: "NOTE_DELETE", Value: 1},
+ {Name: "NOTE_EOF", Value: 2},
+ {Name: "NOTE_EXEC", Value: 536870912},
+ {Name: "NOTE_EXIT", Value: 2147483648},
+ {Name: "NOTE_EXTEND", Value: 4},
+ {Name: "NOTE_FORK", Value: 1073741824},
+ {Name: "NOTE_LINK", Value: 16},
+ {Name: "NOTE_LOWAT", Value: 1},
+ {Name: "NOTE_PCTRLMASK", Value: 4026531840},
+ {Name: "NOTE_PDATAMASK", Value: 1048575},
+ {Name: "NOTE_RENAME", Value: 32},
+ {Name: "NOTE_REVOKE", Value: 64},
+ {Name: "NOTE_TRACK", Value: 1},
+ {Name: "NOTE_TRACKERR", Value: 2},
+ {Name: "NOTE_TRUNCATE", Value: 128},
+ {Name: "NOTE_WRITE", Value: 2},
+ {Name: "O_APPEND", Value: 8},
+ {Name: "O_ASYNC", Value: 64},
+ {Name: "O_CLOEXEC", Value: 65536},
+ {Name: "O_CREAT", Value: 512},
+ {Name: "O_DIRECTORY", Value: 131072},
+ {Name: "O_DSYNC", Value: 128},
+ {Name: "O_EXCL", Value: 2048},
+ {Name: "O_EXLOCK", Value: 32},
+ {Name: "O_NOCTTY", Value: 32768},
+ {Name: "O_NOFOLLOW", Value: 256},
+ {Name: "O_NONBLOCK", Value: 4},
+ {Name: "O_RDONLY"},
+ {Name: "O_RDWR", Value: 2},
+ {Name: "O_RSYNC", Value: 128},
+ {Name: "O_SHLOCK", Value: 16},
+ {Name: "O_SYNC", Value: 128},
+ {Name: "O_TRUNC", Value: 1024},
+ {Name: "O_WRONLY", Value: 1},
+ {Name: "POLLERR", Value: 8},
+ {Name: "POLLHUP", Value: 16},
+ {Name: "POLLIN", Value: 1},
+ {Name: "POLLNVAL", Value: 32},
+ {Name: "POLLOUT", Value: 4},
+ {Name: "POLLPRI", Value: 2},
+ {Name: "POLLRDBAND", Value: 128},
+ {Name: "POLLRDNORM", Value: 64},
+ {Name: "POLLWRBAND", Value: 256},
+ {Name: "POLLWRNORM", Value: 4},
+ {Name: "PROT_EXEC", Value: 4},
+ {Name: "PROT_NONE"},
+ {Name: "PROT_READ", Value: 1},
+ {Name: "PROT_WRITE", Value: 2},
+ {Name: "RLIMIT_CORE", Value: 4},
+ {Name: "RLIMIT_CPU"},
+ {Name: "RLIMIT_DATA", Value: 2},
+ {Name: "RLIMIT_FSIZE", Value: 1},
+ {Name: "RLIMIT_MEMLOCK", Value: 6},
+ {Name: "RLIMIT_NOFILE", Value: 8},
+ {Name: "RLIMIT_NPROC", Value: 7},
+ {Name: "RLIMIT_RSS", Value: 5},
+ {Name: "RLIMIT_STACK", Value: 3},
+ {Name: "RUSAGE_CHILDREN", Value: 18446744073709551615},
+ {Name: "RUSAGE_SELF"},
+ {Name: "SCM_RIGHTS", Value: 1},
+ {Name: "SEEK_CUR", Value: 1},
+ {Name: "SEEK_END", Value: 2},
+ {Name: "SEEK_SET"},
+ {Name: "SEM_UNDO", Value: 4096},
+ {Name: "SETALL", Value: 9},
+ {Name: "SETVAL", Value: 8},
+ {Name: "SHM_LOCK", Value: 3},
+ {Name: "SHM_RDONLY", Value: 4096},
+ {Name: "SHM_RND", Value: 8192},
+ {Name: "SHM_UNLOCK", Value: 4},
+ {Name: "SHUT_RD"},
+ {Name: "SHUT_RDWR", Value: 2},
+ {Name: "SHUT_WR", Value: 1},
+ {Name: "SOCK_CLOEXEC", Value: 32768},
+ {Name: "SOCK_DGRAM", Value: 2},
+ {Name: "SOCK_NONBLOCK", Value: 16384},
+ {Name: "SOCK_RAW", Value: 3},
+ {Name: "SOCK_RDM", Value: 4},
+ {Name: "SOCK_SEQPACKET", Value: 5},
+ {Name: "SOCK_STREAM", Value: 1},
+ {Name: "SOL_SOCKET", Value: 65535},
+ {Name: "SO_BROADCAST", Value: 32},
+ {Name: "SO_DEBUG", Value: 1},
+ {Name: "SO_DONTROUTE", Value: 16},
+ {Name: "SO_ERROR", Value: 4103},
+ {Name: "SO_KEEPALIVE", Value: 8},
+ {Name: "SO_LINGER", Value: 128},
+ {Name: "SO_OOBINLINE", Value: 256},
+ {Name: "SO_PEERCRED", Value: 4130},
+ {Name: "SO_RCVBUF", Value: 4098},
+ {Name: "SO_RCVLOWAT", Value: 4100},
+ {Name: "SO_RCVTIMEO", Value: 4102},
+ {Name: "SO_REUSEADDR", Value: 4},
+ {Name: "SO_REUSEPORT", Value: 512},
+ {Name: "SO_SNDBUF", Value: 4097},
+ {Name: "SO_SNDLOWAT", Value: 4099},
+ {Name: "SO_SNDTIMEO", Value: 4101},
+ {Name: "SO_TIMESTAMP", Value: 2048},
+ {Name: "SO_TYPE", Value: 4104},
+ {Name: "SYS_accept", Value: 30},
+ {Name: "SYS_bind", Value: 104},
+ {Name: "SYS_chdir", Value: 12},
+ {Name: "SYS_chmod", Value: 15},
+ {Name: "SYS_chown", Value: 16},
+ {Name: "SYS_chroot", Value: 61},
+ {Name: "SYS_clock_getres", Value: 89},
+ {Name: "SYS_clock_gettime", Value: 87},
+ {Name: "SYS_clock_settime", Value: 88},
+ {Name: "SYS_close", Value: 6},
+ {Name: "SYS_connect", Value: 98},
+ {Name: "SYS_dup", Value: 41},
+ {Name: "SYS_dup2", Value: 90},
+ {Name: "SYS_execve", Value: 59},
+ {Name: "SYS_faccessat", Value: 313},
+ {Name: "SYS_fchdir", Value: 13},
+ {Name: "SYS_fchmod", Value: 124},
+ {Name: "SYS_fchmodat", Value: 314},
+ {Name: "SYS_fchown", Value: 123},
+ {Name: "SYS_fchownat", Value: 315},
+ {Name: "SYS_fcntl", Value: 92},
+ {Name: "SYS_flock", Value: 131},
+ {Name: "SYS_fsync", Value: 95},
+ {Name: "SYS_ftruncate", Value: 201},
+ {Name: "SYS_getdents", Value: 99},
+ {Name: "SYS_getegid", Value: 43},
+ {Name: "SYS_geteuid", Value: 25},
+ {Name: "SYS_getgid", Value: 47},
+ {Name: "SYS_getgroups", Value: 79},
+ {Name: "SYS_getitimer", Value: 70},
+ {Name: "SYS_getpeername", Value: 31},
+ {Name: "SYS_getpgid", Value: 207},
+ {Name: "SYS_getpgrp", Value: 81},
+ {Name: "SYS_getpid", Value: 20},
+ {Name: "SYS_getppid", Value: 39},
+ {Name: "SYS_getrlimit", Value: 194},
+ {Name: "SYS_getrusage", Value: 19},
+ {Name: "SYS_getsockname", Value: 32},
+ {Name: "SYS_getsockopt", Value: 118},
+ {Name: "SYS_getuid", Value: 24},
+ {Name: "SYS_ioctl", Value: 54},
+ {Name: "SYS_kevent", Value: 72},
+ {Name: "SYS_kqueue", Value: 269},
+ {Name: "SYS_lchown", Value: 254},
+ {Name: "SYS_link", Value: 9},
+ {Name: "SYS_linkat", Value: 317},
+ {Name: "SYS_listen", Value: 106},
+ {Name: "SYS_lseek", Value: 199},
+ {Name: "SYS_lstat", Value: 40},
+ {Name: "SYS_madvise", Value: 75},
+ {Name: "SYS_mincore", Value: 78},
+ {Name: "SYS_mkdir", Value: 136},
+ {Name: "SYS_mkdirat", Value: 318},
+ {Name: "SYS_mknod", Value: 14},
+ {Name: "SYS_mknodat", Value: 320},
+ {Name: "SYS_mlock", Value: 203},
+ {Name: "SYS_mlockall", Value: 271},
+ {Name: "SYS_mmap", Value: 197},
+ {Name: "SYS_mprotect", Value: 74},
+ {Name: "SYS_msgctl", Value: 297},
+ {Name: "SYS_msgget", Value: 225},
+ {Name: "SYS_msgrcv", Value: 227},
+ {Name: "SYS_msgsnd", Value: 226},
+ {Name: "SYS_munlock", Value: 204},
+ {Name: "SYS_munlockall", Value: 272},
+ {Name: "SYS_munmap", Value: 73},
+ {Name: "SYS_nanosleep", Value: 91},
+ {Name: "SYS_open", Value: 5},
+ {Name: "SYS_openat", Value: 321},
+ {Name: "SYS_pipe", Value: 263},
+ {Name: "SYS_pipe2", Value: 101},
+ {Name: "SYS_pledge", Value: 108},
+ {Name: "SYS_poll", Value: 252},
+ {Name: "SYS_preadv", Value: 267},
+ {Name: "SYS_pwritev", Value: 268},
+ {Name: "SYS_read", Value: 3},
+ {Name: "SYS_readlink", Value: 58},
+ {Name: "SYS_readlinkat", Value: 322},
+ {Name: "SYS_readv", Value: 120},
+ {Name: "SYS_recvfrom", Value: 29},
+ {Name: "SYS_recvmsg", Value: 27},
+ {Name: "SYS_rename", Value: 128},
+ {Name: "SYS_renameat", Value: 323},
+ {Name: "SYS_rmdir", Value: 137},
+ {Name: "SYS_select", Value: 71},
+ {Name: "SYS_semctl", Value: 442},
+ {Name: "SYS_semget", Value: 221},
+ {Name: "SYS_semop", Value: 290},
+ {Name: "SYS_sendmsg", Value: 28},
+ {Name: "SYS_sendto", Value: 133},
+ {Name: "SYS_setegid", Value: 182},
+ {Name: "SYS_seteuid", Value: 183},
+ {Name: "SYS_setgid", Value: 181},
+ {Name: "SYS_setgroups", Value: 80},
+ {Name: "SYS_setitimer", Value: 69},
+ {Name: "SYS_setpgid", Value: 82},
+ {Name: "SYS_setregid", Value: 127},
+ {Name: "SYS_setreuid", Value: 126},
+ {Name: "SYS_setrlimit", Value: 195},
+ {Name: "SYS_setsockopt", Value: 105},
+ {Name: "SYS_setuid", Value: 23},
+ {Name: "SYS_shmat", Value: 228},
+ {Name: "SYS_shmctl", Value: 296},
+ {Name: "SYS_shmdt", Value: 230},
+ {Name: "SYS_shmget", Value: 289},
+ {Name: "SYS_shutdown", Value: 134},
+ {Name: "SYS_socket", Value: 97},
+ {Name: "SYS_socketpair", Value: 135},
+ {Name: "SYS_stat", Value: 38},
+ {Name: "SYS_symlink", Value: 57},
+ {Name: "SYS_symlinkat", Value: 324},
+ {Name: "SYS_sync", Value: 36},
+ {Name: "SYS_truncate", Value: 200},
+ {Name: "SYS_unlink", Value: 10},
+ {Name: "SYS_unlinkat", Value: 325},
+ {Name: "SYS_unveil", Value: 114},
+ {Name: "SYS_utimensat", Value: 84},
+ {Name: "SYS_utimes", Value: 76},
+ {Name: "SYS_wait4", Value: 11},
+ {Name: "SYS_write", Value: 4},
+ {Name: "SYS_writev", Value: 121},
+ {Name: "S_IFBLK", Value: 24576},
+ {Name: "S_IFCHR", Value: 8192},
+ {Name: "S_IFIFO", Value: 4096},
+ {Name: "S_IFMT", Value: 61440},
+ {Name: "S_IFREG", Value: 32768},
+ {Name: "S_IFSOCK", Value: 49152},
+ {Name: "S_IRGRP", Value: 32},
+ {Name: "S_IROTH", Value: 4},
+ {Name: "S_IRUSR", Value: 256},
+ {Name: "S_IWGRP", Value: 16},
+ {Name: "S_IWOTH", Value: 2},
+ {Name: "S_IWUSR", Value: 128},
+ {Name: "S_IXGRP", Value: 8},
+ {Name: "S_IXOTH", Value: 1},
+ {Name: "S_IXUSR", Value: 64},
+ {Name: "TIOCCBRK", Value: 536900730},
+ {Name: "TIOCCDTR", Value: 536900728},
+ {Name: "TIOCCHKVERAUTH", Value: 536900638},
+ {Name: "TIOCCLRVERAUTH", Value: 536900637},
+ {Name: "TIOCCONS", Value: 2147775586},
+ {Name: "TIOCDRAIN", Value: 536900702},
+ {Name: "TIOCEXCL", Value: 536900621},
+ {Name: "TIOCFLUSH", Value: 2147775504},
+ {Name: "TIOCGETA", Value: 1076655123},
+ {Name: "TIOCGETD", Value: 1074033690},
+ {Name: "TIOCGFLAGS", Value: 1074033757},
+ {Name: "TIOCGPGRP", Value: 1074033783},
+ {Name: "TIOCGTSTAMP", Value: 1074820187},
+ {Name: "TIOCGWINSZ", Value: 1074295912},
+ {Name: "TIOCMBIC", Value: 2147775595},
+ {Name: "TIOCMBIS", Value: 2147775596},
+ {Name: "TIOCMGET", Value: 1074033770},
+ {Name: "TIOCMSET", Value: 2147775597},
+ {Name: "TIOCNOTTY", Value: 536900721},
+ {Name: "TIOCNXCL", Value: 536900622},
+ {Name: "TIOCOUTQ", Value: 1074033779},
+ {Name: "TIOCSBRK", Value: 536900731},
+ {Name: "TIOCSCTTY", Value: 536900705},
+ {Name: "TIOCSDTR", Value: 536900729},
+ {Name: "TIOCSETA", Value: 2150396948},
+ {Name: "TIOCSETAF", Value: 2150396950},
+ {Name: "TIOCSETAW", Value: 2150396949},
+ {Name: "TIOCSETD", Value: 2147775515},
+ {Name: "TIOCSETVERAUTH", Value: 2147775516},
+ {Name: "TIOCSFLAGS", Value: 2147775580},
+ {Name: "TIOCSTART", Value: 536900718},
+ {Name: "TIOCSTAT", Value: 536900709},
+ {Name: "TIOCSTOP", Value: 536900719},
+ {Name: "TIOCSTSTAMP", Value: 2148037722},
+ {Name: "TIOCSWINSZ", Value: 2148037735},
+ {Name: "WCONTINUED", Value: 8},
+ {Name: "WNOHANG", Value: 1},
+ {Name: "WUNTRACED", Value: 2},
+}
+
+const revision_amd64 = "f1bde02bbb60bf849ed61dda9a552900891199ef"
diff --git a/sys/openbsd/gen/empty.go b/sys/openbsd/gen/empty.go
new file mode 100644
index 000000000..5baff07bf
--- /dev/null
+++ b/sys/openbsd/gen/empty.go
@@ -0,0 +1,3 @@
+// AUTOGENERATED FILE
+// This file is needed if OS is completely excluded by build tags.
+package gen
diff --git a/sys/openbsd/init.go b/sys/openbsd/init.go
new file mode 100644
index 000000000..ac06ad644
--- /dev/null
+++ b/sys/openbsd/init.go
@@ -0,0 +1,49 @@
+// Copyright 2017 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+package openbsd
+
+import (
+ "github.com/google/syzkaller/prog"
+ "github.com/google/syzkaller/sys/targets"
+)
+
+func InitTarget(target *prog.Target) {
+ arch := &arch{
+ unix: targets.MakeUnixSanitizer(target),
+ }
+
+ target.MakeMmap = targets.MakePosixMmap(target)
+ target.SanitizeCall = arch.SanitizeCall
+}
+
+type arch struct {
+ unix *targets.UnixSanitizer
+}
+
+func (arch *arch) SanitizeCall(c *prog.Call) {
+ arch.unix.SanitizeCall(c)
+
+ // Prevent vnodes of type VBAD from being created. Such vnodes will
+ // likely trigger assertion errors by the kernel.
+ pos := 1
+ switch c.Meta.CallName {
+ case "mknodat":
+ pos = 2
+ fallthrough
+ case "mknod":
+ mode := c.Args[pos].(*prog.ConstArg)
+ if (mode.Val & arch.unix.S_IFMT) != arch.unix.S_IFMT {
+ return
+ }
+ saneMode := mode.Val & ^arch.unix.S_IFMT
+ switch {
+ case (mode.Val & arch.unix.S_IFCHR) == arch.unix.S_IFCHR:
+ mode.Val = saneMode | arch.unix.S_IFCHR
+ case (mode.Val & arch.unix.S_IFBLK) == arch.unix.S_IFBLK:
+ mode.Val = saneMode | arch.unix.S_IFBLK
+ case (mode.Val & arch.unix.S_IFIFO) == arch.unix.S_IFIFO:
+ mode.Val = saneMode | arch.unix.S_IFIFO
+ }
+ }
+}
diff --git a/sys/openbsd/ipc.txt b/sys/openbsd/ipc.txt
new file mode 100644
index 000000000..4ab221e34
--- /dev/null
+++ b/sys/openbsd/ipc.txt
@@ -0,0 +1,125 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/fcntl.h>
+include <sys/stat.h>
+include <sys/ipc.h>
+include <sys/shm.h>
+include <sys/msg.h>
+include <sys/sem.h>
+
+resource ipc[int32]: 0, 0xffffffffffffffff
+
+# TODO: describe ipc syscall
+
+define SYS____semctl50 442
+
+resource ipc_msq[ipc]
+msgget(key proc[2039379027, 4], flags flags[msgget_flags]) ipc_msq
+msgget$private(key const[IPC_PRIVATE], flags flags[msgget_flags]) ipc_msq
+msgsnd(msqid ipc_msq, msgp ptr[in, msgbuf], sz len[msgp], flags flags[msgsnd_flags])
+msgrcv(msqid ipc_msq, msgp ptr[out, msgbuf], sz len[msgp], typ flags[msgbuf_type], flags flags[msgrcv_flags])
+msgctl$IPC_STAT(msqid ipc_msq, cmd const[IPC_STAT], buf buffer[out])
+msgctl$IPC_SET(msqid ipc_msq, cmd const[IPC_SET], buf ptr[in, msqid_ds])
+msgctl$IPC_RMID(msqid ipc_msq, cmd const[IPC_RMID])
+
+resource ipc_sem[ipc]
+semget(key proc[2039359027, 4], nsems flags[sem_sem_id], flags flags[semget_flags]) ipc_sem
+semget$private(key const[IPC_PRIVATE], nsems flags[sem_sem_id], flags flags[semget_flags]) ipc_sem
+semop(semid ipc_sem, ops ptr[in, array[sembuf]], nops len[ops])
+semctl$IPC_STAT(semid ipc_sem, semnum const[0], cmd const[IPC_STAT], arg buffer[out])
+semctl$IPC_SET(semid ipc_sem, semnum const[0], cmd const[IPC_SET], arg ptr[in, semid_ds])
+semctl$IPC_RMID(semid ipc_sem, semnum const[0], cmd const[IPC_RMID])
+semctl$GETALL(semid ipc_sem, semnum const[0], cmd const[GETALL], arg buffer[out])
+semctl$GETNCNT(semid ipc_sem, semnum flags[sem_sem_id], cmd const[GETNCNT], arg buffer[out])
+semctl$GETPID(semid ipc_sem, semnum flags[sem_sem_id], cmd const[GETPID], arg buffer[out])
+semctl$GETVAL(semid ipc_sem, semnum flags[sem_sem_id], cmd const[GETVAL], arg buffer[out])
+semctl$GETZCNT(semid ipc_sem, semnum flags[sem_sem_id], cmd const[GETZCNT], arg buffer[out])
+semctl$SETALL(semid ipc_sem, semnum const[0], cmd const[SETALL], arg ptr[in, array[int16]])
+semctl$SETVAL(semid ipc_sem, semnum flags[sem_sem_id], cmd const[SETVAL], arg ptr[in, int32])
+
+resource ipc_shm[ipc]
+resource shmaddr[intptr]: 0
+# The unused arg is unused by syscall (does not exist at all),
+# but it helps to generate sane size values.
+shmget(key proc[2039339027, 4], size len[unused], flags flags[shmget_flags], unused vma) ipc_shm
+shmget$private(key const[IPC_PRIVATE], size len[unused], flags flags[shmget_flags], unused vma) ipc_shm
+shmat(shmid ipc_shm, addr vma, flags flags[shmat_flags]) shmaddr
+shmctl$IPC_STAT(shmid ipc_shm, cmd const[IPC_STAT], buf buffer[out])
+shmctl$IPC_SET(shmid ipc_shm, cmd const[IPC_SET], buf ptr[in, shmid_ds])
+shmctl$IPC_RMID(shmid ipc_shm, cmd const[IPC_RMID])
+shmctl$SHM_LOCK(shmid ipc_shm, cmd const[SHM_LOCK])
+shmctl$SHM_UNLOCK(shmid ipc_shm, cmd const[SHM_UNLOCK])
+shmdt(addr shmaddr)
+
+msgget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+msgbuf_type = 0, 1, 2, 3
+msgsnd_flags = IPC_NOWAIT
+msgrcv_flags = IPC_NOWAIT, MSG_NOERROR
+semget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+semop_flags = IPC_NOWAIT, SEM_UNDO
+sem_sem_id = 0, 1, 2, 3, 4
+shmget_flags = IPC_CREAT, IPC_EXCL, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+shmat_flags = SHM_RND, SHM_RDONLY
+
+ipc_perm {
+ key int32
+ uid uid
+ gid gid
+ cuid uid
+ cgid gid
+ mode flags[open_mode, int32]
+ seq int16
+ pad0 const[0, int16]
+ pad1 const[0, intptr]
+ pad2 const[0, intptr]
+}
+
+msqid_ds {
+ perm ipc_perm
+ qnum intptr
+ qbytes intptr
+ lspid pid
+ lrpid pid
+ stime intptr
+ rtime intptr
+ ctime intptr
+ cbytes intptr
+ pad0 const[0, intptr]
+ pad1 const[0, intptr]
+}
+
+shmid_ds {
+ perm ipc_perm
+ segsz int32
+ nattch int16
+ cpid pid
+ lpid pid
+ atime intptr
+ dtime intptr
+ ctime intptr
+ unused0 const[0, int16]
+ unused1 const[0, intptr]
+ unused2 const[0, intptr]
+}
+
+semid_ds {
+ perm ipc_perm
+ otime intptr
+ ctime intptr
+ nsems intptr
+ pad0 const[0, intptr]
+ pad1 const[0, intptr]
+}
+
+sembuf {
+ num flags[sem_sem_id, int16]
+ op int16
+ flg flags[semop_flags, int16]
+}
+
+msgbuf {
+ typ flags[msgbuf_type, intptr]
+ data array[int8]
+} [packed]
diff --git a/sys/openbsd/ipc_amd64.const b/sys/openbsd/ipc_amd64.const
new file mode 100644
index 000000000..e592bc589
--- /dev/null
+++ b/sys/openbsd/ipc_amd64.const
@@ -0,0 +1,41 @@
+# AUTOGENERATED FILE
+GETALL = 6
+GETNCNT = 3
+GETPID = 4
+GETVAL = 5
+GETZCNT = 7
+IPC_CREAT = 512
+IPC_EXCL = 1024
+IPC_NOWAIT = 2048
+IPC_PRIVATE = 0
+IPC_RMID = 0
+IPC_SET = 1
+IPC_STAT = 2
+MSG_NOERROR = 4096
+SEM_UNDO = 4096
+SETALL = 9
+SETVAL = 8
+SHM_LOCK = 3
+SHM_RDONLY = 4096
+SHM_RND = 8192
+SHM_UNLOCK = 4
+SYS_msgctl = 297
+SYS_msgget = 225
+SYS_msgrcv = 227
+SYS_msgsnd = 226
+SYS_semctl = 442
+SYS_semget = 221
+SYS_semop = 290
+SYS_shmat = 228
+SYS_shmctl = 296
+SYS_shmdt = 230
+SYS_shmget = 289
+S_IRGRP = 32
+S_IROTH = 4
+S_IRUSR = 256
+S_IWGRP = 16
+S_IWOTH = 2
+S_IWUSR = 128
+S_IXGRP = 8
+S_IXOTH = 1
+S_IXUSR = 64
diff --git a/sys/openbsd/kqueue.txt b/sys/openbsd/kqueue.txt
new file mode 100644
index 000000000..f66b584b2
--- /dev/null
+++ b/sys/openbsd/kqueue.txt
@@ -0,0 +1,25 @@
+include <sys/types.h>
+include <sys/event.h>
+include <sys/time.h>
+
+resource fd_kqueue[fd]
+
+kqueue() fd_kqueue
+kevent(kd fd_kqueue, changelist ptr[in, array[kevent]], nchanges int32, eventlist ptr[in, array[kevent]], nevents int32, timeout ptr[in, timespec])
+
+kevent_ident {
+ ident fd
+} [size[8]]
+
+kevent {
+ ident kevent_ident
+ filter flags[kevent_filter, int16]
+ flags flags[kevent_flags, int16]
+ fflags flags[kevent_fflags, int32]
+ data int64
+ udata intptr
+}
+
+kevent_filter = EVFILT_READ, EVFILT_WRITE, EVFILT_AIO, EVFILT_VNODE, EVFILT_PROC, EVFILT_SIGNAL, EVFILT_TIMER, EVFILT_DEVICE
+kevent_flags = EV_ADD, EV_DELETE, EV_ENABLE, EV_DISABLE, EV_ONESHOT, EV_CLEAR, EV_RECEIPT, EV_DISPATCH
+kevent_fflags = NOTE_LOWAT, NOTE_EOF, NOTE_DELETE, NOTE_WRITE, NOTE_EXTEND, NOTE_ATTRIB, NOTE_LINK, NOTE_RENAME, NOTE_REVOKE, NOTE_TRUNCATE, NOTE_EXIT, NOTE_FORK, NOTE_EXEC, NOTE_PCTRLMASK, NOTE_PDATAMASK, NOTE_TRACK, NOTE_TRACKERR, NOTE_CHILD, NOTE_CHANGE
diff --git a/sys/openbsd/kqueue_amd64.const b/sys/openbsd/kqueue_amd64.const
new file mode 100644
index 000000000..05120f45a
--- /dev/null
+++ b/sys/openbsd/kqueue_amd64.const
@@ -0,0 +1,38 @@
+# AUTOGENERATED FILE
+EVFILT_AIO = 18446744073709551613
+EVFILT_DEVICE = 18446744073709551608
+EVFILT_PROC = 18446744073709551611
+EVFILT_READ = 18446744073709551615
+EVFILT_SIGNAL = 18446744073709551610
+EVFILT_TIMER = 18446744073709551609
+EVFILT_VNODE = 18446744073709551612
+EVFILT_WRITE = 18446744073709551614
+EV_ADD = 1
+EV_CLEAR = 32
+EV_DELETE = 2
+EV_DISABLE = 8
+EV_DISPATCH = 128
+EV_ENABLE = 4
+EV_ONESHOT = 16
+EV_RECEIPT = 64
+NOTE_ATTRIB = 8
+NOTE_CHANGE = 1
+NOTE_CHILD = 4
+NOTE_DELETE = 1
+NOTE_EOF = 2
+NOTE_EXEC = 536870912
+NOTE_EXIT = 2147483648
+NOTE_EXTEND = 4
+NOTE_FORK = 1073741824
+NOTE_LINK = 16
+NOTE_LOWAT = 1
+NOTE_PCTRLMASK = 4026531840
+NOTE_PDATAMASK = 1048575
+NOTE_RENAME = 32
+NOTE_REVOKE = 64
+NOTE_TRACK = 1
+NOTE_TRACKERR = 2
+NOTE_TRUNCATE = 128
+NOTE_WRITE = 2
+SYS_kevent = 72
+SYS_kqueue = 269
diff --git a/sys/openbsd/mm.txt b/sys/openbsd/mm.txt
new file mode 100644
index 000000000..b12f7a485
--- /dev/null
+++ b/sys/openbsd/mm.txt
@@ -0,0 +1,19 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/mman.h>
+
+mmap(addr vma, len len[addr], prot flags[mmap_prot], flags flags[mmap_flags], fd fd, pad const[0], offset fileoff)
+munmap(addr vma, len len[addr])
+mprotect(addr vma, len len[addr], prot flags[mmap_prot])
+madvise(addr vma, len len[addr], advice flags[madvise_flags])
+mlock(addr vma, size len[addr])
+munlock(addr vma, size len[addr])
+mlockall(flags flags[mlockall_flags])
+munlockall()
+
+mmap_prot = PROT_EXEC, PROT_READ, PROT_WRITE, PROT_NONE
+mmap_flags = MAP_ANON, MAP_ANONYMOUS, MAP_FIXED, MAP_PRIVATE, MAP_SHARED
+madvise_flags = MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_FREE
+mlockall_flags = MCL_CURRENT, MCL_FUTURE
diff --git a/sys/openbsd/mm_amd64.const b/sys/openbsd/mm_amd64.const
new file mode 100644
index 000000000..e9a33c91a
--- /dev/null
+++ b/sys/openbsd/mm_amd64.const
@@ -0,0 +1,26 @@
+# AUTOGENERATED FILE
+MADV_DONTNEED = 4
+MADV_FREE = 6
+MADV_NORMAL = 0
+MADV_RANDOM = 1
+MADV_SEQUENTIAL = 2
+MADV_WILLNEED = 3
+MAP_ANON = 4096
+MAP_ANONYMOUS = 4096
+MAP_FIXED = 16
+MAP_PRIVATE = 2
+MAP_SHARED = 1
+MCL_CURRENT = 1
+MCL_FUTURE = 2
+PROT_EXEC = 4
+PROT_NONE = 0
+PROT_READ = 1
+PROT_WRITE = 2
+SYS_madvise = 75
+SYS_mlock = 203
+SYS_mlockall = 271
+SYS_mmap = 197
+SYS_mprotect = 74
+SYS_munlock = 204
+SYS_munlockall = 272
+SYS_munmap = 73
diff --git a/sys/openbsd/socket.txt b/sys/openbsd/socket.txt
new file mode 100644
index 000000000..622a636e8
--- /dev/null
+++ b/sys/openbsd/socket.txt
@@ -0,0 +1,90 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# TODO: due to autobind a socket can bind to port 0, that will result in a random port which is not reproducible
+
+include <sys/types.h>
+include <sys/socket.h>
+include <netinet/in.h>
+
+resource sock[fd]
+type sock_port proc[20000, 4, int16be]
+
+# TODO: describe socketcall syscall
+
+socket(domain flags[socket_domain], type flags[socket_type], proto int8) sock
+socketpair(domain flags[socket_domain], type flags[socket_type], proto int8, fds ptr[out, pipefd])
+bind(fd sock, addr ptr[in, sockaddr_storage], addrlen len[addr])
+connect(fd sock, addr ptr[in, sockaddr_storage], addrlen len[addr])
+accept(fd sock, peer ptr[out, sockaddr_storage, opt], peerlen ptr[inout, len[peer, int32]]) sock
+# paccept(fd sock, peer ptr[out, sockaddr_storage, opt], peerlen ptr[inout, len[peer, int32]], flags flags[accept_flags]) sock
+sendto(fd sock, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_storage, opt], addrlen len[addr])
+recvfrom(fd sock, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_storage, opt], addrlen len[addr])
+getsockname(fd sock, addr ptr[out, sockaddr_storage], addrlen ptr[inout, len[addr, int32]])
+getpeername(fd sock, peer ptr[out, sockaddr_storage], peerlen ptr[inout, len[peer, int32]])
+
+sendmsg(fd sock, msg ptr[in, send_msghdr], f flags[send_flags])
+recvmsg(fd sock, msg ptr[in, recv_msghdr], f flags[recv_flags])
+
+listen(fd sock, backlog int32)
+shutdown(fd sock, how flags[shutdown_flags])
+
+getsockopt(fd sock, level int32, optname int32, optval buffer[out], optlen ptr[inout, len[optval, int32]])
+setsockopt(fd sock, level int32, optname int32, optval buffer[in], optlen len[optval])
+
+socket_domain = AF_LOCAL, AF_INET, AF_INET6, AF_NS, AF_BLUETOOTH, AF_APPLETALK
+socket_type = SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET, SOCK_NONBLOCK, SOCK_CLOEXEC
+# accept_flags = SOCK_NONBLOCK, SOCK_CLOEXEC
+shutdown_flags = SHUT_RD, SHUT_WR, SHUT_RDWR
+send_flags = MSG_OOB, MSG_PEEK, MSG_DONTROUTE, MSG_EOR, MSG_NOSIGNAL
+recv_flags = MSG_CMSG_CLOEXEC, MSG_OOB, MSG_PEEK, MSG_WAITALL
+cmsg_levels = SOL_SOCKET, IPPROTO_ICMP
+
+# This sockaddr type corresponds to the sockaddr_storage type and is 128 bytes size.
+sockaddr_storage [
+ un sockaddr_un
+ in sockaddr_in
+ in6 sockaddr_in6
+] [varlen]
+
+send_msghdr {
+ msg_name ptr[in, sockaddr_storage, opt]
+ msg_namelen len[msg_name, int32]
+ msg_iov ptr[in, array[iovec_in]]
+ msg_iovlen len[msg_iov, intptr]
+ msg_control ptr[in, array[cmsghdr]]
+ msg_controllen bytesize[msg_control, intptr]
+ msg_flags flags[send_flags, int32]
+}
+
+recv_msghdr {
+ msg_name ptr[out, sockaddr_storage, opt]
+ msg_namelen len[msg_name, int32]
+ msg_iov ptr[in, array[iovec_out]]
+ msg_iovlen len[msg_iov, intptr]
+ msg_control buffer[out]
+ msg_controllen len[msg_control, intptr]
+ msg_flags int32
+}
+
+cmsghdr {
+ cmsg_len len[parent, intptr]
+ cmsg_level flags[cmsg_levels, int32]
+ cmsg_type int32
+ data array[int8]
+} [align_ptr]
+
+# Socket options
+
+getsockopt$sock_int(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_int], optval ptr[out, int32], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_int(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_int], optval ptr[in, int32], optlen len[optval])
+getsockopt$sock_linger(fd sock, level const[SOL_SOCKET], optname const[SO_LINGER], optval ptr[out, linger], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_linger(fd sock, level const[SOL_SOCKET], optname const[SO_LINGER], optval ptr[in, linger], optlen len[optval])
+getsockopt$sock_cred(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[out, ucred], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_cred(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[in, ucred], optlen len[optval])
+getsockopt$sock_timeval(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_timeval], optval ptr[out, timeval], optlen ptr[inout, len[optval, int32]])
+setsockopt$sock_timeval(fd sock, level const[SOL_SOCKET], optname flags[sockopt_opt_sock_timeval], optval ptr[in, timeval], optlen len[optval])
+getsockopt$SO_PEERCRED(fd sock, level const[SOL_SOCKET], optname const[SO_PEERCRED], optval ptr[out, ucred], optlen len[optval])
+
+sockopt_opt_sock_int = SO_DEBUG, SO_REUSEADDR, SO_REUSEPORT, SO_KEEPALIVE, SO_DONTROUTE, SO_LINGER, SO_BROADCAST, SO_OOBINLINE, SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT, SO_RCVLOWAT, SO_TIMESTAMP, SO_TYPE, SO_ERROR
+sockopt_opt_sock_timeval = SO_RCVTIMEO, SO_SNDTIMEO
diff --git a/sys/openbsd/socket_amd64.const b/sys/openbsd/socket_amd64.const
new file mode 100644
index 000000000..1efcb792c
--- /dev/null
+++ b/sys/openbsd/socket_amd64.const
@@ -0,0 +1,59 @@
+# AUTOGENERATED FILE
+AF_APPLETALK = 16
+AF_BLUETOOTH = 32
+AF_INET = 2
+AF_INET6 = 24
+AF_LOCAL = 1
+AF_NS = 6
+IPPROTO_ICMP = 1
+MSG_CMSG_CLOEXEC = 2048
+MSG_DONTROUTE = 4
+MSG_EOR = 8
+MSG_NOSIGNAL = 1024
+MSG_OOB = 1
+MSG_PEEK = 2
+MSG_WAITALL = 64
+SHUT_RD = 0
+SHUT_RDWR = 2
+SHUT_WR = 1
+SOCK_CLOEXEC = 32768
+SOCK_DGRAM = 2
+SOCK_NONBLOCK = 16384
+SOCK_RAW = 3
+SOCK_RDM = 4
+SOCK_SEQPACKET = 5
+SOCK_STREAM = 1
+SOL_SOCKET = 65535
+SO_BROADCAST = 32
+SO_DEBUG = 1
+SO_DONTROUTE = 16
+SO_ERROR = 4103
+SO_KEEPALIVE = 8
+SO_LINGER = 128
+SO_OOBINLINE = 256
+SO_PEERCRED = 4130
+SO_RCVBUF = 4098
+SO_RCVLOWAT = 4100
+SO_RCVTIMEO = 4102
+SO_REUSEADDR = 4
+SO_REUSEPORT = 512
+SO_SNDBUF = 4097
+SO_SNDLOWAT = 4099
+SO_SNDTIMEO = 4101
+SO_TIMESTAMP = 2048
+SO_TYPE = 4104
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_getsockopt = 118
+SYS_listen = 106
+SYS_recvfrom = 29
+SYS_recvmsg = 27
+SYS_sendmsg = 28
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_shutdown = 134
+SYS_socket = 97
+SYS_socketpair = 135
diff --git a/sys/openbsd/socket_inet.txt b/sys/openbsd/socket_inet.txt
new file mode 100644
index 000000000..98b72d23c
--- /dev/null
+++ b/sys/openbsd/socket_inet.txt
@@ -0,0 +1,41 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/socket.h>
+include <sys/sockio.h>
+include <netinet/in.h>
+
+# IP sockets
+
+resource sock_in[sock]
+
+sock_in_pair {
+ f0 sock_in
+ f1 sock_in
+}
+
+sockaddr_in {
+ family const[AF_INET, int16]
+ port sock_port
+ pad array[const[0, int8], 8]
+}
+
+socket$inet(domain const[AF_INET], type flags[socket_type], proto int8) sock_in
+socketpair$inet(domain const[AF_INET], type flags[socket_type], proto int8, fds ptr[out, sock_in_pair])
+accept$inet(fd sock_in, peer ptr[out, sockaddr_in, opt], peerlen ptr[inout, len[peer, int32]]) sock_in
+bind$inet(fd sock_in, addr ptr[in, sockaddr_in], addrlen len[addr])
+connect$inet(fd sock_in, addr ptr[in, sockaddr_in], addrlen len[addr])
+sendto$inet(fd sock_in, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_in, opt], addrlen len[addr])
+recvfrom$inet(fd sock_in, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_in, opt], addrlen len[addr])
+getsockname$inet(fd sock_in, addr ptr[out, sockaddr_in], addrlen ptr[inout, len[addr, int32]])
+getpeername$inet(fd sock_in, peer ptr[out, sockaddr_in], peerlen ptr[inout, len[peer, int32]])
+
+# Generic IP options
+
+# Specific IP options
+
+sockopt_opt_ip_opts = IP_OPTIONS
+
+getsockopt$inet_opts(fd sock_in, level const[IPPROTO_IP], optname flags[sockopt_opt_ip_opts], optval buffer[out], optlen ptr[inout, len[optval, int32]])
+setsockopt$inet_opts(fd sock_in, level const[IPPROTO_IP], optname flags[sockopt_opt_ip_opts], optval buffer[in], optlen len[optval])
diff --git a/sys/openbsd/socket_inet6.txt b/sys/openbsd/socket_inet6.txt
new file mode 100644
index 000000000..3efb5dce1
--- /dev/null
+++ b/sys/openbsd/socket_inet6.txt
@@ -0,0 +1,66 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/param.h>
+include <sys/socket.h>
+include <netinet/in.h>
+include <net/route.h>
+include <netinet6/ip6_mroute.h>
+# include <compat/linux/common/linux_socket.h>
+include <sys/sockio.h>
+
+# IPv6 sockets
+
+resource sock_in6[sock]
+
+sock_in6_pair {
+ f0 sock_in6
+ f1 sock_in6
+}
+
+sockaddr_in6 {
+ family const[AF_INET6, int16]
+ port sock_port
+ flow int32
+ scope int32
+}
+
+socket$inet6(domain const[AF_INET6], type flags[socket_type], proto int8) sock_in6
+socketpair$inet6(domain const[AF_INET6], type flags[socket_type], proto int8, fds ptr[out, sock_in6_pair])
+accept$inet6(fd sock_in6, peer ptr[out, sockaddr_in6, opt], peerlen ptr[inout, len[peer, int32]]) sock_in6
+bind$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr])
+connect$inet6(fd sock_in6, addr ptr[in, sockaddr_in6], addrlen len[addr])
+sendto$inet6(fd sock_in6, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr])
+recvfrom$inet6(fd sock_in6, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_in6, opt], addrlen len[addr])
+getsockname$inet6(fd sock_in6, addr ptr[out, sockaddr_in6], addrlen ptr[inout, len[addr, int32]])
+getpeername$inet6(fd sock_in6, peer ptr[out, sockaddr_in6], peerlen ptr[inout, len[peer, int32]])
+
+# Generic IPv6 options
+
+# Specific IPv6 options
+
+# TODO: IPV6_HOPOPTS, IPV6_RTHDRDSTOPTS, IPV6_RTHDR, IPV6_DSTOPTS
+# TODO: IPV6_PATHMTU
+# TODO: IP6T_SO_GET_REVISION_MATCH, IP6T_SO_GET_REVISION_TARGET
+
+setsockopt$inet6_MRT6_ADD_MIF(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_ADD_MIF], optval ptr[in, mif6ctl], optlen len[optval])
+setsockopt$inet6_MRT6_ADD_MFC(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_ADD_MFC], optval ptr[in, mf6cctl], optlen len[optval])
+setsockopt$inet6_MRT6_DEL_MFC(fd sock_in6, level const[IPPROTO_IPV6], optname const[MRT6_DEL_MFC], optval ptr[in, mf6cctl], optlen len[optval])
+
+mif6ctl {
+ mif6c_mifi int16
+ mif6c_flags flags[mif6c_flags, int8]
+ vifc_threshold int8
+ mif6c_pifi int16
+ vifc_rate_limit int32
+}
+
+mif6c_flags = MIFF_REGISTER
+
+mf6cctl {
+ mf6cc_origin sockaddr_in6
+ mf6cc_mcastgrp sockaddr_in6
+ mf6cc_parent int16
+ mf6cc_ifset array[int32, 8]
+}
diff --git a/sys/openbsd/socket_inet6_amd64.const b/sys/openbsd/socket_inet6_amd64.const
new file mode 100644
index 000000000..a67f199bc
--- /dev/null
+++ b/sys/openbsd/socket_inet6_amd64.const
@@ -0,0 +1,17 @@
+# AUTOGENERATED FILE
+AF_INET6 = 24
+IPPROTO_IPV6 = 41
+MIFF_REGISTER = 1
+MRT6_ADD_MFC = 104
+MRT6_ADD_MIF = 102
+MRT6_DEL_MFC = 105
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_recvfrom = 29
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_socket = 97
+SYS_socketpair = 135
diff --git a/sys/openbsd/socket_inet_amd64.const b/sys/openbsd/socket_inet_amd64.const
new file mode 100644
index 000000000..a5b5c7cf3
--- /dev/null
+++ b/sys/openbsd/socket_inet_amd64.const
@@ -0,0 +1,15 @@
+# AUTOGENERATED FILE
+AF_INET = 2
+IPPROTO_IP = 0
+IP_OPTIONS = 1
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_getsockopt = 118
+SYS_recvfrom = 29
+SYS_sendto = 133
+SYS_setsockopt = 105
+SYS_socket = 97
+SYS_socketpair = 135
diff --git a/sys/openbsd/socket_unix.txt b/sys/openbsd/socket_unix.txt
new file mode 100644
index 000000000..849218226
--- /dev/null
+++ b/sys/openbsd/socket_unix.txt
@@ -0,0 +1,79 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+# AF_UNIX support.
+
+include <sys/types.h>
+include <sys/socket.h>
+include <netinet/in.h>
+# include <compat/linux/common/linux_socket.h>
+
+resource sock_unix[sock]
+
+socket$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0]) sock_unix
+socketpair$unix(domain const[AF_UNIX], type flags[unix_socket_type], proto const[0], fds ptr[out, unix_pair])
+bind$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
+connect$unix(fd sock_unix, addr ptr[in, sockaddr_un], addrlen len[addr])
+accept$unix(fd sock_unix, peer ptr[out, sockaddr_un, opt], peerlen ptr[inout, len[peer, int32]]) sock_unix
+
+sendto$unix(fd sock_unix, buf buffer[in], len len[buf], f flags[send_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
+sendmsg$unix(fd sock_unix, msg ptr[in, msghdr_un], f flags[send_flags])
+recvfrom$unix(fd sock_unix, buf buffer[out], len len[buf], f flags[recv_flags], addr ptr[in, sockaddr_un, opt], addrlen len[addr])
+getsockname$unix(fd sock_unix, addr ptr[out, sockaddr_un], addrlen ptr[inout, len[addr, int32]])
+getpeername$unix(fd sock_unix, peer ptr[out, sockaddr_un], peerlen ptr[inout, len[peer, int32]])
+
+unix_socket_type = SOCK_STREAM, SOCK_DGRAM, SOCK_SEQPACKET
+unix_socket_family = AF_UNIX, AF_UNSPEC
+
+unix_pair {
+ fd0 sock_unix
+ fd1 sock_unix
+}
+
+sockaddr_un [
+ file sockaddr_un_file
+ abs sockaddr_un_abstract
+] [varlen]
+
+sockaddr_un_file {
+ family flags[unix_socket_family, int16]
+ path filename
+} [packed]
+
+sockaddr_un_abstract {
+ family flags[unix_socket_family, int16]
+ ind const[0, int8]
+ id proc[20000, 4, int32]
+}
+
+msghdr_un {
+ addr ptr[in, sockaddr_un]
+ addrlen len[addr, int32]
+ vec ptr[in, array[iovec_in]]
+ vlen len[vec, intptr]
+ ctrl ptr[in, array[cmsghdr_un], opt]
+ ctrllen bytesize[ctrl, intptr]
+ f flags[send_flags, int32]
+}
+
+cmsghdr_un [
+ rights cmsghdr_un_rights
+ cred cmsghdr_un_cred
+] [varlen]
+
+cmsghdr_un_rights {
+ len len[parent, intptr]
+ level const[SOL_SOCKET, int32]
+ type const[SCM_RIGHTS, int32]
+ fds array[fd]
+} [align_ptr]
+
+cmsghdr_un_cred {
+ len len[parent, intptr]
+ level const[SOL_SOCKET, int32]
+ # XXX type const[LINUX_SCM_CREDENTIALS, int32]
+ type const[0, int32]
+ pid pid
+ uid uid
+ gid gid
+} [align_ptr]
diff --git a/sys/openbsd/socket_unix_amd64.const b/sys/openbsd/socket_unix_amd64.const
new file mode 100644
index 000000000..8fae03bbb
--- /dev/null
+++ b/sys/openbsd/socket_unix_amd64.const
@@ -0,0 +1,18 @@
+# AUTOGENERATED FILE
+AF_UNIX = 1
+AF_UNSPEC = 0
+SCM_RIGHTS = 1
+SOCK_DGRAM = 2
+SOCK_SEQPACKET = 5
+SOCK_STREAM = 1
+SOL_SOCKET = 65535
+SYS_accept = 30
+SYS_bind = 104
+SYS_connect = 98
+SYS_getpeername = 31
+SYS_getsockname = 32
+SYS_recvfrom = 29
+SYS_sendmsg = 28
+SYS_sendto = 133
+SYS_socket = 97
+SYS_socketpair = 135
diff --git a/sys/openbsd/sys.txt b/sys/openbsd/sys.txt
new file mode 100644
index 000000000..e071ea9c4
--- /dev/null
+++ b/sys/openbsd/sys.txt
@@ -0,0 +1,208 @@
+# Copyright 2017 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <sys/mman.h>
+include <sys/stat.h>
+include <fcntl.h>
+include <unistd.h>
+include <sys/time.h>
+include <dirent.h>
+include <poll.h>
+include <sys/select.h>
+include <sys/param.h>
+include <sys/resource.h>
+include <time.h>
+include <signal.h>
+include <sys/wait.h>
+
+pipe(pipefd ptr[out, pipefd])
+
+stat(file ptr[in, filename], statbuf ptr[out, stat])
+lstat(file ptr[in, filename], statbuf ptr[out, stat])
+
+poll(fds ptr[in, array[pollfd]], nfds len[fds], timeout int32)
+select(n len[inp], inp ptr[inout, fd_set], outp ptr[inout, fd_set], exp ptr[inout, fd_set], tvp ptr[inout, timeval])
+
+mincore(addr vma, size len[addr], vec buffer[out])
+
+fcntl$dupfd(fd fd, cmd flags[fcntl_dupfd], arg fd) fd
+fcntl$getflags(fd fd, cmd flags[fcntl_getflags])
+fcntl$setflags(fd fd, cmd const[F_SETFD], flags flags[fcntl_flags])
+fcntl$setstatus(fd fd, cmd const[F_SETFL], flags flags[fcntl_status])
+fcntl$lock(fd fd, cmd flags[fcntl_lock], lock ptr[in, flock])
+fcntl$getown(fd fd, cmd const[F_GETOWN]) pid
+fcntl$setown(fd fd, cmd const[F_SETOWN], pid pid)
+
+mknod(file ptr[in, filename], mode flags[mknod_mode], dev int32)
+mknod$loop(file ptr[in, filename], mode flags[mknod_mode], dev proc[1792, 2])
+mknodat(dirfd fd_dir, file ptr[in, filename], mode flags[mknod_mode], dev int32)
+chmod(file ptr[in, filename], mode flags[open_mode])
+fchmod(fd fd, mode flags[open_mode])
+fchmodat(dirfd fd_dir, file ptr[in, filename], mode flags[open_mode], flags flags[at_flags])
+chown(file ptr[in, filename], uid uid, gid gid)
+lchown(file ptr[in, filename], uid uid, gid gid)
+fchown(fd fd, uid uid, gid gid)
+fchownat(dirfd fd_dir, file ptr[in, filename], uid uid, gid gid, flags flags[at_flags])
+faccessat(dirfd fd_dir, pathname ptr[in, filename], mode flags[open_mode], flags flags[faccessat_flags])
+utimes(filename ptr[in, filename], times ptr[in, itimerval])
+utimensat(dir fd_dir, pathname ptr[in, filename], times ptr[in, itimerval], flags flags[utimensat_flags])
+
+execve(file ptr[in, filename], argv ptr[in, array[ptr[in, string]]], envp ptr[in, array[ptr[in, string]]])
+
+getgid() gid
+getegid() gid
+setuid(uid uid)
+setgid(gid gid)
+seteuid(euid uid)
+setegid(egid gid)
+getuid() uid
+geteuid() uid
+setpgid(pid pid, pgid pid)
+getpgid(pid pid) pid
+getpgrp() pid
+getpid() pid
+getppid() pid
+setreuid(ruid uid, euid uid)
+setregid(rgid gid, egid gid)
+getgroups(size len[list], list ptr[inout, array[gid]])
+setgroups(size len[list], list ptr[in, array[gid]])
+
+link(old ptr[in, filename], new ptr[in, filename])
+linkat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename], flags flags[linkat_flags])
+symlinkat(old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
+symlink(old ptr[in, filename], new ptr[in, filename])
+unlink(path ptr[in, filename])
+unlinkat(fd fd_dir, path ptr[in, filename], flags flags[unlinkat_flags])
+readlink(path ptr[in, filename], buf buffer[out], siz len[buf])
+readlinkat(fd fd_dir, path ptr[in, filename], buf buffer[out], siz len[buf])
+rename(old ptr[in, filename], new ptr[in, filename])
+renameat(oldfd fd_dir, old ptr[in, filename], newfd fd_dir, new ptr[in, filename])
+mkdir(path ptr[in, filename], mode flags[open_mode])
+mkdirat(fd fd_dir, path ptr[in, filename], mode flags[open_mode])
+rmdir(path ptr[in, filename])
+truncate(file ptr[in, filename], len intptr)
+ftruncate(fd fd, len intptr)
+flock(fd fd, op flags[flock_op])
+fsync(fd fd)
+# fdatasync(fd fd)
+sync()
+getdents(fd fd_dir, ent buffer[out], count len[ent])
+chroot(dir ptr[in, filename])
+# fchroot(fd fd)
+chdir(dir ptr[in, filename])
+fchdir(fd fd)
+
+getrusage(who flags[rusage_who], usage ptr[out, rusage])
+getrlimit(res flags[rlimit_type], rlim ptr[out, rlimit])
+setrlimit(res flags[rlimit_type], rlim ptr[in, rlimit])
+
+clock_gettime(id flags[clock_id], tp ptr[out, timespec])
+clock_settime(id flags[clock_id], tp ptr[in, timespec])
+clock_getres(id flags[clock_id], tp ptr[out, timespec])
+nanosleep(req ptr[in, timespec], rem ptr[out, timespec, opt])
+getitimer(which flags[getitimer_which], cur ptr[out, itimerval])
+setitimer(which flags[getitimer_which], new ptr[in, itimerval], old ptr[out, itimerval, opt])
+wait4(pid pid, status ptr[out, int32, opt], options flags[wait_options], ru ptr[out, rusage, opt])
+
+pledge(promises ptr[in, string], execpromises ptr[in, string])
+unveil(path ptr[in, filename], permissions ptr[in, string[unveil_permissions]])
+
+pollfd {
+ fd fd
+ events flags[pollfd_events, int16]
+ revents const[0, int16]
+}
+
+# prog knowns about this struct type
+timespec {
+ sec intptr
+ nsec intptr
+}
+
+# prog knowns about this struct type
+timeval {
+ sec intptr
+ usec intptr
+}
+
+itimerval {
+ interv timeval
+ value timeval
+}
+
+# TODO: fd_set needs to be a separate type
+fd_set {
+ mask0 int64
+ mask1 int64
+ mask2 int64
+ mask3 int64
+ mask4 int64
+ mask5 int64
+ mask6 int64
+ mask7 int64
+}
+
+rusage {
+ utime timeval
+ stime timeval
+ maxrss intptr
+ ixrss intptr
+ idrss intptr
+ isrss intptr
+ minflt intptr
+ majflt intptr
+ nswap intptr
+ inblock intptr
+ oublock intptr
+ msgsnd intptr
+ msgrcv intptr
+ signals intptr
+ nvcsw intptr
+ nivcsw intptr
+}
+
+rlimit {
+ soft intptr
+ hard intptr
+}
+
+flock {
+ type flags[flock_type, int16]
+ whence flags[seek_whence, int16]
+ start intptr
+ len intptr
+ pid pid
+}
+
+linger {
+ onoff int32
+ linger int32
+}
+
+ucred {
+ pid pid
+ uid uid
+ gid gid
+}
+
+pollfd_events = POLLIN, POLLPRI, POLLOUT, POLLERR, POLLHUP, POLLNVAL, POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND
+mknod_mode = S_IFMT, S_IFREG, S_IFCHR, S_IFBLK, S_IFIFO, S_IFSOCK, S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
+at_flags = AT_SYMLINK_NOFOLLOW, AT_SYMLINK_FOLLOW
+linkat_flags = AT_SYMLINK_FOLLOW
+unlinkat_flags = 0, AT_REMOVEDIR
+flock_op = LOCK_SH, LOCK_EX, LOCK_UN, LOCK_NB
+faccessat_flags = AT_EACCESS, AT_SYMLINK_NOFOLLOW
+rusage_who = RUSAGE_SELF, RUSAGE_CHILDREN
+rlimit_type = RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_MEMLOCK, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_STACK, RLIMIT_STACK
+clock_id = CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID
+getitimer_which = ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF
+wait_options = WCONTINUED, WNOHANG, WUNTRACED
+utimensat_flags = 0, AT_SYMLINK_NOFOLLOW
+fcntl_dupfd = F_DUPFD, F_DUPFD_CLOEXEC
+fcntl_getflags = F_GETFD, F_GETFL
+fcntl_lock = F_SETLK, F_SETLKW, F_GETLK
+fcntl_flags = FD_CLOEXEC
+fcntl_status = O_APPEND, O_ASYNC, O_NONBLOCK, O_DSYNC, O_RSYNC
+flock_type = F_RDLCK, F_WRLCK, F_UNLCK
+unveil_permissions = "r", "W", "x", "c"
diff --git a/sys/openbsd/sys_amd64.const b/sys/openbsd/sys_amd64.const
new file mode 100644
index 000000000..703a43109
--- /dev/null
+++ b/sys/openbsd/sys_amd64.const
@@ -0,0 +1,146 @@
+# AUTOGENERATED FILE
+AT_EACCESS = 1
+AT_REMOVEDIR = 8
+AT_SYMLINK_FOLLOW = 4
+AT_SYMLINK_NOFOLLOW = 2
+CLOCK_MONOTONIC = 3
+CLOCK_PROCESS_CPUTIME_ID = 2
+CLOCK_REALTIME = 0
+CLOCK_THREAD_CPUTIME_ID = 4
+FD_CLOEXEC = 1
+F_DUPFD = 0
+F_DUPFD_CLOEXEC = 10
+F_GETFD = 1
+F_GETFL = 3
+F_GETLK = 7
+F_GETOWN = 5
+F_RDLCK = 1
+F_SETFD = 2
+F_SETFL = 4
+F_SETLK = 8
+F_SETLKW = 9
+F_SETOWN = 6
+F_UNLCK = 2
+F_WRLCK = 3
+ITIMER_PROF = 2
+ITIMER_REAL = 0
+ITIMER_VIRTUAL = 1
+LOCK_EX = 2
+LOCK_NB = 4
+LOCK_SH = 1
+LOCK_UN = 8
+O_APPEND = 8
+O_ASYNC = 64
+O_DSYNC = 128
+O_NONBLOCK = 4
+O_RSYNC = 128
+POLLERR = 8
+POLLHUP = 16
+POLLIN = 1
+POLLNVAL = 32
+POLLOUT = 4
+POLLPRI = 2
+POLLRDBAND = 128
+POLLRDNORM = 64
+POLLWRBAND = 256
+POLLWRNORM = 4
+RLIMIT_CORE = 4
+RLIMIT_CPU = 0
+RLIMIT_DATA = 2
+RLIMIT_FSIZE = 1
+RLIMIT_MEMLOCK = 6
+RLIMIT_NOFILE = 8
+RLIMIT_NPROC = 7
+RLIMIT_RSS = 5
+RLIMIT_STACK = 3
+RUSAGE_CHILDREN = 18446744073709551615
+RUSAGE_SELF = 0
+SYS_chdir = 12
+SYS_chmod = 15
+SYS_chown = 16
+SYS_chroot = 61
+SYS_clock_getres = 89
+SYS_clock_gettime = 87
+SYS_clock_settime = 88
+SYS_execve = 59
+SYS_faccessat = 313
+SYS_fchdir = 13
+SYS_fchmod = 124
+SYS_fchmodat = 314
+SYS_fchown = 123
+SYS_fchownat = 315
+SYS_fcntl = 92
+SYS_flock = 131
+SYS_fsync = 95
+SYS_ftruncate = 201
+SYS_getdents = 99
+SYS_getegid = 43
+SYS_geteuid = 25
+SYS_getgid = 47
+SYS_getgroups = 79
+SYS_getitimer = 70
+SYS_getpgid = 207
+SYS_getpgrp = 81
+SYS_getpid = 20
+SYS_getppid = 39
+SYS_getrlimit = 194
+SYS_getrusage = 19
+SYS_getuid = 24
+SYS_lchown = 254
+SYS_link = 9
+SYS_linkat = 317
+SYS_lstat = 40
+SYS_mincore = 78
+SYS_mkdir = 136
+SYS_mkdirat = 318
+SYS_mknod = 14
+SYS_mknodat = 320
+SYS_nanosleep = 91
+SYS_pipe = 263
+SYS_pledge = 108
+SYS_poll = 252
+SYS_readlink = 58
+SYS_readlinkat = 322
+SYS_rename = 128
+SYS_renameat = 323
+SYS_rmdir = 137
+SYS_select = 71
+SYS_setegid = 182
+SYS_seteuid = 183
+SYS_setgid = 181
+SYS_setgroups = 80
+SYS_setitimer = 69
+SYS_setpgid = 82
+SYS_setregid = 127
+SYS_setreuid = 126
+SYS_setrlimit = 195
+SYS_setuid = 23
+SYS_stat = 38
+SYS_symlink = 57
+SYS_symlinkat = 324
+SYS_sync = 36
+SYS_truncate = 200
+SYS_unlink = 10
+SYS_unlinkat = 325
+SYS_unveil = 114
+SYS_utimensat = 84
+SYS_utimes = 76
+SYS_wait4 = 11
+S_IFBLK = 24576
+S_IFCHR = 8192
+S_IFIFO = 4096
+S_IFMT = 61440
+S_IFREG = 32768
+S_IFSOCK = 49152
+S_IRGRP = 32
+S_IROTH = 4
+S_IRUSR = 256
+S_IWGRP = 16
+S_IWOTH = 2
+S_IWUSR = 128
+S_IXGRP = 8
+S_IXOTH = 1
+S_IXUSR = 64
+WCONTINUED = 8
+WNOHANG = 1
+WUNTRACED = 2
diff --git a/sys/openbsd/tty.txt b/sys/openbsd/tty.txt
new file mode 100644
index 000000000..904dc7678
--- /dev/null
+++ b/sys/openbsd/tty.txt
@@ -0,0 +1,69 @@
+# Copyright 2018 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/types.h>
+include <time.h>
+include <sys/tty.h>
+include <fcntl.h>
+
+resource fd_tty[fd]
+
+syz_open_pts() fd_tty
+
+ioctl$TIOCSETD(fd fd_tty, cmd const[TIOCSETD], arg ptr[in, int32])
+ioctl$TIOCGETD(fd fd_tty, cmd const[TIOCGETD], arg ptr[out, int32])
+ioctl$TIOCSBRK(fd fd_tty, cmd const[TIOCSBRK])
+ioctl$TIOCCBRK(fd fd_tty, cmd const[TIOCCBRK])
+ioctl$TIOCSDTR(fd fd_tty, cmd const[TIOCSDTR])
+ioctl$TIOCCDTR(fd fd_tty, cmd const[TIOCCDTR])
+ioctl$TIOCSPGRP(fd fd_tty, cmd const[TIOCGPGRP], arg ptr[out, int32])
+ioctl$TIOCGETA(fd fd_tty, cmd const[TIOCGETA], arg ptr[out, termios])
+ioctl$TIOCSETA(fd fd_tty, cmd const[TIOCSETA], arg ptr[in, termios])
+ioctl$TIOCSETAW(fd fd_tty, cmd const[TIOCSETAW], arg ptr[in, termios])
+ioctl$TIOCSETAF(fd fd_tty, cmd const[TIOCSETAF], arg ptr[in, termios])
+ioctl$TIOCOUTQ(fd fd_tty, cmd const[TIOCOUTQ], arg ptr[in, int32])
+ioctl$TIOCNOTTY(fd fd_tty, cmd const[TIOCNOTTY])
+ioctl$TIOCSETVERAUTH(fd fd_tty, cmd const[TIOCSETVERAUTH], arg ptr[in, int32])
+ioctl$TIOCCLRVERAUTH(fd fd_tty, cmd const[TIOCCLRVERAUTH])
+ioctl$TIOCCHKVERAUTH(fd fd_tty, cmd const[TIOCCHKVERAUTH])
+ioctl$TIOCSTOP(fd fd_tty, cmd const[TIOCSTOP])
+ioctl$TIOCSTART(fd fd_tty, cmd const[TIOCSTART])
+ioctl$TIOCSCTTY(fd fd_tty, cmd const[TIOCSCTTY])
+ioctl$TIOCDRAIN(fd fd_tty, cmd const[TIOCDRAIN])
+ioctl$TIOCEXCL(fd fd_tty, cmd const[TIOCEXCL])
+ioctl$TIOCNXCL(fd fd_tty, cmd const[TIOCNXCL])
+ioctl$TIOCFLUSH(fd fd_tty, cmd const[TIOCFLUSH], arg ptr[in, int32])
+ioctl$TIOCGWINSZ(fd fd_tty, cmd const[TIOCGWINSZ], arg ptr[out, winsize])
+ioctl$TIOCSWINSZ(fd fd_tty, cmd const[TIOCSWINSZ], arg ptr[in, winsize])
+ioctl$TIOCCONS(fd fd_tty, cmd const[TIOCCONS], arg ptr[in, int32])
+ioctl$TIOCMSET(fd fd_tty, cmd const[TIOCMSET], arg ptr[in, int32])
+ioctl$TIOCMGET(fd fd_tty, cmd const[TIOCMGET], arg ptr[out, int32])
+ioctl$TIOCMBIS(fd fd_tty, cmd const[TIOCMBIS], arg ptr[in, int32])
+ioctl$TIOCMBIC(fd fd_tty, cmd const[TIOCMBIC], arg ptr[in, int32])
+ioctl$TIOCGTSTAMP(fd fd_tty, cmd const[TIOCGTSTAMP], arg ptr[out, timeval])
+ioctl$TIOCSTSTAMP(fd fd_tty, cmd const[TIOCSTSTAMP], arg ptr[in, tstamps])
+ioctl$TIOCSFLAGS(fd fd_tty, cmd const[TIOCSFLAGS], arg ptr[in, int32])
+ioctl$TIOCGFLAGS(fd fd_tty, cmd const[TIOCGFLAGS], arg ptr[out, int32])
+ioctl$TIOCSTAT(fd fd_tty, cmd const[TIOCSTAT], arg ptr[out, int32])
+
+termios {
+ iflag int32
+ oflag int32
+ cflag int32
+ lflag int32
+ cc array[int8, NCCS]
+ ispeed int32
+ ospeed int32
+}
+
+tstamps {
+ set int32
+ clr int32
+}
+
+winsize {
+ row int16
+ col int16
+ xpixel int16
+ ypixel int16
+}
diff --git a/sys/openbsd/tty_amd64.const b/sys/openbsd/tty_amd64.const
new file mode 100644
index 000000000..caf6a3981
--- /dev/null
+++ b/sys/openbsd/tty_amd64.const
@@ -0,0 +1,38 @@
+# AUTOGENERATED FILE
+NCCS = 20
+SYS_ioctl = 54
+TIOCCBRK = 536900730
+TIOCCDTR = 536900728
+TIOCCHKVERAUTH = 536900638
+TIOCCLRVERAUTH = 536900637
+TIOCCONS = 2147775586
+TIOCDRAIN = 536900702
+TIOCEXCL = 536900621
+TIOCFLUSH = 2147775504
+TIOCGETA = 1076655123
+TIOCGETD = 1074033690
+TIOCGFLAGS = 1074033757
+TIOCGPGRP = 1074033783
+TIOCGTSTAMP = 1074820187
+TIOCGWINSZ = 1074295912
+TIOCMBIC = 2147775595
+TIOCMBIS = 2147775596
+TIOCMGET = 1074033770
+TIOCMSET = 2147775597
+TIOCNOTTY = 536900721
+TIOCNXCL = 536900622
+TIOCOUTQ = 1074033779
+TIOCSBRK = 536900731
+TIOCSCTTY = 536900705
+TIOCSDTR = 536900729
+TIOCSETA = 2150396948
+TIOCSETAF = 2150396950
+TIOCSETAW = 2150396949
+TIOCSETD = 2147775515
+TIOCSETVERAUTH = 2147775516
+TIOCSFLAGS = 2147775580
+TIOCSTART = 536900718
+TIOCSTAT = 536900709
+TIOCSTOP = 536900719
+TIOCSTSTAMP = 2148037722
+TIOCSWINSZ = 2148037735
diff --git a/sys/sys.go b/sys/sys.go
index 51c04b444..25e144070 100644
--- a/sys/sys.go
+++ b/sys/sys.go
@@ -10,6 +10,7 @@ import (
_ "github.com/google/syzkaller/sys/fuchsia/gen"
_ "github.com/google/syzkaller/sys/linux/gen"
_ "github.com/google/syzkaller/sys/netbsd/gen"
+ _ "github.com/google/syzkaller/sys/openbsd/gen"
_ "github.com/google/syzkaller/sys/test/gen"
_ "github.com/google/syzkaller/sys/windows/gen"
)
diff --git a/sys/syz-extract/extract.go b/sys/syz-extract/extract.go
index 8d0d6179c..4a937b0f6 100644
--- a/sys/syz-extract/extract.go
+++ b/sys/syz-extract/extract.go
@@ -59,6 +59,7 @@ var extractors = map[string]Extractor{
"linux": new(linux),
"freebsd": new(freebsd),
"netbsd": new(netbsd),
+ "openbsd": new(openbsd),
"android": new(linux),
"fuchsia": new(fuchsia),
"windows": new(windows),
diff --git a/sys/syz-extract/openbsd.go b/sys/syz-extract/openbsd.go
new file mode 100644
index 000000000..b09c31e15
--- /dev/null
+++ b/sys/syz-extract/openbsd.go
@@ -0,0 +1,86 @@
+// Copyright 2017 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/google/syzkaller/pkg/compiler"
+)
+
+type openbsd struct{}
+
+func (*openbsd) prepare(sourcedir string, build bool, arches []string) error {
+ if sourcedir == "" {
+ return fmt.Errorf("provide path to kernel checkout via -sourcedir flag (or make extract SOURCEDIR)")
+ }
+ if !build {
+ return fmt.Errorf("openbsd requires -build flag")
+ }
+ return nil
+}
+
+func (*openbsd) prepareArch(arch *Arch) error {
+ if err := os.Symlink(filepath.Join(arch.sourceDir, "sys", "arch", "amd64", "include"),
+ filepath.Join(arch.buildDir, "amd64")); err != nil {
+ return fmt.Errorf("failed to create link: %v", err)
+ }
+ if err := os.Symlink(filepath.Join(arch.sourceDir, "sys", "arch", "amd64", "include"),
+ filepath.Join(arch.buildDir, "machine")); err != nil {
+ return fmt.Errorf("failed to create link: %v", err)
+ }
+ return nil
+}
+
+func (*openbsd) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint64, map[string]bool, error) {
+ args := []string{
+ "-fmessage-length=0",
+ "-nostdinc",
+ "-D_KERNEL",
+ "-D__BSD_VISIBLE=1",
+ "-I", filepath.Join(arch.sourceDir, "sys"),
+ "-I", filepath.Join(arch.sourceDir, "sys", "sys"),
+ "-I", filepath.Join(arch.sourceDir, "sys", "arch", "amd64"),
+ "-I", filepath.Join(arch.sourceDir, "common", "include"),
+ "-I", filepath.Join(arch.sourceDir, "sys", "compat", "linux", "common"),
+ "-I", arch.buildDir,
+ }
+ for _, incdir := range info.Incdirs {
+ args = append(args, "-I"+filepath.Join(arch.sourceDir, incdir))
+ }
+ // Syscall consts on openbsd have weird prefixes sometimes,
+ // try to extract consts with these prefixes as well.
+ compatNames := make(map[string][]string)
+ for _, val := range info.Consts {
+ const SYS = "SYS_"
+ if strings.HasPrefix(val, SYS) {
+ for _, prefix := range []string{"_", "__", "___"} {
+ for _, suffix := range []string{"30", "50"} {
+ compat := SYS + prefix + val[len(SYS):] + suffix
+ compatNames[val] = append(compatNames[val], compat)
+ info.Consts = append(info.Consts, compat)
+ }
+ }
+ } else {
+ compat := "LINUX_" + val
+ compatNames[val] = append(compatNames[val], compat)
+ info.Consts = append(info.Consts, compat)
+ }
+ }
+ res, undeclared, err := extract(info, "gcc", args, "#include <sys/syscall.h>", false)
+ for orig, compats := range compatNames {
+ for _, compat := range compats {
+ if undeclared[orig] && !undeclared[compat] {
+ res[orig] = res[compat]
+ delete(res, compat)
+ delete(undeclared, orig)
+ }
+ delete(undeclared, compat)
+ }
+ }
+ return res, undeclared, err
+}
diff --git a/sys/targets/common.go b/sys/targets/common.go
index 80133fd97..abe8b6c39 100644
--- a/sys/targets/common.go
+++ b/sys/targets/common.go
@@ -52,6 +52,7 @@ type UnixSanitizer struct {
S_IFBLK uint64
S_IFIFO uint64
S_IFSOCK uint64
+ S_IFMT uint64
}
func MakeUnixSanitizer(target *prog.Target) *UnixSanitizer {
@@ -64,6 +65,7 @@ func MakeUnixSanitizer(target *prog.Target) *UnixSanitizer {
S_IFBLK: target.ConstMap["S_IFBLK"],
S_IFIFO: target.ConstMap["S_IFIFO"],
S_IFSOCK: target.ConstMap["S_IFSOCK"],
+ S_IFMT: target.ConstMap["S_IFMT"],
}
}
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index b9a278aec..130a642a8 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -177,6 +177,15 @@ var List = map[string]map[string]*Target{
CrossCFlags: []string{"-m64", "-static"},
},
},
+ "openbsd": {
+ "amd64": {
+ PtrSize: 8,
+ PageSize: 4 << 10,
+ CFlags: []string{"-m64"},
+ CCompiler: "c++",
+ CrossCFlags: []string{"-m64", "-static", "-lutil"},
+ },
+ },
"fuchsia": {
"amd64": {
PtrSize: 8,
@@ -253,6 +262,12 @@ var oses = map[string]osCommon{
ExecutorUsesShmem: true,
ExecutorUsesForkServer: true,
},
+ "openbsd": {
+ SyscallNumbers: true,
+ SyscallPrefix: "SYS_",
+ ExecutorUsesShmem: true,
+ ExecutorUsesForkServer: true,
+ },
"fuchsia": {
SyscallNumbers: false,
ExecutorUsesShmem: false,