mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 11:29:46 +00:00
fuchsia: Fix the extractor
tool.
The include path in Zircon has changed; updated syz-extract/fuchsia.go to include this, and re-ran extract to get updated *.const files.
This commit is contained in:
parent
113a43ffb6
commit
040e73d644
@ -2,7 +2,7 @@
|
||||
|
||||
#if defined(__x86_64__) || 0
|
||||
#define GOARCH "amd64"
|
||||
#define SYZ_REVISION "0a0b28e30dc33e2b0423bc11f59c8ea2ea705725"
|
||||
#define SYZ_REVISION "7b78fbcff5be58d55fce6250972288b9c5141689"
|
||||
#define SYZ_PAGE_SIZE 4096
|
||||
#define SYZ_NUM_PAGES 4096
|
||||
#define SYZ_DATA_OFFSET 536870912
|
||||
@ -178,7 +178,7 @@ call_t syscalls[] = {
|
||||
|
||||
#if defined(__aarch64__) || 0
|
||||
#define GOARCH "arm64"
|
||||
#define SYZ_REVISION "74a573534e65437e0464d61c1a66a2c76d5388e9"
|
||||
#define SYZ_REVISION "545421122ef05f52e8f98342789ed868018b192b"
|
||||
#define SYZ_PAGE_SIZE 4096
|
||||
#define SYZ_NUM_PAGES 4096
|
||||
#define SYZ_DATA_OFFSET 536870912
|
||||
|
@ -257,7 +257,7 @@ var syscalls_amd64 = []*Syscall{
|
||||
{Name: "dup3", CallName: "dup3", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "newfd", TypeSize: 4}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "dup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{524288}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "dup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "faccessat", CallName: "faccessat", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "dirfd", TypeSize: 4}},
|
||||
@ -355,13 +355,13 @@ var syscalls_amd64 = []*Syscall{
|
||||
}},
|
||||
{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, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1048576, 1024, 256, 65536, 2048, 524288, 131072, 4096, 8192, 512, 128, 16, 4194304, 96, 262144}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "openat", CallName: "openat", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", 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, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1048576, 1024, 256, 65536, 2048, 524288, 131072, 4096, 8192, 512, 128, 16, 4194304, 96, 262144}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "poll", CallName: "poll", Args: []Type{
|
||||
@ -1099,27 +1099,27 @@ var consts_amd64 = []ConstValue{
|
||||
{Name: "AT_REMOVEDIR", Value: 512},
|
||||
{Name: "AT_SYMLINK_FOLLOW", Value: 1024},
|
||||
{Name: "AT_SYMLINK_NOFOLLOW", Value: 256},
|
||||
{Name: "FASYNC", Value: 8192},
|
||||
{Name: "FASYNC", Value: 1024},
|
||||
{Name: "LOCK_EX", Value: 2},
|
||||
{Name: "LOCK_NB", Value: 4},
|
||||
{Name: "LOCK_SH", Value: 1},
|
||||
{Name: "LOCK_UN", Value: 8},
|
||||
{Name: "O_APPEND", Value: 1024},
|
||||
{Name: "O_CLOEXEC", Value: 524288},
|
||||
{Name: "O_CREAT", Value: 64},
|
||||
{Name: "O_DIRECT", Value: 16384},
|
||||
{Name: "O_DIRECTORY", Value: 65536},
|
||||
{Name: "O_EXCL", Value: 128},
|
||||
{Name: "O_LARGEFILE", Value: 32768},
|
||||
{Name: "O_NOATIME", Value: 262144},
|
||||
{Name: "O_NOCTTY", Value: 256},
|
||||
{Name: "O_NOFOLLOW", Value: 131072},
|
||||
{Name: "O_NONBLOCK", Value: 2048},
|
||||
{Name: "O_PATH", Value: 2097152},
|
||||
{Name: "O_APPEND", Value: 1048576},
|
||||
{Name: "O_CLOEXEC", Value: 256},
|
||||
{Name: "O_CREAT", Value: 65536},
|
||||
{Name: "O_DIRECT", Value: 2048},
|
||||
{Name: "O_DIRECTORY", Value: 524288},
|
||||
{Name: "O_EXCL", Value: 131072},
|
||||
{Name: "O_LARGEFILE", Value: 4096},
|
||||
{Name: "O_NOATIME", Value: 8192},
|
||||
{Name: "O_NOCTTY", Value: 512},
|
||||
{Name: "O_NOFOLLOW", Value: 128},
|
||||
{Name: "O_NONBLOCK", Value: 16},
|
||||
{Name: "O_PATH", Value: 4194304},
|
||||
{Name: "O_RDONLY"},
|
||||
{Name: "O_RDWR", Value: 2},
|
||||
{Name: "O_SYNC", Value: 1052672},
|
||||
{Name: "O_TRUNC", Value: 512},
|
||||
{Name: "O_SYNC", Value: 96},
|
||||
{Name: "O_TRUNC", Value: 262144},
|
||||
{Name: "O_WRONLY", Value: 1},
|
||||
{Name: "POLLERR", Value: 8},
|
||||
{Name: "POLLHUP", Value: 16},
|
||||
@ -1244,4 +1244,4 @@ var consts_amd64 = []ConstValue{
|
||||
{Name: "ZX_WAIT_ASYNC_REPEATING", Value: 1},
|
||||
}
|
||||
|
||||
const revision_amd64 = "0a0b28e30dc33e2b0423bc11f59c8ea2ea705725"
|
||||
const revision_amd64 = "7b78fbcff5be58d55fce6250972288b9c5141689"
|
||||
|
@ -257,7 +257,7 @@ var syscalls_arm64 = []*Syscall{
|
||||
{Name: "dup3", CallName: "dup3", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "oldfd", TypeSize: 4}},
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "newfd", TypeSize: 4}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "dup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{524288}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "dup_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{256}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "faccessat", CallName: "faccessat", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "dirfd", TypeSize: 4}},
|
||||
@ -355,13 +355,13 @@ var syscalls_arm64 = []*Syscall{
|
||||
}},
|
||||
{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, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1048576, 1024, 256, 65536, 2048, 524288, 131072, 4096, 8192, 512, 128, 16, 4194304, 96, 262144}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "openat", CallName: "openat", Args: []Type{
|
||||
&ResourceType{TypeCommon: TypeCommon{TypeName: "fd", 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, 1024, 8192, 524288, 64, 16384, 65536, 128, 32768, 262144, 256, 131072, 2048, 2097152, 1052672, 512}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_flags", FldName: "flags", TypeSize: 8}}, Vals: []uint64{0, 1, 2, 1048576, 1024, 256, 65536, 2048, 524288, 131072, 4096, 8192, 512, 128, 16, 4194304, 96, 262144}},
|
||||
&FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "open_mode", FldName: "mode", TypeSize: 8}}, Vals: []uint64{256, 128, 64, 32, 16, 8, 4, 2, 1}},
|
||||
}, Ret: &ResourceType{TypeCommon: TypeCommon{TypeName: "fd", FldName: "ret", TypeSize: 4, ArgDir: 1}}},
|
||||
{Name: "poll", CallName: "poll", Args: []Type{
|
||||
@ -1099,27 +1099,27 @@ var consts_arm64 = []ConstValue{
|
||||
{Name: "AT_REMOVEDIR", Value: 512},
|
||||
{Name: "AT_SYMLINK_FOLLOW", Value: 1024},
|
||||
{Name: "AT_SYMLINK_NOFOLLOW", Value: 256},
|
||||
{Name: "FASYNC", Value: 8192},
|
||||
{Name: "FASYNC", Value: 1024},
|
||||
{Name: "LOCK_EX", Value: 2},
|
||||
{Name: "LOCK_NB", Value: 4},
|
||||
{Name: "LOCK_SH", Value: 1},
|
||||
{Name: "LOCK_UN", Value: 8},
|
||||
{Name: "O_APPEND", Value: 1024},
|
||||
{Name: "O_CLOEXEC", Value: 524288},
|
||||
{Name: "O_CREAT", Value: 64},
|
||||
{Name: "O_DIRECT", Value: 16384},
|
||||
{Name: "O_DIRECTORY", Value: 65536},
|
||||
{Name: "O_EXCL", Value: 128},
|
||||
{Name: "O_LARGEFILE", Value: 32768},
|
||||
{Name: "O_NOATIME", Value: 262144},
|
||||
{Name: "O_NOCTTY", Value: 256},
|
||||
{Name: "O_NOFOLLOW", Value: 131072},
|
||||
{Name: "O_NONBLOCK", Value: 2048},
|
||||
{Name: "O_PATH", Value: 2097152},
|
||||
{Name: "O_APPEND", Value: 1048576},
|
||||
{Name: "O_CLOEXEC", Value: 256},
|
||||
{Name: "O_CREAT", Value: 65536},
|
||||
{Name: "O_DIRECT", Value: 2048},
|
||||
{Name: "O_DIRECTORY", Value: 524288},
|
||||
{Name: "O_EXCL", Value: 131072},
|
||||
{Name: "O_LARGEFILE", Value: 4096},
|
||||
{Name: "O_NOATIME", Value: 8192},
|
||||
{Name: "O_NOCTTY", Value: 512},
|
||||
{Name: "O_NOFOLLOW", Value: 128},
|
||||
{Name: "O_NONBLOCK", Value: 16},
|
||||
{Name: "O_PATH", Value: 4194304},
|
||||
{Name: "O_RDONLY"},
|
||||
{Name: "O_RDWR", Value: 2},
|
||||
{Name: "O_SYNC", Value: 1052672},
|
||||
{Name: "O_TRUNC", Value: 512},
|
||||
{Name: "O_SYNC", Value: 96},
|
||||
{Name: "O_TRUNC", Value: 262144},
|
||||
{Name: "O_WRONLY", Value: 1},
|
||||
{Name: "POLLERR", Value: 8},
|
||||
{Name: "POLLHUP", Value: 16},
|
||||
@ -1244,4 +1244,4 @@ var consts_arm64 = []ConstValue{
|
||||
{Name: "ZX_WAIT_ASYNC_REPEATING", Value: 1},
|
||||
}
|
||||
|
||||
const revision_arm64 = "74a573534e65437e0464d61c1a66a2c76d5388e9"
|
||||
const revision_arm64 = "545421122ef05f52e8f98342789ed868018b192b"
|
||||
|
@ -5,27 +5,27 @@ AT_NO_AUTOMOUNT = 2048
|
||||
AT_REMOVEDIR = 512
|
||||
AT_SYMLINK_FOLLOW = 1024
|
||||
AT_SYMLINK_NOFOLLOW = 256
|
||||
FASYNC = 8192
|
||||
FASYNC = 1024
|
||||
LOCK_EX = 2
|
||||
LOCK_NB = 4
|
||||
LOCK_SH = 1
|
||||
LOCK_UN = 8
|
||||
O_APPEND = 1024
|
||||
O_CLOEXEC = 524288
|
||||
O_CREAT = 64
|
||||
O_DIRECT = 16384
|
||||
O_DIRECTORY = 65536
|
||||
O_EXCL = 128
|
||||
O_LARGEFILE = 32768
|
||||
O_NOATIME = 262144
|
||||
O_NOCTTY = 256
|
||||
O_NOFOLLOW = 131072
|
||||
O_NONBLOCK = 2048
|
||||
O_PATH = 2097152
|
||||
O_APPEND = 1048576
|
||||
O_CLOEXEC = 256
|
||||
O_CREAT = 65536
|
||||
O_DIRECT = 2048
|
||||
O_DIRECTORY = 524288
|
||||
O_EXCL = 131072
|
||||
O_LARGEFILE = 4096
|
||||
O_NOATIME = 8192
|
||||
O_NOCTTY = 512
|
||||
O_NOFOLLOW = 128
|
||||
O_NONBLOCK = 16
|
||||
O_PATH = 4194304
|
||||
O_RDONLY = 0
|
||||
O_RDWR = 2
|
||||
O_SYNC = 1052672
|
||||
O_TRUNC = 512
|
||||
O_SYNC = 96
|
||||
O_TRUNC = 262144
|
||||
O_WRONLY = 1
|
||||
POLLERR = 8
|
||||
POLLHUP = 16
|
||||
|
@ -5,27 +5,27 @@ AT_NO_AUTOMOUNT = 2048
|
||||
AT_REMOVEDIR = 512
|
||||
AT_SYMLINK_FOLLOW = 1024
|
||||
AT_SYMLINK_NOFOLLOW = 256
|
||||
FASYNC = 8192
|
||||
FASYNC = 1024
|
||||
LOCK_EX = 2
|
||||
LOCK_NB = 4
|
||||
LOCK_SH = 1
|
||||
LOCK_UN = 8
|
||||
O_APPEND = 1024
|
||||
O_CLOEXEC = 524288
|
||||
O_CREAT = 64
|
||||
O_DIRECT = 16384
|
||||
O_DIRECTORY = 65536
|
||||
O_EXCL = 128
|
||||
O_LARGEFILE = 32768
|
||||
O_NOATIME = 262144
|
||||
O_NOCTTY = 256
|
||||
O_NOFOLLOW = 131072
|
||||
O_NONBLOCK = 2048
|
||||
O_PATH = 2097152
|
||||
O_APPEND = 1048576
|
||||
O_CLOEXEC = 256
|
||||
O_CREAT = 65536
|
||||
O_DIRECT = 2048
|
||||
O_DIRECTORY = 524288
|
||||
O_EXCL = 131072
|
||||
O_LARGEFILE = 4096
|
||||
O_NOATIME = 8192
|
||||
O_NOCTTY = 512
|
||||
O_NOFOLLOW = 128
|
||||
O_NONBLOCK = 16
|
||||
O_PATH = 4194304
|
||||
O_RDONLY = 0
|
||||
O_RDWR = 2
|
||||
O_SYNC = 1052672
|
||||
O_TRUNC = 512
|
||||
O_SYNC = 96
|
||||
O_TRUNC = 262144
|
||||
O_WRONLY = 1
|
||||
POLLERR = 8
|
||||
POLLHUP = 16
|
||||
|
@ -1,4 +0,0 @@
|
||||
# AUTOGENERATED FILE
|
||||
ZX_CLOCK_MONOTONIC = 0
|
||||
ZX_CLOCK_THREAD = 2
|
||||
ZX_CLOCK_UTC = 1
|
@ -1,4 +0,0 @@
|
||||
# AUTOGENERATED FILE
|
||||
ZX_CLOCK_MONOTONIC = 0
|
||||
ZX_CLOCK_THREAD = 2
|
||||
ZX_CLOCK_UTC = 1
|
@ -25,8 +25,9 @@ func (*fuchsia) prepareArch(arch *Arch) error {
|
||||
|
||||
func (*fuchsia) processFile(arch *Arch, info *compiler.ConstInfo) (map[string]uint64, map[string]bool, error) {
|
||||
dir := arch.sourceDir
|
||||
headerArch := arch.target.KernelHeaderArch
|
||||
cc := filepath.Join(dir, "buildtools", "linux-x64", "clang", "bin", "clang")
|
||||
includeDir := filepath.Join(dir, "out", "build-zircon", "build-user-x86-64", "sysroot", "include")
|
||||
includeDir := filepath.Join(dir, "out", "build-zircon", "build-"+headerArch, "sysroot", "include")
|
||||
args := []string{"-fmessage-length=0", "-I" + includeDir}
|
||||
for _, incdir := range info.Incdirs {
|
||||
args = append(args, "-I"+filepath.Join(dir, incdir))
|
||||
|
@ -118,14 +118,16 @@ var List = map[string]map[string]*Target{
|
||||
},
|
||||
"fuchsia": map[string]*Target{
|
||||
"amd64": {
|
||||
PtrSize: 8,
|
||||
PageSize: 4 << 10,
|
||||
CArch: []string{"__x86_64__"},
|
||||
PtrSize: 8,
|
||||
PageSize: 4 << 10,
|
||||
CArch: []string{"__x86_64__"},
|
||||
KernelHeaderArch: "x64",
|
||||
},
|
||||
"arm64": {
|
||||
PtrSize: 8,
|
||||
PageSize: 4 << 10,
|
||||
CArch: []string{"__aarch64__"},
|
||||
PtrSize: 8,
|
||||
PageSize: 4 << 10,
|
||||
CArch: []string{"__aarch64__"},
|
||||
KernelHeaderArch: "arm64",
|
||||
},
|
||||
},
|
||||
"windows": map[string]*Target{
|
||||
|
Loading…
Reference in New Issue
Block a user