sys/freebsd: add minherit(2)

This commit is contained in:
Mark Johnston 2020-03-26 12:34:19 -04:00 committed by Dmitry Vyukov
parent edada2ecad
commit 31f17aa979
7 changed files with 38 additions and 4 deletions

4
executor/defs.h generated
View File

@ -20,7 +20,7 @@
#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "859d11e279ca221ebc432c9bd70aed2df0de00ae"
#define SYZ_REVISION "543e680b034e0f8ba667a876dd8e62433e42847e"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -30,7 +30,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "f6edc842471e74f5620eb10327dc7a095ae28e49"
#define SYZ_REVISION "4475df7310d3645fe3e88ec5e3759ec0cc90ec24"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096

2
executor/syscalls.h generated
View File

@ -488,6 +488,7 @@ const call_t syscalls[] = {
{"lseek", 478},
{"madvise", 75},
{"mincore", 78},
{"minherit", 250},
{"mkdir", 136},
{"mkdirat", 496},
{"mknodat", 559},
@ -991,6 +992,7 @@ const call_t syscalls[] = {
{"lseek", 478},
{"madvise", 75},
{"mincore", 78},
{"minherit", 250},
{"mkdir", 136},
{"mkdirat", 496},
{"mknodat", 559},

12
sys/freebsd/gen/386.go generated
View File

@ -3259,6 +3259,11 @@ var syscalls_386 = []*Syscall{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 4}}, Path: []string{"addr"}},
&PtrType{TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 4}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
}},
{NR: 250, Name: "minherit", CallName: "minherit", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 4}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 4}}, Path: []string{"addr"}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "minherit_flags", FldName: "inherit", TypeSize: 4}}, Vals: []uint64{0, 1, 2, 3}},
}},
{NR: 136, Name: "mkdir", CallName: "mkdir", Args: []Type{
&PtrType{TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 4}, &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
&FlagsType{IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 4}}, []uint64{1, 2, 4, 8, 16, 32, 64, 128, 256}, true},
@ -5045,6 +5050,10 @@ var consts_386 = []ConstValue{
{"ICMP_UNREACH_TOSHOST", 12},
{"ICMP_UNREACH_TOSNET", 11},
{"IFNAMSIZ", 16},
{"INHERIT_COPY", 1},
{"INHERIT_NONE", 2},
{Name: "INHERIT_SHARE"},
{"INHERIT_ZERO", 3},
{"IP6OPT_JUMBO", 194},
{Name: "IP6OPT_PAD1"},
{"IP6OPT_PADN", 1},
@ -5574,6 +5583,7 @@ var consts_386 = []ConstValue{
{"SYS_lseek", 478},
{"SYS_madvise", 75},
{"SYS_mincore", 78},
{"SYS_minherit", 250},
{"SYS_mkdir", 136},
{"SYS_mkdirat", 496},
{"SYS_mknodat", 559},
@ -5709,4 +5719,4 @@ var consts_386 = []ConstValue{
{"WUNTRACED", 2},
}
const revision_386 = "859d11e279ca221ebc432c9bd70aed2df0de00ae"
const revision_386 = "543e680b034e0f8ba667a876dd8e62433e42847e"

View File

@ -3286,6 +3286,11 @@ var syscalls_amd64 = []*Syscall{
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "size", TypeSize: 8}}, Path: []string{"addr"}},
&PtrType{TypeCommon{TypeName: "ptr", FldName: "vec", TypeSize: 8}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
}},
{NR: 250, Name: "minherit", CallName: "minherit", Args: []Type{
&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "addr", TypeSize: 8}},
&LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "len", TypeSize: 8}}, Path: []string{"addr"}},
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "minherit_flags", FldName: "inherit", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 3}},
}},
{NR: 136, Name: "mkdir", CallName: "mkdir", Args: []Type{
&PtrType{TypeCommon{TypeName: "ptr", FldName: "path", TypeSize: 8}, &BufferType{TypeCommon: TypeCommon{TypeName: "filename", IsVarlen: true}, Kind: 3}},
&FlagsType{IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, []uint64{1, 2, 4, 8, 16, 32, 64, 128, 256}, true},
@ -5072,6 +5077,10 @@ var consts_amd64 = []ConstValue{
{"ICMP_UNREACH_TOSHOST", 12},
{"ICMP_UNREACH_TOSNET", 11},
{"IFNAMSIZ", 16},
{"INHERIT_COPY", 1},
{"INHERIT_NONE", 2},
{Name: "INHERIT_SHARE"},
{"INHERIT_ZERO", 3},
{"IP6OPT_JUMBO", 194},
{Name: "IP6OPT_PAD1"},
{"IP6OPT_PADN", 1},
@ -5601,6 +5610,7 @@ var consts_amd64 = []ConstValue{
{"SYS_lseek", 478},
{"SYS_madvise", 75},
{"SYS_mincore", 78},
{"SYS_minherit", 250},
{"SYS_mkdir", 136},
{"SYS_mkdirat", 496},
{"SYS_mknodat", 559},
@ -5736,4 +5746,4 @@ var consts_amd64 = []ConstValue{
{"WUNTRACED", 2},
}
const revision_amd64 = "f6edc842471e74f5620eb10327dc7a095ae28e49"
const revision_amd64 = "4475df7310d3645fe3e88ec5e3759ec0cc90ec24"

View File

@ -34,6 +34,7 @@ ppoll(fds ptr[in, array[pollfd]], nfds len[fds], tsp ptr[in, timespec], sigmask
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])
minherit(addr vma, len len[addr], inherit flags[minherit_flags])
fcntl$dupfd(fd fd, cmd flags[fcntl_dupfd], arg fd) fd
fcntl$getflags(fd fd, cmd flags[fcntl_getflags])
@ -213,3 +214,4 @@ fcntl_lock = F_SETLK, F_SETLKW, F_GETLK
fcntl_flags = FD_CLOEXEC
fcntl_status = O_APPEND, FASYNC, O_DIRECT, O_NONBLOCK
flock_type = F_RDLCK, F_WRLCK, F_UNLCK
minherit_flags = INHERIT_SHARE, INHERIT_NONE, INHERIT_COPY, INHERIT_ZERO

View File

@ -22,6 +22,10 @@ F_SETLKW = 13
F_SETOWN = 6
F_UNLCK = 2
F_WRLCK = 3
INHERIT_COPY = 1
INHERIT_NONE = 2
INHERIT_SHARE = 0
INHERIT_ZERO = 3
ITIMER_PROF = 2
ITIMER_REAL = 0
ITIMER_VIRTUAL = 1
@ -103,6 +107,7 @@ SYS_lchown = 254
SYS_link = 9
SYS_linkat = 495
SYS_mincore = 78
SYS_minherit = 250
SYS_mkdir = 136
SYS_mkdirat = 496
SYS_mknodat = 559

View File

@ -22,6 +22,10 @@ F_SETLKW = 13
F_SETOWN = 6
F_UNLCK = 2
F_WRLCK = 3
INHERIT_COPY = 1
INHERIT_NONE = 2
INHERIT_SHARE = 0
INHERIT_ZERO = 3
ITIMER_PROF = 2
ITIMER_REAL = 0
ITIMER_VIRTUAL = 1
@ -103,6 +107,7 @@ SYS_lchown = 254
SYS_link = 9
SYS_linkat = 495
SYS_mincore = 78
SYS_minherit = 250
SYS_mkdir = 136
SYS_mkdirat = 496
SYS_mknodat = 559