Skip to content

Commit 3986d94

Browse files
committed
syscall updates
Signed-off-by: Kyle Quest <kcq.public@gmail.com>
1 parent 948aa8f commit 3986d94

File tree

4 files changed

+196
-19
lines changed

4 files changed

+196
-19
lines changed

pkg/system/syscalls_armf32.go

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const (
44
SyscallArmUnknownNum = -1
55
SyscallArmUnknownName = "unknown_syscall"
66
SyscallArmMinNum32 = 0
7-
SyscallArmMaxNum32 = 377
8-
SyscallArmLastName32 = "process_vm_writev"
7+
SyscallArmMaxNum32 = 462
8+
SyscallArmLastName32 = "mseal"
99
)
10-
10+
// https://github.com/torvalds/linux/blob/master/arch/arm64/tools/syscall_32.tbl , https://github.com/torvalds/linux/blob/master/arch/arm/tools/syscall.tbl
1111
var syscallNumTableArmFamily32 = map[uint32]string{
1212
0: "restart_syscall",
1313
1: "exit",
@@ -353,7 +353,89 @@ var syscallNumTableArmFamily32 = map[uint32]string{
353353
374: "sendmmsg",
354354
375: "setns",
355355
376: "process_vm_readv",
356-
377: "process_vm_writev",
356+
377: "process_vm_writev", //
357+
378: "kcmp",
358+
379: "finit_module",
359+
380: "sched_setattr",
360+
381: "sched_getattr",
361+
382: "renameat2",
362+
383: "seccomp",
363+
384: "getrandom",
364+
385: "memfd_create",
365+
386: "bpf",
366+
387: "execveat",
367+
388: "userfaultfd",
368+
389: "membarrier",
369+
390: "mlock2",
370+
391: "copy_file_range",
371+
392: "preadv2",
372+
393: "pwritev2",
373+
394: "pkey_mprotect",
374+
395: "pkey_alloc",
375+
396: "pkey_free",
376+
397: "statx",
377+
398: "rseq",
378+
399: "io_pgetevents",
379+
400: "migrate_pages",
380+
401: "kexec_file_load",
381+
403: "clock_gettime64",
382+
404: "clock_settime64",
383+
405: "clock_adjtime64",
384+
406: "clock_getres_time64",
385+
407: "clock_nanosleep_time64",
386+
408: "timer_gettime64",
387+
409: "timer_settime64",
388+
410: "timerfd_gettime64",
389+
411: "timerfd_settime64",
390+
412: "utimensat_time64",
391+
413: "pselect6_time64",
392+
414: "ppoll_time64",
393+
416: "io_pgetevents_time64",
394+
417: "recvmmsg_time64",
395+
418: "mq_timedsend_time64",
396+
419: "mq_timedreceive_time64",
397+
420: "semtimedop_time64",
398+
421: "rt_sigtimedwait_time64",
399+
422: "futex_time64",
400+
423: "sched_rr_get_interval_time64",
401+
424: "pidfd_send_signal",
402+
425: "io_uring_setup",
403+
426: "io_uring_enter",
404+
427: "io_uring_register",
405+
428: "open_tree",
406+
429: "move_mount",
407+
430: "fsopen",
408+
431: "fsconfig",
409+
432: "fsmount",
410+
433: "fspick",
411+
434: "pidfd_open",
412+
435: "clone3",
413+
436: "close_range",
414+
437: "openat2",
415+
438: "pidfd_getfd",
416+
439: "faccessat2",
417+
440: "process_madvise",
418+
441: "epoll_pwait2",
419+
442: "mount_setattr",
420+
443: "quotactl_fd",
421+
444: "landlock_create_ruleset",
422+
445: "landlock_add_rule",
423+
446: "landlock_restrict_self",
424+
448: "process_mrelease",
425+
449: "futex_waitv",
426+
450: "set_mempolicy_home_node",
427+
451: "cachestat",
428+
452: "fchmodat2",
429+
453: "map_shadow_stack",
430+
454: "futex_wake",
431+
455: "futex_wait",
432+
456: "futex_requeue",
433+
457: "statmount",
434+
458: "listmount",
435+
459: "lsm_get_self_attr",
436+
460: "lsm_set_self_attr",
437+
461: "lsm_list_modules",
438+
462: "mseal",
357439
}
358440

359441
func callNameArmFamily32(num uint32) string {

pkg/system/syscalls_armf64.go

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const (
44
SyscallArmUnknownNum64 = -1
55
SyscallArmUnknownName64 = "unknown_syscall"
66
SyscallArmMinNum64 = 0
7-
SyscallArmMaxNum64 = 294
8-
SyscallArmLastName64 = "kexec_file_load"
7+
SyscallArmMaxNum64 = 462
8+
SyscallArmLastName64 = "mseal"
99
)
10-
10+
// https://github.com/torvalds/linux/blob/master/scripts/syscall.tbl
1111
var syscallNumTableArmFamily64 = map[uint32]string{
1212
0: "io_setup",
1313
1: "io_destroy",
@@ -289,6 +289,47 @@ var syscallNumTableArmFamily64 = map[uint32]string{
289289
292: "io_pgetevents",
290290
293: "rseq",
291291
294: "kexec_file_load",
292+
293+
294+
424: "pidfd_send_signal",
295+
425: "io_uring_setup",
296+
426: "io_uring_enter",
297+
427: "io_uring_register",
298+
428: "open_tree",
299+
429: "move_mount",
300+
430: "fsopen",
301+
431: "fsconfig",
302+
432: "fsmount",
303+
433: "fspick",
304+
434: "pidfd_open",
305+
435: "clone3",
306+
436: "close_range",
307+
437: "openat2",
308+
438: "pidfd_getfd",
309+
439: "faccessat2",
310+
440: "process_madvise",
311+
441: "epoll_pwait2",
312+
442: "mount_setattr",
313+
443: "quotactl_fd",
314+
444: "landlock_create_ruleset",
315+
445: "landlock_add_rule",
316+
446: "landlock_restrict_self",
317+
447: "memfd_secret",
318+
448: "process_mrelease",
319+
449: "futex_waitv",
320+
450: "set_mempolicy_home_node",
321+
451: "cachestat",
322+
452: "fchmodat2",
323+
453: "map_shadow_stack",
324+
454: "futex_wake",
325+
455: "futex_wait",
326+
456: "futex_requeue",
327+
457: "statmount",
328+
458: "listmount",
329+
459: "lsm_get_self_attr",
330+
460: "lsm_set_self_attr",
331+
461: "lsm_list_modules",
332+
462: "mseal",
292333
}
293334

294335
func callNameArmFamily64(num uint32) string {

pkg/system/syscalls_x86f32.go

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package system
22

33
const (
4-
SyscallX86MaxNum32 = 435
5-
SyscallX86LastName32 = "clone3"
4+
SyscallX86MaxNum32 = 462
5+
SyscallX86LastName32 = "mseal"
66
)
7-
7+
// https://github.com/torvalds/linux/blob/master/arch/x86/entry/syscalls/syscall_32.tbl
88
// line numbers are aligned with the syscall number (-10)
99
var syscallNumTableX86Family32 = [...]string{
1010
"restart_syscall",
@@ -442,7 +442,34 @@ var syscallNumTableX86Family32 = [...]string{
442442
"fsmount",
443443
"fspick",
444444
"pidfd_open",
445-
"clone3", //435
445+
"clone3", // 435
446+
"close_range", // 436
447+
"openat2", // 437
448+
"pidfd_getfd", // 438
449+
"faccessat2", // 439
450+
"process_madvise", // 440
451+
"epoll_pwait2", // 441
452+
"mount_setattr", // 442
453+
"quotactl_fd", // 443
454+
"landlock_create_ruleset", // 444
455+
"landlock_add_rule", // 445
456+
"landlock_restrict_self", // 446
457+
"memfd_secret", // 447
458+
"process_mrelease", // 448
459+
"futex_waitv", // 449
460+
"set_mempolicy_home_node", // 450
461+
"cachestat", // 451
462+
"fchmodat2", // 452
463+
"map_shadow_stack", // 453
464+
"futex_wake", // 454
465+
"futex_wait", // 455
466+
"futex_requeue", // 456
467+
"statmount", // 457
468+
"listmount", // 458
469+
"lsm_get_self_attr", // 459
470+
"lsm_set_self_attr", // 460
471+
"lsm_list_modules", // 461
472+
"mseal", // 462
446473
}
447474

448475
func callNameX86Family32(num uint32) string {

pkg/system/syscalls_x86f64.go

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package system
22

33
const (
4-
SyscallX86MaxNum64 = 435
5-
SyscallX86LastName64 = "clone3"
4+
SyscallX86MaxNum64 = 462
5+
SyscallX86LastName64 = "mseal"
66
)
7-
7+
// https://github.com/torvalds/linux/blob/master/arch/x86/entry/syscalls/syscall_64.tbl , https://github.com/torvalds/linux/blob/master/scripts/syscall.tbl
88
// line numbers are aligned with the syscall number (-10)
99
var syscallNumTableX86Family64 = [...]string{
1010
"read",
@@ -341,8 +341,8 @@ var syscallNumTableX86Family64 = [...]string{
341341
"pkey_free",
342342
"statx",
343343
"io_pgetevents",
344-
"rseq",
345-
"reserved.335",
344+
"rseq", // 334
345+
"uretprobe", // 335
346346
"reserved.336",
347347
"reserved.337",
348348
"reserved.338",
@@ -431,7 +431,7 @@ var syscallNumTableX86Family64 = [...]string{
431431
"reserved.421",
432432
"reserved.422",
433433
"reserved.423",
434-
"pidfd_send_signal",
434+
"pidfd_send_signal", // 424
435435
"io_uring_setup",
436436
"io_uring_enter",
437437
"io_uring_register",
@@ -441,8 +441,35 @@ var syscallNumTableX86Family64 = [...]string{
441441
"fsconfig",
442442
"fsmount",
443443
"fspick",
444-
"pidfd_open",
445-
"clone3", //435
444+
"pidfd_open", // 434
445+
"clone3", // 435
446+
"close_range", // 436
447+
"openat2", // 437
448+
"pidfd_getfd", // 438
449+
"faccessat2", // 439
450+
"process_madvise", // 440
451+
"epoll_pwait2", // 441
452+
"mount_setattr", // 442
453+
"quotactl_fd", // 443
454+
"landlock_create_ruleset", // 444
455+
"landlock_add_rule", // 445
456+
"landlock_restrict_self", // 446
457+
"memfd_secret", // 447
458+
"process_mrelease", // 448
459+
"futex_waitv", // 449
460+
"set_mempolicy_home_node", // 450
461+
"cachestat", // 451
462+
"fchmodat2", // 452
463+
"map_shadow_stack", // 453
464+
"futex_wake", // 454
465+
"futex_wait", // 455
466+
"futex_requeue", // 456
467+
"statmount", // 457
468+
"listmount", // 458
469+
"lsm_get_self_attr", // 459
470+
"lsm_set_self_attr", // 460
471+
"lsm_list_modules", // 461
472+
"mseal", // 462
446473
}
447474

448475
func callNameX86Family64(num uint32) string {

0 commit comments

Comments
 (0)