mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-24 20:09:49 +00:00
sys/linux: remove get_kernel_syms, add quotactl syscall
get_kernel_syms does not seem to be present upstream. Describe an old quotactl syscall. Also fix umount/umount2 names in kallsyms.
This commit is contained in:
parent
e4f20040fb
commit
f07ea3fc22
@ -2,7 +2,7 @@
|
||||
|
||||
#if defined(__i386__) || 0
|
||||
#define GOARCH "386"
|
||||
#define SYZ_REVISION "c2ad412fa9428e52c81923f215215bc6da6d5783"
|
||||
#define SYZ_REVISION "4fe4a655475beb6e3a3ba300d55a7a7a050a5015"
|
||||
#define __NR_syz_emit_ethernet 1000000
|
||||
#define __NR_syz_extract_tcp_res 1000001
|
||||
#define __NR_syz_fuse_mount 1000002
|
||||
@ -146,7 +146,6 @@ call_t syscalls[] = {
|
||||
{"ftruncate", 93},
|
||||
{"futex", 240},
|
||||
{"futimesat", 299},
|
||||
{"get_kernel_syms", 130},
|
||||
{"get_mempolicy", 275},
|
||||
{"get_robust_list", 312},
|
||||
{"get_thread_area", 244},
|
||||
@ -1005,6 +1004,7 @@ call_t syscalls[] = {
|
||||
{"ptrace$setsig", 26},
|
||||
{"pwrite64", 181},
|
||||
{"pwritev", 334},
|
||||
{"quotactl", 131},
|
||||
{"read", 3},
|
||||
{"read$eventfd", 3},
|
||||
{"readahead", 225},
|
||||
@ -1506,7 +1506,7 @@ call_t syscalls[] = {
|
||||
|
||||
#if defined(__x86_64__) || 0
|
||||
#define GOARCH "amd64"
|
||||
#define SYZ_REVISION "ca7616dae83a010ec8e24b13fc2443c8a37593d6"
|
||||
#define SYZ_REVISION "7a950be35f2798eefd0ac374561c8e547930bab1"
|
||||
#define __NR_syz_emit_ethernet 1000000
|
||||
#define __NR_syz_extract_tcp_res 1000001
|
||||
#define __NR_syz_fuse_mount 1000002
|
||||
@ -1661,7 +1661,6 @@ call_t syscalls[] = {
|
||||
{"ftruncate", 77},
|
||||
{"futex", 202},
|
||||
{"futimesat", 261},
|
||||
{"get_kernel_syms", 177},
|
||||
{"get_mempolicy", 239},
|
||||
{"get_robust_list", 274},
|
||||
{"get_thread_area", 211},
|
||||
@ -2541,6 +2540,7 @@ call_t syscalls[] = {
|
||||
{"ptrace$setsig", 101},
|
||||
{"pwrite64", 18},
|
||||
{"pwritev", 296},
|
||||
{"quotactl", 179},
|
||||
{"read", 0},
|
||||
{"read$eventfd", 0},
|
||||
{"readahead", 187},
|
||||
@ -3071,7 +3071,7 @@ call_t syscalls[] = {
|
||||
|
||||
#if defined(__arm__) || 0
|
||||
#define GOARCH "arm"
|
||||
#define SYZ_REVISION "47bc2db581ec9f3bb9eacaad5ff9eddf6cfc7aee"
|
||||
#define SYZ_REVISION "3e82bd4cd1086a2a09bd9b24c142921199bd5821"
|
||||
#define __NR_syz_emit_ethernet 1000000
|
||||
#define __NR_syz_extract_tcp_res 1000001
|
||||
#define __NR_syz_fuse_mount 1000002
|
||||
@ -3081,7 +3081,7 @@ call_t syscalls[] = {
|
||||
#define __NR_syz_open_pts 1000006
|
||||
#define __NR_syz_test 1000007
|
||||
|
||||
unsigned syscall_count = 1500;
|
||||
unsigned syscall_count = 1501;
|
||||
call_t syscalls[] = {
|
||||
{"accept", 9437469},
|
||||
{"accept$alg", 9437469},
|
||||
@ -4061,6 +4061,7 @@ call_t syscalls[] = {
|
||||
{"ptrace$setsig", 9437210},
|
||||
{"pwrite64", 9437365},
|
||||
{"pwritev", 9437546},
|
||||
{"quotactl", 9437315},
|
||||
{"read", 9437187},
|
||||
{"read$eventfd", 9437187},
|
||||
{"readahead", 9437409},
|
||||
@ -4589,7 +4590,7 @@ call_t syscalls[] = {
|
||||
|
||||
#if defined(__aarch64__) || 0
|
||||
#define GOARCH "arm64"
|
||||
#define SYZ_REVISION "c82ad046c604ce72a470b53ec40a7d7c878df2b3"
|
||||
#define SYZ_REVISION "043368a9e3f6b8146d46fa8d192bc033b66c707b"
|
||||
#define __NR_syz_emit_ethernet 1000000
|
||||
#define __NR_syz_extract_tcp_res 1000001
|
||||
#define __NR_syz_fuse_mount 1000002
|
||||
@ -4599,7 +4600,7 @@ call_t syscalls[] = {
|
||||
#define __NR_syz_open_pts 1000006
|
||||
#define __NR_syz_test 1000007
|
||||
|
||||
unsigned syscall_count = 1475;
|
||||
unsigned syscall_count = 1476;
|
||||
call_t syscalls[] = {
|
||||
{"accept", 202},
|
||||
{"accept$alg", 202},
|
||||
@ -5569,6 +5570,7 @@ call_t syscalls[] = {
|
||||
{"ptrace$setsig", 117},
|
||||
{"pwrite64", 68},
|
||||
{"pwritev", 70},
|
||||
{"quotactl", 60},
|
||||
{"read", 63},
|
||||
{"read$eventfd", 63},
|
||||
{"readahead", 213},
|
||||
@ -6082,7 +6084,7 @@ call_t syscalls[] = {
|
||||
|
||||
#if defined(__ppc64__) || defined(__PPC64__) || defined(__powerpc64__) || 0
|
||||
#define GOARCH "ppc64le"
|
||||
#define SYZ_REVISION "ae136950701316bb49b0ea1ddaa4434b486da7d0"
|
||||
#define SYZ_REVISION "c893d2cc4874589a0e71bd3f9dad5facd0f5f502"
|
||||
#define __NR_syz_emit_ethernet 1000000
|
||||
#define __NR_syz_extract_tcp_res 1000001
|
||||
#define __NR_syz_fuse_mount 1000002
|
||||
@ -6236,7 +6238,6 @@ call_t syscalls[] = {
|
||||
{"ftruncate", 93},
|
||||
{"futex", 221},
|
||||
{"futimesat", 290},
|
||||
{"get_kernel_syms", 130},
|
||||
{"get_mempolicy", 260},
|
||||
{"get_robust_list", 299},
|
||||
{"getcwd", 182},
|
||||
@ -7057,6 +7058,7 @@ call_t syscalls[] = {
|
||||
{"ptrace$setsig", 26},
|
||||
{"pwrite64", 180},
|
||||
{"pwritev", 321},
|
||||
{"quotactl", 131},
|
||||
{"read", 3},
|
||||
{"read$eventfd", 3},
|
||||
{"readahead", 191},
|
||||
|
@ -54,7 +54,19 @@ func isSupported(kallsyms []byte, c *prog.Syscall) bool {
|
||||
if len(kallsyms) == 0 {
|
||||
return true
|
||||
}
|
||||
return bytes.Index(kallsyms, []byte(" T sys_"+c.CallName+"\n")) != -1
|
||||
name := c.CallName
|
||||
if newname := kallsymsMap[name]; newname != "" {
|
||||
name = newname
|
||||
}
|
||||
return bytes.Index(kallsyms, []byte(" T sys_"+name+"\n")) != -1
|
||||
}
|
||||
|
||||
// Some syscall names diverge in __NR_* consts and kallsyms.
|
||||
// umount2 is renamed to umount in arch/x86/entry/syscalls/syscall_64.tbl.
|
||||
// Where umount is renamed to oldumount is unclear.
|
||||
var kallsymsMap = map[string]string{
|
||||
"umount": "oldumount",
|
||||
"umount2": "umount",
|
||||
}
|
||||
|
||||
func isSupportedSyzkall(c *prog.Syscall) bool {
|
||||
|
1729
sys/linux/386.go
1729
sys/linux/386.go
File diff suppressed because it is too large
Load Diff
1771
sys/linux/amd64.go
1771
sys/linux/amd64.go
File diff suppressed because it is too large
Load Diff
1058
sys/linux/arm.go
1058
sys/linux/arm.go
File diff suppressed because it is too large
Load Diff
1028
sys/linux/arm64.go
1028
sys/linux/arm64.go
File diff suppressed because it is too large
Load Diff
1658
sys/linux/ppc64le.go
1658
sys/linux/ppc64le.go
File diff suppressed because it is too large
Load Diff
@ -329,6 +329,7 @@ chroot(dir ptr[in, filename])
|
||||
getcwd(buf buffer[out], size len[buf])
|
||||
chdir(dir ptr[in, filename])
|
||||
fchdir(fd fd)
|
||||
quotactl(cmd intptr, special ptr[in, filename], id uid, addr ptr[in, array[int8]])
|
||||
|
||||
mount(src ptr[in, filename], dst ptr[in, filename], type ptr[in, string[filesystem]], flags flags[mount_flags], data buffer[in, opt])
|
||||
umount2(path ptr[in, filename], flags flags[umount_flags])
|
||||
@ -347,7 +348,6 @@ init_module(mod ptr[in, string], len len[mod], args ptr[in, string])
|
||||
finit_module(fd fd, args ptr[in, string], flags flags[finit_module_flags])
|
||||
delete_module(name ptr[in, string], flags flags[delete_module_flags])
|
||||
kexec_load(entry intptr, nr_segments len[segments], segments ptr[in, array[kexec_segment]], flags flags[kexec_load_flags])
|
||||
get_kernel_syms(table buffer[out])
|
||||
syslog(cmd flags[syslog_cmd], buf buffer[out, opt], len len[buf])
|
||||
uname(buf buffer[out])
|
||||
sysinfo(info buffer[out])
|
||||
|
@ -655,7 +655,6 @@ __NR_fsync = 118
|
||||
__NR_ftruncate = 93
|
||||
__NR_futex = 240
|
||||
__NR_futimesat = 299
|
||||
__NR_get_kernel_syms = 130
|
||||
__NR_get_mempolicy = 275
|
||||
__NR_get_robust_list = 312
|
||||
__NR_get_thread_area = 244
|
||||
@ -756,6 +755,7 @@ __NR_pselect6 = 308
|
||||
__NR_ptrace = 26
|
||||
__NR_pwrite64 = 181
|
||||
__NR_pwritev = 334
|
||||
__NR_quotactl = 131
|
||||
__NR_read = 3
|
||||
__NR_readahead = 225
|
||||
__NR_readlink = 85
|
||||
|
@ -655,7 +655,6 @@ __NR_fsync = 74
|
||||
__NR_ftruncate = 77
|
||||
__NR_futex = 202
|
||||
__NR_futimesat = 261
|
||||
__NR_get_kernel_syms = 177
|
||||
__NR_get_mempolicy = 239
|
||||
__NR_get_robust_list = 274
|
||||
__NR_get_thread_area = 211
|
||||
@ -755,6 +754,7 @@ __NR_pselect6 = 270
|
||||
__NR_ptrace = 101
|
||||
__NR_pwrite64 = 18
|
||||
__NR_pwritev = 296
|
||||
__NR_quotactl = 179
|
||||
__NR_read = 0
|
||||
__NR_readahead = 187
|
||||
__NR_readlink = 89
|
||||
|
@ -231,6 +231,7 @@ MADV_SEQUENTIAL = 2
|
||||
MADV_SOFT_OFFLINE = 101
|
||||
MADV_UNMERGEABLE = 13
|
||||
MADV_WILLNEED = 3
|
||||
MAP_32BIT = 0
|
||||
MAP_ANONYMOUS = 32
|
||||
MAP_DENYWRITE = 2048
|
||||
MAP_EXECUTABLE = 4096
|
||||
@ -745,6 +746,7 @@ __NR_pselect6 = 9437519
|
||||
__NR_ptrace = 9437210
|
||||
__NR_pwrite64 = 9437365
|
||||
__NR_pwritev = 9437546
|
||||
__NR_quotactl = 9437315
|
||||
__NR_read = 9437187
|
||||
__NR_readahead = 9437409
|
||||
__NR_readlink = 9437269
|
||||
|
@ -231,6 +231,7 @@ MADV_SEQUENTIAL = 2
|
||||
MADV_SOFT_OFFLINE = 101
|
||||
MADV_UNMERGEABLE = 13
|
||||
MADV_WILLNEED = 3
|
||||
MAP_32BIT = 0
|
||||
MAP_ANONYMOUS = 32
|
||||
MAP_DENYWRITE = 2048
|
||||
MAP_EXECUTABLE = 4096
|
||||
@ -721,6 +722,7 @@ __NR_pselect6 = 72
|
||||
__NR_ptrace = 117
|
||||
__NR_pwrite64 = 68
|
||||
__NR_pwritev = 70
|
||||
__NR_quotactl = 60
|
||||
__NR_read = 63
|
||||
__NR_readahead = 213
|
||||
__NR_readlinkat = 78
|
||||
|
@ -231,6 +231,7 @@ MADV_SEQUENTIAL = 2
|
||||
MADV_SOFT_OFFLINE = 101
|
||||
MADV_UNMERGEABLE = 13
|
||||
MADV_WILLNEED = 3
|
||||
MAP_32BIT = 0
|
||||
MAP_ANONYMOUS = 32
|
||||
MAP_DENYWRITE = 2048
|
||||
MAP_EXECUTABLE = 4096
|
||||
@ -651,7 +652,6 @@ __NR_fsync = 118
|
||||
__NR_ftruncate = 93
|
||||
__NR_futex = 221
|
||||
__NR_futimesat = 290
|
||||
__NR_get_kernel_syms = 130
|
||||
__NR_get_mempolicy = 260
|
||||
__NR_get_robust_list = 299
|
||||
__NR_getcwd = 182
|
||||
@ -747,6 +747,7 @@ __NR_pselect6 = 280
|
||||
__NR_ptrace = 26
|
||||
__NR_pwrite64 = 180
|
||||
__NR_pwritev = 321
|
||||
__NR_quotactl = 131
|
||||
__NR_read = 3
|
||||
__NR_readahead = 191
|
||||
__NR_readlink = 85
|
||||
|
Loading…
Reference in New Issue
Block a user