On Thursday, June 19, 2014 02:18:16 AM Serge Hallyn wrote:
> include/seccomp.h carefully sets __NR_foo to a negative number if
> the syscall name is not known. However when actually filling in the
> per-arch syscall tables, we were unconditionally inserting the
> negative numbers. This patch uses the __NR_foo (which is the real
> syscall if known, or the negative number if unknown) in place of
> the __PNR_foo (the negative number).
>
> Without this patch, using seccomp_syscall_resolve_name_arch(finit_module),
> for instance, always returned a negative number, and using
> seccomp_add_rule on the result had no effect. With this patch,
> finit_module becomes properly confined.
>
> Signed-off-by: Serge Hallyn <[email protected]>
Sorta.
I guess I'm not being very clear, if an ABI doesn't define a given syscall
then we should leave the syscall number as the __PNR_* value. Spot checking
your patch below I see a few invalid syscalls given __NR_* values.
I agree that the syscall tables could use an update, you've already identified
a few x86_64 syscalls that have been added since the table was created, but
simply changing __PNR_* to __NR_* is not the answer.
> diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c
> index 898bc5c..6ff72dc 100644
> --- a/src/arch-arm-syscalls.c
> +++ b/src/arch-arm-syscalls.c
> @@ -45,14 +45,14 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "acct", (__NR_SYSCALL_BASE + 51) },
> { "add_key", (__NR_SYSCALL_BASE + 309) },
> { "adjtimex", (__NR_SYSCALL_BASE + 124) },
> - { "afs_syscall", __PNR_afs_syscall },
> + { "afs_syscall", __NR_afs_syscall },
> { "alarm", (__NR_SYSCALL_BASE + 27) },
> { "arm_fadvise64_64", (__NR_SYSCALL_BASE + 270) },
> { "arm_sync_file_range", (__NR_SYSCALL_BASE + 341) },
> - { "arch_prctl", __PNR_arch_prctl },
> + { "arch_prctl", __NR_arch_prctl },
> { "bdflush", (__NR_SYSCALL_BASE + 134) },
> { "bind", (__NR_SYSCALL_BASE + 282) },
> - { "break", __PNR_break },
> + { "break", __NR_break },
> { "brk", (__NR_SYSCALL_BASE + 45) },
> { "capget", (__NR_SYSCALL_BASE + 184) },
> { "capset", (__NR_SYSCALL_BASE + 185) },
> @@ -70,7 +70,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "close", (__NR_SYSCALL_BASE + 6) },
> { "connect", (__NR_SYSCALL_BASE + 283) },
> { "creat", (__NR_SYSCALL_BASE + 8) },
> - { "create_module", __PNR_create_module },
> + { "create_module", __NR_create_module },
> { "delete_module", (__NR_SYSCALL_BASE + 129) },
> { "dup", (__NR_SYSCALL_BASE + 41) },
> { "dup2", (__NR_SYSCALL_BASE + 63) },
> @@ -78,18 +78,18 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "epoll_create", (__NR_SYSCALL_BASE + 250) },
> { "epoll_create1", (__NR_SYSCALL_BASE + 357) },
> { "epoll_ctl", (__NR_SYSCALL_BASE + 251) },
> - { "epoll_ctl_old", __PNR_epoll_ctl_old },
> + { "epoll_ctl_old", __NR_epoll_ctl_old },
> { "epoll_pwait", (__NR_SYSCALL_BASE + 346) },
> { "epoll_wait", (__NR_SYSCALL_BASE + 252) },
> - { "epoll_wait_old", __PNR_epoll_wait_old },
> + { "epoll_wait_old", __NR_epoll_wait_old },
> { "eventfd", (__NR_SYSCALL_BASE + 351) },
> { "eventfd2", (__NR_SYSCALL_BASE + 356) },
> { "execve", (__NR_SYSCALL_BASE + 11) },
> { "exit", (__NR_SYSCALL_BASE + 1) },
> { "exit_group", (__NR_SYSCALL_BASE + 248) },
> { "faccessat", (__NR_SYSCALL_BASE + 334) },
> - { "fadvise64", __PNR_fadvise64 },
> - { "fadvise64_64", __PNR_fadvise64_64 },
> + { "fadvise64", __NR_fadvise64 },
> + { "fadvise64_64", __NR_fadvise64_64 },
> { "fallocate", (__NR_SYSCALL_BASE + 352) },
> { "fanotify_init", (__NR_SYSCALL_BASE + 367) },
> { "fanotify_mark", (__NR_SYSCALL_BASE + 368) },
> @@ -115,15 +115,15 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "fstatfs", (__NR_SYSCALL_BASE + 100) },
> { "fstatfs64", (__NR_SYSCALL_BASE + 267) },
> { "fsync", (__NR_SYSCALL_BASE + 118) },
> - { "ftime", __PNR_ftime },
> + { "ftime", __NR_ftime },
> { "ftruncate", (__NR_SYSCALL_BASE + 93) },
> { "ftruncate64", (__NR_SYSCALL_BASE + 194) },
> { "futex", (__NR_SYSCALL_BASE + 240) },
> { "futimesat", (__NR_SYSCALL_BASE + 326) },
> - { "get_kernel_syms", __PNR_get_kernel_syms },
> + { "get_kernel_syms", __NR_get_kernel_syms },
> { "get_mempolicy", (__NR_SYSCALL_BASE + 320) },
> { "get_robust_list", (__NR_SYSCALL_BASE + 339) },
> - { "get_thread_area", __PNR_get_thread_area },
> + { "get_thread_area", __NR_get_thread_area },
> { "getcpu", (__NR_SYSCALL_BASE + 345) },
> { "getcwd", (__NR_SYSCALL_BASE + 183) },
> { "getdents", (__NR_SYSCALL_BASE + 141) },
> @@ -141,7 +141,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "getpgid", (__NR_SYSCALL_BASE + 132) },
> { "getpgrp", (__NR_SYSCALL_BASE + 65) },
> { "getpid", (__NR_SYSCALL_BASE + 20) },
> - { "getpmsg", __PNR_getpmsg },
> + { "getpmsg", __NR_getpmsg },
> { "getppid", (__NR_SYSCALL_BASE + 64) },
> { "getpriority", (__NR_SYSCALL_BASE + 96) },
> { "getresgid", (__NR_SYSCALL_BASE + 171) },
> @@ -158,8 +158,8 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "getuid", (__NR_SYSCALL_BASE + 24) },
> { "getuid32", (__NR_SYSCALL_BASE + 199) },
> { "getxattr", (__NR_SYSCALL_BASE + 229) },
> - { "gtty", __PNR_gtty },
> - { "idle", __PNR_idle },
> + { "gtty", __NR_gtty },
> + { "idle", __NR_idle },
> { "init_module", (__NR_SYSCALL_BASE + 128) },
> { "inotify_add_watch", (__NR_SYSCALL_BASE + 317) },
> { "inotify_init", (__NR_SYSCALL_BASE + 316) },
> @@ -171,12 +171,12 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "io_setup", (__NR_SYSCALL_BASE + 243) },
> { "io_submit", (__NR_SYSCALL_BASE + 246) },
> { "ioctl", (__NR_SYSCALL_BASE + 54) },
> - { "ioperm", __PNR_ioperm },
> - { "iopl", __PNR_iopl },
> + { "ioperm", __NR_ioperm },
> + { "iopl", __NR_iopl },
> { "ioprio_get", (__NR_SYSCALL_BASE + 315) },
> { "ioprio_set", (__NR_SYSCALL_BASE + 314) },
> { "ipc", (__NR_SYSCALL_BASE + 117) },
> - { "kcmp", __PNR_kcmp },
> + { "kcmp", __NR_kcmp },
> { "kexec_load", (__NR_SYSCALL_BASE + 347) },
> { "keyctl", (__NR_SYSCALL_BASE + 311) },
> { "kill", (__NR_SYSCALL_BASE + 37) },
> @@ -189,7 +189,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "listxattr", (__NR_SYSCALL_BASE + 232) },
> { "llistxattr", (__NR_SYSCALL_BASE + 233) },
> { "_llseek", (__NR_SYSCALL_BASE + 140) },
> - { "lock", __PNR_lock },
> + { "lock", __NR_lock },
> { "lookup_dcookie", (__NR_SYSCALL_BASE + 249) },
> { "lremovexattr", (__NR_SYSCALL_BASE + 236) },
> { "lseek", (__NR_SYSCALL_BASE + 19) },
> @@ -198,7 +198,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "lstat64", (__NR_SYSCALL_BASE + 196) },
> { "madvise", (__NR_SYSCALL_BASE + 220) },
> { "mbind", (__NR_SYSCALL_BASE + 319) },
> - { "migrate_pages", __PNR_migrate_pages },
> + { "migrate_pages", __NR_migrate_pages },
> { "mincore", (__NR_SYSCALL_BASE + 219) },
> { "mkdir", (__NR_SYSCALL_BASE + 39) },
> { "mkdirat", (__NR_SYSCALL_BASE + 323) },
> @@ -208,11 +208,11 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "mlockall", (__NR_SYSCALL_BASE + 152) },
> { "mmap", (__NR_SYSCALL_BASE + 90) },
> { "mmap2", (__NR_SYSCALL_BASE + 192) },
> - { "modify_ldt", __PNR_modify_ldt },
> + { "modify_ldt", __NR_modify_ldt },
> { "mount", (__NR_SYSCALL_BASE + 21) },
> { "move_pages", (__NR_SYSCALL_BASE + 344) },
> { "mprotect", (__NR_SYSCALL_BASE + 125) },
> - { "mpx", __PNR_mpx },
> + { "mpx", __NR_mpx },
> { "mq_getsetattr", (__NR_SYSCALL_BASE + 279) },
> { "mq_notify", (__NR_SYSCALL_BASE + 278) },
> { "mq_open", (__NR_SYSCALL_BASE + 274) },
> @@ -231,14 +231,14 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "name_to_handle_at", (__NR_SYSCALL_BASE + 370) },
> { "nanosleep", (__NR_SYSCALL_BASE + 162) },
> { "_newselect", (__NR_SYSCALL_BASE + 142) },
> - { "newfstatat", __PNR_newfstatat },
> + { "newfstatat", __NR_newfstatat },
> { "nfsservctl", (__NR_SYSCALL_BASE + 169) },
> { "nice", (__NR_SYSCALL_BASE + 34) },
> - { "oldfstat", __PNR_oldfstat },
> - { "oldlstat", __PNR_oldlstat },
> - { "oldolduname", __PNR_oldolduname },
> - { "oldstat", __PNR_oldstat },
> - { "olduname", __PNR_olduname },
> + { "oldfstat", __NR_oldfstat },
> + { "oldlstat", __NR_oldlstat },
> + { "oldolduname", __NR_oldolduname },
> + { "oldstat", __NR_oldstat },
> + { "olduname", __NR_olduname },
> { "open", (__NR_SYSCALL_BASE + 5) },
> { "open_by_handle_at", (__NR_SYSCALL_BASE + 371) },
> { "openat", (__NR_SYSCALL_BASE + 322) },
> @@ -259,14 +259,14 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "prlimit64", (__NR_SYSCALL_BASE + 369) },
> { "process_vm_readv", (__NR_SYSCALL_BASE + 376) },
> { "process_vm_writev", (__NR_SYSCALL_BASE + 377) },
> - { "prof", __PNR_prof },
> - { "profil", __PNR_profil },
> + { "prof", __NR_prof },
> + { "profil", __NR_profil },
> { "pselect6", (__NR_SYSCALL_BASE + 335) },
> { "ptrace", (__NR_SYSCALL_BASE + 26) },
> - { "putpmsg", __PNR_putpmsg },
> + { "putpmsg", __NR_putpmsg },
> { "pwrite64", (__NR_SYSCALL_BASE + 181) },
> { "pwritev", (__NR_SYSCALL_BASE + 362) },
> - { "query_module", __PNR_query_module },
> + { "query_module", __NR_query_module },
> { "quotactl", (__NR_SYSCALL_BASE + 131) },
> { "read", (__NR_SYSCALL_BASE + 3) },
> { "readahead", (__NR_SYSCALL_BASE + 225) },
> @@ -304,7 +304,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "sched_setparam", (__NR_SYSCALL_BASE + 154) },
> { "sched_setscheduler", (__NR_SYSCALL_BASE + 156) },
> { "sched_yield", (__NR_SYSCALL_BASE + 158) },
> - { "security", __PNR_security },
> + { "security", __NR_security },
> { "select", (__NR_SYSCALL_BASE + 82) },
> { "semctl", (__NR_SYSCALL_BASE + 300) },
> { "semget", (__NR_SYSCALL_BASE + 299) },
> @@ -318,7 +318,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "sendto", (__NR_SYSCALL_BASE + 290) },
> { "set_mempolicy", (__NR_SYSCALL_BASE + 321) },
> { "set_robust_list", (__NR_SYSCALL_BASE + 338) },
> - { "set_thread_area", __PNR_set_thread_area },
> + { "set_thread_area", __NR_set_thread_area },
> { "set_tid_address", (__NR_SYSCALL_BASE + 256) },
> { "setdomainname", (__NR_SYSCALL_BASE + 121) },
> { "setfsgid", (__NR_SYSCALL_BASE + 139) },
> @@ -349,7 +349,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "setuid", (__NR_SYSCALL_BASE + 23) },
> { "setuid32", (__NR_SYSCALL_BASE + 213) },
> { "setxattr", (__NR_SYSCALL_BASE + 226) },
> - { "sgetmask", __PNR_sgetmask },
> + { "sgetmask", __NR_sgetmask },
> { "shmat", (__NR_SYSCALL_BASE + 305) },
> { "shmctl", (__NR_SYSCALL_BASE + 308) },
> { "shmdt", (__NR_SYSCALL_BASE + 306) },
> @@ -357,7 +357,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "shutdown", (__NR_SYSCALL_BASE + 293) },
> { "sigaction", (__NR_SYSCALL_BASE + 67) },
> { "sigaltstack", (__NR_SYSCALL_BASE + 186) },
> - { "signal", __PNR_signal },
> + { "signal", __NR_signal },
> { "signalfd", (__NR_SYSCALL_BASE + 349) },
> { "signalfd4", (__NR_SYSCALL_BASE + 355) },
> { "sigpending", (__NR_SYSCALL_BASE + 73) },
> @@ -368,19 +368,19 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "socketcall", (__NR_SYSCALL_BASE + 102) },
> { "socketpair", (__NR_SYSCALL_BASE + 288) },
> { "splice", (__NR_SYSCALL_BASE + 340) },
> - { "ssetmask", __PNR_ssetmask },
> + { "ssetmask", __NR_ssetmask },
> { "stat", (__NR_SYSCALL_BASE + 106) },
> { "stat64", (__NR_SYSCALL_BASE + 195) },
> { "statfs", (__NR_SYSCALL_BASE + 99) },
> { "statfs64", (__NR_SYSCALL_BASE + 266) },
> { "stime", (__NR_SYSCALL_BASE + 25) },
> - { "stty", __PNR_stty },
> + { "stty", __NR_stty },
> { "swapoff", (__NR_SYSCALL_BASE + 115) },
> { "swapon", (__NR_SYSCALL_BASE + 87) },
> { "symlink", (__NR_SYSCALL_BASE + 83) },
> { "symlinkat", (__NR_SYSCALL_BASE + 331) },
> { "sync", (__NR_SYSCALL_BASE + 36) },
> - { "sync_file_range", __PNR_sync_file_range },
> + { "sync_file_range", __NR_sync_file_range },
> { "sync_file_range2", (__NR_SYSCALL_BASE + 341) },
> { "syncfs", (__NR_SYSCALL_BASE + 373) },
> { "syscall", (__NR_SYSCALL_BASE + 113) },
> @@ -403,9 +403,9 @@ const struct arch_syscall_def arm_syscall_table[] = { \
> { "tkill", (__NR_SYSCALL_BASE + 238) },
> { "truncate", (__NR_SYSCALL_BASE + 92) },
> { "truncate64", (__NR_SYSCALL_BASE + 193) },
> - { "tuxcall", __PNR_tuxcall },
> + { "tuxcall", __NR_tuxcall },
> { "ugetrlimit", (__NR_SYSCALL_BASE + 191) },
> - { "ulimit", __PNR_ulimit },
> + { "ulimit", __NR_ulimit },
> { "umask", (__NR_SYSCALL_BASE + 60) },
> { "umount", (__NR_SYSCALL_BASE + 22) },
> { "umount2", (__NR_SYSCALL_BASE + 52) },
> @@ -420,13 +420,13 @@ const struct arch_syscall_def arm_syscall_table[] = {
> \ { "utimes", (__NR_SYSCALL_BASE + 269) },
> { "vfork", (__NR_SYSCALL_BASE + 190) },
> { "vhangup", (__NR_SYSCALL_BASE + 111) },
> - { "vm86", __PNR_vm86 },
> - { "vm86old", __PNR_vm86old },
> + { "vm86", __NR_vm86 },
> + { "vm86old", __NR_vm86old },
> { "vmsplice", (__NR_SYSCALL_BASE + 343) },
> { "vserver", (__NR_SYSCALL_BASE + 313) },
> { "wait4", (__NR_SYSCALL_BASE + 114) },
> { "waitid", (__NR_SYSCALL_BASE + 280) },
> - { "waitpid", __PNR_waitpid },
> + { "waitpid", __NR_waitpid },
> { "write", (__NR_SYSCALL_BASE + 4) },
> { "writev", (__NR_SYSCALL_BASE + 146) },
> { NULL, __NR_SCMP_ERROR },
> diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c
> index aa3d114..e954b28 100644
> --- a/src/arch-mips-syscalls.c
> +++ b/src/arch-mips-syscalls.c
> @@ -40,9 +40,9 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "adjtimex", (__NR_SYSCALL_BASE + 124) },
> { "afs_syscall", __NR_SYSCALL_BASE + 137 },
> { "alarm", (__NR_SYSCALL_BASE + 27) },
> - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 },
> - { "arm_sync_file_range", __PNR_arm_sync_file_range },
> - { "arch_prctl", __PNR_arch_prctl },
> + { "arm_fadvise64_64", __NR_arm_fadvise64_64 },
> + { "arm_sync_file_range", __NR_arm_sync_file_range },
> + { "arch_prctl", __NR_arch_prctl },
> { "bdflush", (__NR_SYSCALL_BASE + 134) },
> { "bind", (__NR_SYSCALL_BASE + 169) },
> { "break", __NR_SYSCALL_BASE + 17 },
> @@ -52,7 +52,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "chdir", (__NR_SYSCALL_BASE + 12) },
> { "chmod", (__NR_SYSCALL_BASE + 15) },
> { "chown", (__NR_SYSCALL_BASE + 202) },
> - { "chown32", (__PNR_chown32) },
> + { "chown32", (__NR_chown32) },
> { "chroot", (__NR_SYSCALL_BASE + 61) },
> { "clock_adjtime", (__NR_SYSCALL_BASE + 341) },
> { "clock_getres", (__NR_SYSCALL_BASE + 264) },
> @@ -71,10 +71,10 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "epoll_create", (__NR_SYSCALL_BASE + 248) },
> { "epoll_create1", (__NR_SYSCALL_BASE + 326) },
> { "epoll_ctl", (__NR_SYSCALL_BASE + 249) },
> - { "epoll_ctl_old", __PNR_epoll_ctl_old },
> + { "epoll_ctl_old", __NR_epoll_ctl_old },
> { "epoll_pwait", (__NR_SYSCALL_BASE + 313) },
> { "epoll_wait", (__NR_SYSCALL_BASE + 250) },
> - { "epoll_wait_old", __PNR_epoll_wait_old },
> + { "epoll_wait_old", __NR_epoll_wait_old },
> { "eventfd", (__NR_SYSCALL_BASE + 319) },
> { "eventfd2", (__NR_SYSCALL_BASE + 325) },
> { "execve", (__NR_SYSCALL_BASE + 11) },
> @@ -82,7 +82,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "exit_group", (__NR_SYSCALL_BASE + 246) },
> { "faccessat", (__NR_SYSCALL_BASE + 334) },
> { "fadvise64", __NR_SYSCALL_BASE + 254 },
> - { "fadvise64_64", __PNR_fadvise64_64 },
> + { "fadvise64_64", __NR_fadvise64_64 },
> { "fallocate", (__NR_SYSCALL_BASE + 320) },
> { "fanotify_init", (__NR_SYSCALL_BASE + 366) },
> { "fanotify_mark", (__NR_SYSCALL_BASE + 367) },
> @@ -90,7 +90,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "fchmod", (__NR_SYSCALL_BASE + 94) },
> { "fchmodat", (__NR_SYSCALL_BASE + 229) },
> { "fchown", (__NR_SYSCALL_BASE + 95) },
> - { "fchown32", (__PNR_fchown32) },
> + { "fchown32", (__NR_fchown32) },
> { "fchownat", (__NR_SYSCALL_BASE + 291) },
> { "fcntl", (__NR_SYSCALL_BASE + 55) },
> { "fcntl64", (__NR_SYSCALL_BASE + 220) },
> @@ -116,19 +116,19 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "get_kernel_syms", (__NR_SYSCALL_BASE + 130) },
> { "get_mempolicy", (__NR_SYSCALL_BASE + 269) },
> { "get_robust_list", (__NR_SYSCALL_BASE + 310) },
> - { "get_thread_area", __PNR_get_thread_area },
> + { "get_thread_area", __NR_get_thread_area },
> { "getcpu", (__NR_SYSCALL_BASE + 312) },
> { "getcwd", (__NR_SYSCALL_BASE + 203) },
> { "getdents", (__NR_SYSCALL_BASE + 141) },
> { "getdents64", (__NR_SYSCALL_BASE + 219) },
> { "getegid", (__NR_SYSCALL_BASE + 50) },
> - { "getegid32", __PNR_getegid32 },
> + { "getegid32", __NR_getegid32 },
> { "geteuid", (__NR_SYSCALL_BASE + 49) },
> - { "geteuid32", __PNR_geteuid32 },
> + { "geteuid32", __NR_geteuid32 },
> { "getgid", (__NR_SYSCALL_BASE + 47) },
> - { "getgid32", __PNR_getgid32 },
> + { "getgid32", __NR_getgid32 },
> { "getgroups", (__NR_SYSCALL_BASE + 80) },
> - { "getgroups32", __PNR_getgroups32 },
> + { "getgroups32", __NR_getgroups32 },
> { "getitimer", (__NR_SYSCALL_BASE + 105) },
> { "getpeername", (__NR_SYSCALL_BASE + 171) },
> { "getpgid", (__NR_SYSCALL_BASE + 132) },
> @@ -138,9 +138,9 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "getppid", (__NR_SYSCALL_BASE + 64) },
> { "getpriority", (__NR_SYSCALL_BASE + 96) },
> { "getresgid", (__NR_SYSCALL_BASE + 191) },
> - { "getresgid32", __PNR_getresgid32 },
> + { "getresgid32", __NR_getresgid32 },
> { "getresuid", (__NR_SYSCALL_BASE + 186) },
> - { "getresuid32", __PNR_getresuid32 },
> + { "getresuid32", __NR_getresuid32 },
> { "getrlimit", (__NR_SYSCALL_BASE + 76) },
> { "getrusage", (__NR_SYSCALL_BASE + 77) },
> { "getsid", (__NR_SYSCALL_BASE + 151) },
> @@ -149,7 +149,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "gettid", (__NR_SYSCALL_BASE + 222) },
> { "gettimeofday", (__NR_SYSCALL_BASE + 78) },
> { "getuid", (__NR_SYSCALL_BASE + 24) },
> - { "getuid32", __PNR_getuid32 },
> + { "getuid32", __NR_getuid32 },
> { "getxattr", (__NR_SYSCALL_BASE + 227) },
> { "gtty", (__NR_SYSCALL_BASE + 32) },
> { "idle", (__NR_SYSCALL_BASE + 112) },
> @@ -169,12 +169,12 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "ioprio_get", (__NR_SYSCALL_BASE + 315) },
> { "ioprio_set", (__NR_SYSCALL_BASE + 314) },
> { "ipc", (__NR_SYSCALL_BASE + 117) },
> - { "kcmp", __PNR_kcmp },
> + { "kcmp", __NR_kcmp },
> { "kexec_load", (__NR_SYSCALL_BASE + 347) },
> { "keyctl", (__NR_SYSCALL_BASE + 282) },
> { "kill", (__NR_SYSCALL_BASE + 37) },
> { "lchown", (__NR_SYSCALL_BASE + 16) },
> - { "lchown32", __PNR_lchown32 },
> + { "lchown32", __NR_lchown32 },
> { "lgetxattr", (__NR_SYSCALL_BASE + 228) },
> { "link", (__NR_SYSCALL_BASE + 9) },
> { "linkat", (__NR_SYSCALL_BASE + 296) },
> @@ -213,10 +213,10 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "mq_timedsend", (__NR_SYSCALL_BASE + 273) },
> { "mq_unlink", (__NR_SYSCALL_BASE + 272) },
> { "mremap", (__NR_SYSCALL_BASE + 167) },
> - { "msgctl", __PNR_msgctl },
> - { "msgget", __PNR_msgget },
> - { "msgrcv", __PNR_msgrcv },
> - { "msgsnd", __PNR_msgsnd },
> + { "msgctl", __NR_msgctl },
> + { "msgget", __NR_msgget },
> + { "msgrcv", __NR_msgrcv },
> + { "msgsnd", __NR_msgsnd },
> { "msync", (__NR_SYSCALL_BASE + 144) },
> { "munlock", (__NR_SYSCALL_BASE + 155) },
> { "munlockall", (__NR_SYSCALL_BASE + 157) },
> @@ -224,21 +224,21 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "name_to_handle_at", (__NR_SYSCALL_BASE + 339) },
> { "nanosleep", (__NR_SYSCALL_BASE + 166) },
> { "_newselect", (__NR_SYSCALL_BASE + 142) },
> - { "newfstatat", __PNR_newfstatat },
> + { "newfstatat", __NR_newfstatat },
> { "nfsservctl", (__NR_SYSCALL_BASE + 189) },
> { "nice", (__NR_SYSCALL_BASE + 34) },
> - { "oldfstat", __PNR_oldfstat },
> - { "oldlstat", __PNR_oldlstat },
> - { "oldolduname", __PNR_oldolduname },
> - { "oldstat", __PNR_oldstat },
> - { "olduname", __PNR_olduname },
> + { "oldfstat", __NR_oldfstat },
> + { "oldlstat", __NR_oldlstat },
> + { "oldolduname", __NR_oldolduname },
> + { "oldstat", __NR_oldstat },
> + { "olduname", __NR_olduname },
> { "open", (__NR_SYSCALL_BASE + 5) },
> { "open_by_handle_at", (__NR_SYSCALL_BASE + 340) },
> { "openat", (__NR_SYSCALL_BASE + 288) },
> { "pause", (__NR_SYSCALL_BASE + 29) },
> - { "pciconfig_iobase", __PNR_pciconfig_iobase },
> - { "pciconfig_read", __PNR_pciconfig_read },
> - { "pciconfig_write", __PNR_pciconfig_write },
> + { "pciconfig_iobase", __NR_pciconfig_iobase },
> + { "pciconfig_read", __NR_pciconfig_read },
> + { "pciconfig_write", __NR_pciconfig_write },
> { "perf_event_open", (__NR_SYSCALL_BASE + 333) },
> { "personality", (__NR_SYSCALL_BASE + 136) },
> { "pipe", (__NR_SYSCALL_BASE + 42) },
> @@ -297,12 +297,12 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "sched_setparam", (__NR_SYSCALL_BASE + 158) },
> { "sched_setscheduler", (__NR_SYSCALL_BASE + 160) },
> { "sched_yield", (__NR_SYSCALL_BASE + 162) },
> - { "security", __PNR_security },
> - { "select", __PNR_select },
> - { "semctl", __PNR_semctl },
> - { "semget", __PNR_semget },
> - { "semop", __PNR_semop },
> - { "semtimedop", __PNR_semtimedop },
> + { "security", __NR_security },
> + { "select", __NR_select },
> + { "semctl", __NR_semctl },
> + { "semget", __NR_semget },
> + { "semop", __NR_semop },
> + { "semtimedop", __NR_semtimedop },
> { "send", (__NR_SYSCALL_BASE + 178) },
> { "sendfile", (__NR_SYSCALL_BASE + 207) },
> { "sendfile64", (__NR_SYSCALL_BASE + 237) },
> @@ -315,38 +315,38 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "set_tid_address", (__NR_SYSCALL_BASE + 252) },
> { "setdomainname", (__NR_SYSCALL_BASE + 121) },
> { "setfsgid", (__NR_SYSCALL_BASE + 139) },
> - { "setfsgid32", __PNR_setfsgid32 },
> + { "setfsgid32", __NR_setfsgid32 },
> { "setfsuid", (__NR_SYSCALL_BASE + 138) },
> - { "setfsuid32", __PNR_setfsuid32 },
> + { "setfsuid32", __NR_setfsuid32 },
> { "setgid", (__NR_SYSCALL_BASE + 46) },
> - { "setgid32", __PNR_setgid32 },
> + { "setgid32", __NR_setgid32 },
> { "setgroups", (__NR_SYSCALL_BASE + 81) },
> - { "setgroups32", __PNR_setgroups32 },
> + { "setgroups32", __NR_setgroups32 },
> { "sethostname", (__NR_SYSCALL_BASE + 74) },
> { "setitimer", (__NR_SYSCALL_BASE + 104) },
> { "setns", (__NR_SYSCALL_BASE + 344) },
> { "setpgid", (__NR_SYSCALL_BASE + 57) },
> { "setpriority", (__NR_SYSCALL_BASE + 97) },
> { "setregid", (__NR_SYSCALL_BASE + 71) },
> - { "setregid32", __PNR_setregid32 },
> + { "setregid32", __NR_setregid32 },
> { "setresgid", (__NR_SYSCALL_BASE + 190) },
> - { "setresgid32", __PNR_setresgid32 },
> + { "setresgid32", __NR_setresgid32 },
> { "setresuid", (__NR_SYSCALL_BASE + 185) },
> - { "setresuid32", __PNR_setresuid32 },
> + { "setresuid32", __NR_setresuid32 },
> { "setreuid", (__NR_SYSCALL_BASE + 70) },
> - { "setreuid32", __PNR_setreuid32 },
> + { "setreuid32", __NR_setreuid32 },
> { "setrlimit", (__NR_SYSCALL_BASE + 75) },
> { "setsid", (__NR_SYSCALL_BASE + 66) },
> { "setsockopt", (__NR_SYSCALL_BASE + 181) },
> { "settimeofday", (__NR_SYSCALL_BASE + 79) },
> { "setuid", (__NR_SYSCALL_BASE + 23) },
> - { "setuid32", __PNR_setuid32 },
> + { "setuid32", __NR_setuid32 },
> { "setxattr", (__NR_SYSCALL_BASE + 224) },
> { "sgetmask", (__NR_SYSCALL_BASE + 68) },
> - { "shmat", __PNR_shmat },
> - { "shmctl", __PNR_shmctl },
> - { "shmdt", __PNR_shmdt },
> - { "shmget", __PNR_shmget },
> + { "shmat", __NR_shmat },
> + { "shmctl", __NR_shmctl },
> + { "shmdt", __NR_shmdt },
> + { "shmget", __NR_shmget },
> { "shutdown", (__NR_SYSCALL_BASE + 182) },
> { "sigaction", (__NR_SYSCALL_BASE + 67) },
> { "sigaltstack", (__NR_SYSCALL_BASE + 206) },
> @@ -374,7 +374,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "symlinkat", (__NR_SYSCALL_BASE + 297) },
> { "sync", (__NR_SYSCALL_BASE + 36) },
> { "sync_file_range", (__NR_SYSCALL_BASE + 305) },
> - { "sync_file_range2", __PNR_sync_file_range2 },
> + { "sync_file_range2", __NR_sync_file_range2 },
> { "syncfs", (__NR_SYSCALL_BASE + 342) },
> { "syscall", (__NR_SYSCALL_BASE + 0) },
> { "_sysctl", (__NR_SYSCALL_BASE + 153) },
> @@ -396,8 +396,8 @@ const struct arch_syscall_def mips_syscall_table[] = { \
> { "tkill", (__NR_SYSCALL_BASE + 236) },
> { "truncate", (__NR_SYSCALL_BASE + 92) },
> { "truncate64", (__NR_SYSCALL_BASE + 211) },
> - { "tuxcall", __PNR_tuxcall },
> - { "ugetrlimit", __PNR_ugetrlimit },
> + { "tuxcall", __NR_tuxcall },
> + { "ugetrlimit", __NR_ugetrlimit },
> { "ulimit", (__NR_SYSCALL_BASE + 58) },
> { "umask", (__NR_SYSCALL_BASE + 60) },
> { "umount", (__NR_SYSCALL_BASE + 22) },
> @@ -411,10 +411,10 @@ const struct arch_syscall_def mips_syscall_table[] = {
> \ { "utime", (__NR_SYSCALL_BASE + 30) },
> { "utimensat", (__NR_SYSCALL_BASE + 316) },
> { "utimes", (__NR_SYSCALL_BASE + 267) },
> - { "vfork", __PNR_vfork },
> + { "vfork", __NR_vfork },
> { "vhangup", (__NR_SYSCALL_BASE + 111) },
> { "vm86", (__NR_SYSCALL_BASE + 113) },
> - { "vm86old", __PNR_vm86old },
> + { "vm86old", __NR_vm86old },
> { "vmsplice", (__NR_SYSCALL_BASE + 307) },
> { "vserver", (__NR_SYSCALL_BASE + 277) },
> { "wait4", (__NR_SYSCALL_BASE + 114) },
> diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c
> index 760cf3d..3622eb4 100644
> --- a/src/arch-x86-syscalls.c
> +++ b/src/arch-x86-syscalls.c
> @@ -28,19 +28,19 @@
>
> /* NOTE: based on Linux 3.4.7 */
> const struct arch_syscall_def x86_syscall_table[] = { \
> - { "accept", __PNR_accept },
> - { "accept4", __PNR_accept4 },
> + { "accept", __NR_accept },
> + { "accept4", __NR_accept4 },
> { "access", 33 },
> { "acct", 51 },
> { "add_key", 286 },
> { "adjtimex", 124 },
> { "afs_syscall", 137 },
> { "alarm", 27 },
> - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 },
> - { "arm_sync_file_range", __PNR_arm_sync_file_range },
> - { "arch_prctl", __PNR_arch_prctl },
> + { "arm_fadvise64_64", __NR_arm_fadvise64_64 },
> + { "arm_sync_file_range", __NR_arm_sync_file_range },
> + { "arch_prctl", __NR_arch_prctl },
> { "bdflush", 134 },
> - { "bind", __PNR_bind },
> + { "bind", __NR_bind },
> { "break", 17 },
> { "brk", 45 },
> { "capget", 184 },
> @@ -57,7 +57,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "clock_settime", 264 },
> { "clone", 120 },
> { "close", 6 },
> - { "connect", __PNR_connect },
> + { "connect", __NR_connect },
> { "creat", 8 },
> { "create_module", 127 },
> { "delete_module", 129 },
> @@ -67,10 +67,10 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "epoll_create", 254 },
> { "epoll_create1", 329 },
> { "epoll_ctl", 255 },
> - { "epoll_ctl_old", __PNR_epoll_ctl_old },
> + { "epoll_ctl_old", __NR_epoll_ctl_old },
> { "epoll_pwait", 319 },
> { "epoll_wait", 256 },
> - { "epoll_wait_old", __PNR_epoll_wait_old },
> + { "epoll_wait_old", __NR_epoll_wait_old },
> { "eventfd", 323 },
> { "eventfd2", 328 },
> { "execve", 11 },
> @@ -92,7 +92,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "fcntl64", 221 },
> { "fdatasync", 148 },
> { "fgetxattr", 231 },
> - { "finit_module", __PNR_finit_module },
> + { "finit_module", __NR_finit_module },
> { "flistxattr", 234 },
> { "flock", 143 },
> { "fork", 2 },
> @@ -126,7 +126,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "getgroups", 80 },
> { "getgroups32", 205 },
> { "getitimer", 105 },
> - { "getpeername", __PNR_getpeername },
> + { "getpeername", __NR_getpeername },
> { "getpgid", 132 },
> { "getpgrp", 65 },
> { "getpid", 20 },
> @@ -140,8 +140,8 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "getrlimit", 76 },
> { "getrusage", 77 },
> { "getsid", 147 },
> - { "getsockname", __PNR_getsockname },
> - { "getsockopt", __PNR_getsockopt },
> + { "getsockname", __NR_getsockname },
> + { "getsockopt", __NR_getsockopt },
> { "gettid", 224 },
> { "gettimeofday", 78 },
> { "getuid", 24 },
> @@ -174,7 +174,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "lgetxattr", 230 },
> { "link", 9 },
> { "linkat", 303 },
> - { "listen", __PNR_listen },
> + { "listen", __NR_listen },
> { "listxattr", 232 },
> { "llistxattr", 233 },
> { "_llseek", 140 },
> @@ -209,10 +209,10 @@ const struct arch_syscall_def x86_syscall_table[] = {
> \ { "mq_timedsend", 279 },
> { "mq_unlink", 278 },
> { "mremap", 163 },
> - { "msgctl", __PNR_msgctl },
> - { "msgget", __PNR_msgget },
> - { "msgrcv", __PNR_msgrcv },
> - { "msgsnd", __PNR_msgsnd },
> + { "msgctl", __NR_msgctl },
> + { "msgget", __NR_msgget },
> + { "msgrcv", __NR_msgrcv },
> + { "msgsnd", __NR_msgsnd },
> { "msync", 144 },
> { "munlock", 151 },
> { "munlockall", 153 },
> @@ -220,7 +220,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "name_to_handle_at", 341 },
> { "nanosleep", 162 },
> { "_newselect", 142 },
> - { "newfstatat", __PNR_newfstatat },
> + { "newfstatat", __NR_newfstatat },
> { "nfsservctl", 169 },
> { "nice", 34 },
> { "oldfstat", 28 },
> @@ -232,9 +232,9 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "open_by_handle_at", 342 },
> { "openat", 295 },
> { "pause", 29 },
> - { "pciconfig_iobase", __PNR_pciconfig_iobase },
> - { "pciconfig_read", __PNR_pciconfig_read },
> - { "pciconfig_write", __PNR_pciconfig_write },
> + { "pciconfig_iobase", __NR_pciconfig_iobase },
> + { "pciconfig_read", __NR_pciconfig_read },
> + { "pciconfig_write", __NR_pciconfig_write },
> { "perf_event_open", 336 },
> { "personality", 136 },
> { "pipe", 42 },
> @@ -264,10 +264,10 @@ const struct arch_syscall_def x86_syscall_table[] = {
> \ { "readlinkat", 305 },
> { "readv", 145 },
> { "reboot", 88 },
> - { "recv", __PNR_recv },
> - { "recvfrom", __PNR_recvfrom },
> + { "recv", __NR_recv },
> + { "recvfrom", __NR_recvfrom },
> { "recvmmsg", 337 },
> - { "recvmsg", __PNR_recvmsg },
> + { "recvmsg", __NR_recvmsg },
> { "remap_file_pages", 257 },
> { "removexattr", 235 },
> { "rename", 38 },
> @@ -293,18 +293,18 @@ const struct arch_syscall_def x86_syscall_table[] = {
> \ { "sched_setparam", 154 },
> { "sched_setscheduler", 156 },
> { "sched_yield", 158 },
> - { "security", __PNR_security },
> + { "security", __NR_security },
> { "select", 82 },
> - { "semctl", __PNR_semctl },
> - { "semget", __PNR_semget },
> - { "semop", __PNR_semop },
> - { "semtimedop", __PNR_semtimedop },
> - { "send", __PNR_send },
> + { "semctl", __NR_semctl },
> + { "semget", __NR_semget },
> + { "semop", __NR_semop },
> + { "semtimedop", __NR_semtimedop },
> + { "send", __NR_send },
> { "sendfile", 187 },
> { "sendfile64", 239 },
> { "sendmmsg", 345 },
> - { "sendmsg", __PNR_sendmsg },
> - { "sendto", __PNR_sendto },
> + { "sendmsg", __NR_sendmsg },
> + { "sendto", __NR_sendto },
> { "set_mempolicy", 276 },
> { "set_robust_list", 311 },
> { "set_thread_area", 243 },
> @@ -333,17 +333,17 @@ const struct arch_syscall_def x86_syscall_table[] = {
> \ { "setreuid32", 203 },
> { "setrlimit", 75 },
> { "setsid", 66 },
> - { "setsockopt", __PNR_setsockopt },
> + { "setsockopt", __NR_setsockopt },
> { "settimeofday", 79 },
> { "setuid", 23 },
> { "setuid32", 213 },
> { "setxattr", 226 },
> { "sgetmask", 68 },
> - { "shmat", __PNR_shmat },
> - { "shmctl", __PNR_shmctl },
> - { "shmdt", __PNR_shmdt },
> - { "shmget", __PNR_shmget },
> - { "shutdown", __PNR_shutdown },
> + { "shmat", __NR_shmat },
> + { "shmctl", __NR_shmctl },
> + { "shmdt", __NR_shmdt },
> + { "shmget", __NR_shmget },
> + { "shutdown", __NR_shutdown },
> { "sigaction", 67 },
> { "sigaltstack", 186 },
> { "signal", 48 },
> @@ -353,9 +353,9 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "sigprocmask", 126 },
> { "sigreturn", 119 },
> { "sigsuspend", 72 },
> - { "socket", __PNR_socket },
> + { "socket", __NR_socket },
> { "socketcall", 102 },
> - { "socketpair", __PNR_socketpair },
> + { "socketpair", __NR_socketpair },
> { "splice", 313 },
> { "ssetmask", 69 },
> { "stat", 106 },
> @@ -370,9 +370,9 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "symlinkat", 304 },
> { "sync", 36 },
> { "sync_file_range", 314 },
> - { "sync_file_range2", __PNR_sync_file_range2 },
> + { "sync_file_range2", __NR_sync_file_range2 },
> { "syncfs", 344 },
> - { "syscall", __PNR_syscall },
> + { "syscall", __NR_syscall },
> { "_sysctl", 149 },
> { "sysfs", 135 },
> { "sysinfo", 116 },
> @@ -392,7 +392,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \
> { "tkill", 238 },
> { "truncate", 92 },
> { "truncate64", 193 },
> - { "tuxcall", __PNR_tuxcall },
> + { "tuxcall", __NR_tuxcall },
> { "ugetrlimit", 191 },
> { "ulimit", 58 },
> { "umask", 60 },
> diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c
> index bceb352..248aabc 100644
> --- a/src/arch-x86_64-syscalls.c
> +++ b/src/arch-x86_64-syscalls.c
> @@ -36,19 +36,19 @@ const struct arch_syscall_def x86_64_syscall_table[] = {
> \ { "adjtimex", 159 },
> { "afs_syscall", 183 },
> { "alarm", 37 },
> - { "arm_fadvise64_64", __PNR_arm_fadvise64_64 },
> - { "arm_sync_file_range", __PNR_arm_sync_file_range },
> + { "arm_fadvise64_64", __NR_arm_fadvise64_64 },
> + { "arm_sync_file_range", __NR_arm_sync_file_range },
> { "arch_prctl", 158 },
> - { "bdflush", __PNR_bdflush },
> + { "bdflush", __NR_bdflush },
> { "bind", 49 },
> - { "break", __PNR_break },
> + { "break", __NR_break },
> { "brk", 12 },
> { "capget", 125 },
> { "capset", 126 },
> { "chdir", 80 },
> { "chmod", 90 },
> { "chown", 92 },
> - { "chown32", __PNR_chown32 },
> + { "chown32", __NR_chown32 },
> { "chroot", 161 },
> { "clock_adjtime", 305 },
> { "clock_getres", 229 },
> @@ -78,7 +78,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \
> { "exit_group", 231 },
> { "faccessat", 269 },
> { "fadvise64", 221 },
> - { "fadvise64_64", __PNR_fadvise64_64 },
> + { "fadvise64_64", __NR_fadvise64_64 },
> { "fallocate", 285 },
> { "fanotify_init", 300 },
> { "fanotify_mark", 301 },
> @@ -86,27 +86,27 @@ const struct arch_syscall_def x86_64_syscall_table[] = {
> \ { "fchmod", 91 },
> { "fchmodat", 268 },
> { "fchown", 93 },
> - { "fchown32", __PNR_fchown32 },
> + { "fchown32", __NR_fchown32 },
> { "fchownat", 260 },
> { "fcntl", 72 },
> - { "fcntl64", __PNR_fcntl64 },
> + { "fcntl64", __NR_fcntl64 },
> { "fdatasync", 75 },
> { "fgetxattr", 193 },
> - { "finit_module", __PNR_finit_module },
> + { "finit_module", __NR_finit_module },
> { "flistxattr", 196 },
> { "flock", 73 },
> { "fork", 57 },
> { "fremovexattr", 199 },
> { "fsetxattr", 190 },
> { "fstat", 5 },
> - { "fstat64", __PNR_fstat64 },
> - { "fstatat64", __PNR_fstatat64 },
> + { "fstat64", __NR_fstat64 },
> + { "fstatat64", __NR_fstatat64 },
> { "fstatfs", 138 },
> - { "fstatfs64", __PNR_fstatfs64 },
> + { "fstatfs64", __NR_fstatfs64 },
> { "fsync", 74 },
> - { "ftime", __PNR_ftime },
> + { "ftime", __NR_ftime },
> { "ftruncate", 77 },
> - { "ftruncate64", __PNR_ftruncate64 },
> + { "ftruncate64", __NR_ftruncate64 },
> { "futex", 202 },
> { "futimesat", 261 },
> { "get_kernel_syms", 177 },
> @@ -118,13 +118,13 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "getdents", 78 },
> { "getdents64", 217 },
> { "getegid", 108 },
> - { "getegid32", __PNR_getegid32 },
> + { "getegid32", __NR_getegid32 },
> { "geteuid", 107 },
> - { "geteuid32", __PNR_geteuid32 },
> + { "geteuid32", __NR_geteuid32 },
> { "getgid", 104 },
> - { "getgid32", __PNR_getgid32 },
> + { "getgid32", __NR_getgid32 },
> { "getgroups", 115 },
> - { "getgroups32", __PNR_getgroups32 },
> + { "getgroups32", __NR_getgroups32 },
> { "getitimer", 36 },
> { "getpeername", 52 },
> { "getpgid", 121 },
> @@ -134,9 +134,9 @@ const struct arch_syscall_def x86_64_syscall_table[] = {
> \ { "getppid", 110 },
> { "getpriority", 140 },
> { "getresgid", 120 },
> - { "getresgid32", __PNR_getresgid32 },
> + { "getresgid32", __NR_getresgid32 },
> { "getresuid", 118 },
> - { "getresuid32", __PNR_getresuid32 },
> + { "getresuid32", __NR_getresuid32 },
> { "getrlimit", 97 },
> { "getrusage", 98 },
> { "getsid", 124 },
> @@ -145,10 +145,10 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "gettid", 186 },
> { "gettimeofday", 96 },
> { "getuid", 102 },
> - { "getuid32", __PNR_getuid32 },
> + { "getuid32", __NR_getuid32 },
> { "getxattr", 191 },
> - { "gtty", __PNR_gtty },
> - { "idle", __PNR_idle },
> + { "gtty", __NR_gtty },
> + { "idle", __NR_idle },
> { "init_module", 175 },
> { "inotify_add_watch", 254 },
> { "inotify_init", 253 },
> @@ -164,27 +164,27 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "iopl", 172 },
> { "ioprio_get", 252 },
> { "ioprio_set", 251 },
> - { "ipc", __PNR_ipc },
> + { "ipc", __NR_ipc },
> { "kcmp", 312 },
> { "kexec_load", 246 },
> { "keyctl", 250 },
> { "kill", 62 },
> { "lchown", 94 },
> - { "lchown32", __PNR_lchown32 },
> + { "lchown32", __NR_lchown32 },
> { "lgetxattr", 192 },
> { "link", 86 },
> { "linkat", 265 },
> { "listen", 50 },
> { "listxattr", 194 },
> { "llistxattr", 195 },
> - { "_llseek", __PNR__llseek },
> - { "lock", __PNR_lock },
> + { "_llseek", __NR__llseek },
> + { "lock", __NR_lock },
> { "lookup_dcookie", 212 },
> { "lremovexattr", 198 },
> { "lseek", 8 },
> { "lsetxattr", 189 },
> { "lstat", 6 },
> - { "lstat64", __PNR_lstat64 },
> + { "lstat64", __NR_lstat64 },
> { "madvise", 28 },
> { "mbind", 237 },
> { "migrate_pages", 256 },
> @@ -196,12 +196,12 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "mlock", 149 },
> { "mlockall", 151 },
> { "mmap", 9 },
> - { "mmap2", __PNR_mmap2 },
> + { "mmap2", __NR_mmap2 },
> { "modify_ldt", 154 },
> { "mount", 165 },
> { "move_pages", 279 },
> { "mprotect", 10 },
> - { "mpx", __PNR_mpx },
> + { "mpx", __NR_mpx },
> { "mq_getsetattr", 245 },
> { "mq_notify", 244 },
> { "mq_open", 240 },
> @@ -219,22 +219,22 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "munmap", 11 },
> { "name_to_handle_at", 303 },
> { "nanosleep", 35 },
> - { "_newselect", __PNR__newselect },
> + { "_newselect", __NR__newselect },
> { "newfstatat", 262 },
> { "nfsservctl", 180 },
> - { "nice", __PNR_nice },
> - { "oldfstat", __PNR_oldfstat },
> - { "oldlstat", __PNR_oldlstat },
> - { "oldolduname", __PNR_oldolduname },
> - { "oldstat", __PNR_oldstat },
> - { "olduname", __PNR_olduname },
> + { "nice", __NR_nice },
> + { "oldfstat", __NR_oldfstat },
> + { "oldlstat", __NR_oldlstat },
> + { "oldolduname", __NR_oldolduname },
> + { "oldstat", __NR_oldstat },
> + { "olduname", __NR_olduname },
> { "open", 2 },
> { "open_by_handle_at", 304 },
> { "openat", 257 },
> { "pause", 34 },
> - { "pciconfig_iobase", __PNR_pciconfig_iobase },
> - { "pciconfig_read", __PNR_pciconfig_read },
> - { "pciconfig_write", __PNR_pciconfig_write },
> + { "pciconfig_iobase", __NR_pciconfig_iobase },
> + { "pciconfig_read", __NR_pciconfig_read },
> + { "pciconfig_write", __NR_pciconfig_write },
> { "perf_event_open", 298 },
> { "personality", 135 },
> { "pipe", 22 },
> @@ -248,8 +248,8 @@ const struct arch_syscall_def x86_64_syscall_table[] = {
> \ { "prlimit64", 302 },
> { "process_vm_readv", 310 },
> { "process_vm_writev", 311 },
> - { "prof", __PNR_prof },
> - { "profil", __PNR_profil },
> + { "prof", __NR_prof },
> + { "profil", __NR_profil },
> { "pselect6", 270 },
> { "ptrace", 101 },
> { "putpmsg", 182 },
> @@ -259,12 +259,12 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "quotactl", 179 },
> { "read", 0 },
> { "readahead", 187 },
> - { "readdir", __PNR_readdir },
> + { "readdir", __NR_readdir },
> { "readlink", 89 },
> { "readlinkat", 267 },
> { "readv", 19 },
> { "reboot", 169 },
> - { "recv", __PNR_recv },
> + { "recv", __NR_recv },
> { "recvfrom", 45 },
> { "recvmmsg", 299 },
> { "recvmsg", 47 },
> @@ -299,9 +299,9 @@ const struct arch_syscall_def x86_64_syscall_table[] = {
> \ { "semget", 64 },
> { "semop", 65 },
> { "semtimedop", 220 },
> - { "send", __PNR_send },
> + { "send", __NR_send },
> { "sendfile", 40 },
> - { "sendfile64", __PNR_sendfile64 },
> + { "sendfile64", __NR_sendfile64 },
> { "sendmmsg", 307 },
> { "sendmsg", 46 },
> { "sendto", 44 },
> @@ -311,68 +311,68 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "set_tid_address", 218 },
> { "setdomainname", 171 },
> { "setfsgid", 123 },
> - { "setfsgid32", __PNR_setfsgid32 },
> + { "setfsgid32", __NR_setfsgid32 },
> { "setfsuid", 122 },
> - { "setfsuid32", __PNR_setfsuid32 },
> + { "setfsuid32", __NR_setfsuid32 },
> { "setgid", 106 },
> - { "setgid32", __PNR_setgid32 },
> + { "setgid32", __NR_setgid32 },
> { "setgroups", 116 },
> - { "setgroups32", __PNR_setgroups32 },
> + { "setgroups32", __NR_setgroups32 },
> { "sethostname", 170 },
> { "setitimer", 38 },
> { "setns", 308 },
> { "setpgid", 109 },
> { "setpriority", 141 },
> { "setregid", 114 },
> - { "setregid32", __PNR_setregid32 },
> + { "setregid32", __NR_setregid32 },
> { "setresgid", 119 },
> - { "setresgid32", __PNR_setresgid32 },
> + { "setresgid32", __NR_setresgid32 },
> { "setresuid", 117 },
> - { "setresuid32", __PNR_setresuid32 },
> + { "setresuid32", __NR_setresuid32 },
> { "setreuid", 113 },
> - { "setreuid32", __PNR_setreuid32 },
> + { "setreuid32", __NR_setreuid32 },
> { "setrlimit", 160 },
> { "setsid", 112 },
> { "setsockopt", 54 },
> { "settimeofday", 164 },
> { "setuid", 105 },
> - { "setuid32", __PNR_setuid32 },
> + { "setuid32", __NR_setuid32 },
> { "setxattr", 188 },
> - { "sgetmask", __PNR_sgetmask },
> + { "sgetmask", __NR_sgetmask },
> { "shmat", 30 },
> { "shmctl", 31 },
> { "shmdt", 67 },
> { "shmget", 29 },
> { "shutdown", 48 },
> - { "sigaction", __PNR_sigaction },
> + { "sigaction", __NR_sigaction },
> { "sigaltstack", 131 },
> - { "signal", __PNR_signal },
> + { "signal", __NR_signal },
> { "signalfd", 282 },
> { "signalfd4", 289 },
> - { "sigpending", __PNR_sigpending },
> - { "sigprocmask", __PNR_sigprocmask },
> - { "sigreturn", __PNR_sigreturn },
> - { "sigsuspend", __PNR_sigsuspend },
> + { "sigpending", __NR_sigpending },
> + { "sigprocmask", __NR_sigprocmask },
> + { "sigreturn", __NR_sigreturn },
> + { "sigsuspend", __NR_sigsuspend },
> { "socket", 41 },
> - { "socketcall", __PNR_socketcall },
> + { "socketcall", __NR_socketcall },
> { "socketpair", 53 },
> { "splice", 275 },
> - { "ssetmask", __PNR_ssetmask },
> + { "ssetmask", __NR_ssetmask },
> { "stat", 4 },
> - { "stat64", __PNR_stat64 },
> + { "stat64", __NR_stat64 },
> { "statfs", 137 },
> - { "statfs64", __PNR_statfs64 },
> - { "stime", __PNR_stime },
> - { "stty", __PNR_stty },
> + { "statfs64", __NR_statfs64 },
> + { "stime", __NR_stime },
> + { "stty", __NR_stty },
> { "swapoff", 168 },
> { "swapon", 167 },
> { "symlink", 88 },
> { "symlinkat", 266 },
> { "sync", 162 },
> { "sync_file_range", 277 },
> - { "sync_file_range2", __PNR_sync_file_range2 },
> + { "sync_file_range2", __NR_sync_file_range2 },
> { "syncfs", 306 },
> - { "syscall", __PNR_syscall },
> + { "syscall", __NR_syscall },
> { "_sysctl", 156 },
> { "sysfs", 139 },
> { "sysinfo", 99 },
> @@ -391,12 +391,12 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "times", 100 },
> { "tkill", 200 },
> { "truncate", 76 },
> - { "truncate64", __PNR_truncate64 },
> + { "truncate64", __NR_truncate64 },
> { "tuxcall", 184 },
> - { "ugetrlimit", __PNR_ugetrlimit },
> - { "ulimit", __PNR_ulimit },
> + { "ugetrlimit", __NR_ugetrlimit },
> + { "ulimit", __NR_ulimit },
> { "umask", 95 },
> - { "umount", __PNR_umount },
> + { "umount", __NR_umount },
> { "umount2", 166 },
> { "uname", 63 },
> { "unlink", 87 },
> @@ -409,13 +409,13 @@ const struct arch_syscall_def x86_64_syscall_table[] =
> { \ { "utimes", 235 },
> { "vfork", 58 },
> { "vhangup", 153 },
> - { "vm86", __PNR_vm86 },
> - { "vm86old", __PNR_vm86old },
> + { "vm86", __NR_vm86 },
> + { "vm86old", __NR_vm86old },
> { "vmsplice", 278 },
> { "vserver", 236 },
> { "wait4", 61 },
> { "waitid", 247 },
> - { "waitpid", __PNR_waitpid },
> + { "waitpid", __NR_waitpid },
> { "write", 1 },
> { "writev", 20 },
> { NULL, __NR_SCMP_ERROR },
--
paul moore
security and virtualization @ redhat
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
libseccomp-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libseccomp-discuss