From a1538fe6019767973b3ee09aa86f2bc39fdffee0 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Wed, 10 Jan 2018 12:16:28 -0500 Subject: arch: update the syscalls for Linux v4.15-rc7 Signed-off-by: Paul Moore (imported from commit c842c2f6c203ad9da37ca60219172aa0be68d26a) --- include/seccomp.h.in | 19 +++++++++++++++++++ src/arch-aarch64-syscalls.c | 5 ++++- src/arch-arm-syscalls.c | 5 ++++- src/arch-mips-syscalls.c | 5 ++++- src/arch-mips64-syscalls.c | 5 ++++- src/arch-mips64n32-syscalls.c | 5 ++++- src/arch-ppc-syscalls.c | 5 ++++- src/arch-ppc64-syscalls.c | 5 ++++- src/arch-s390-syscalls.c | 5 ++++- src/arch-s390x-syscalls.c | 5 ++++- src/arch-x32-syscalls.c | 5 ++++- src/arch-x86-syscalls.c | 7 +++++-- src/arch-x86_64-syscalls.c | 5 ++++- 13 files changed, 68 insertions(+), 13 deletions(-) diff --git a/include/seccomp.h.in b/include/seccomp.h.in index f90407a..cc01a66 100644 --- a/include/seccomp.h.in +++ b/include/seccomp.h.in @@ -1619,6 +1619,25 @@ int seccomp_export_bpf(const scmp_filter_ctx ctx, int fd); #define __NR_pkey_free __PNR_pkey_free #endif /* __NR_pkey_free */ +#define __PNR_get_tls -10204 +#ifndef __NR_get_tls +#ifdef __ARM_NR_get_tls +#define __NR_get_tls __ARM_NR_get_tls +#else +#define __NR_get_tls __PNR_get_tls +#endif +#endif /* __NR_get_tls */ + +#define __PNR_s390_guarded_storage -10205 +#ifndef __NR_s390_guarded_storage +#define __NR_s390_guarded_storage __PNR_s390_guarded_storage +#endif /* __NR_s390_guarded_storage */ + +#define __PNR_s390_sthyi -10206 +#ifndef __NR_s390_sthyi +#define __NR_s390_sthyi __PNR_s390_sthyi +#endif /* __NR_s390_sthyi */ + #ifdef __cplusplus } #endif diff --git a/src/arch-aarch64-syscalls.c b/src/arch-aarch64-syscalls.c index 157aedc..406df70 100644 --- a/src/arch-aarch64-syscalls.c +++ b/src/arch-aarch64-syscalls.c @@ -26,7 +26,7 @@ #include "arch.h" #include "arch-aarch64.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def aarch64_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", __PNR__newselect }, @@ -122,6 +122,7 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \ { "get_mempolicy", 236 }, { "get_robust_list", 100 }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", 168 }, { "getcwd", 17 }, { "getdents", __PNR_getdents }, @@ -304,9 +305,11 @@ const struct arch_syscall_def aarch64_syscall_table[] = { \ { "rt_sigtimedwait", 137 }, { "rt_tgsigqueueinfo", 240 }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", 125 }, { "sched_get_priority_min", 126 }, { "sched_getaffinity", 123 }, diff --git a/src/arch-arm-syscalls.c b/src/arch-arm-syscalls.c index 43e2cc5..e3fdc55 100644 --- a/src/arch-arm-syscalls.c +++ b/src/arch-arm-syscalls.c @@ -37,7 +37,7 @@ #define __SCMP_NR_BASE __SCMP_NR_OABI_SYSCALL_BASE #endif -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def arm_syscall_table[] = { \ /* NOTE: arm_sync_file_range() and sync_file_range2() share values */ { "_llseek", (__SCMP_NR_BASE + 140) }, @@ -134,6 +134,7 @@ const struct arch_syscall_def arm_syscall_table[] = { \ { "get_mempolicy", (__SCMP_NR_BASE + 320) }, { "get_robust_list", (__SCMP_NR_BASE + 339) }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", (__SCMP_NR_BASE + (__SCMP_ARM_NR_BASE + 6)) }, { "getcpu", (__SCMP_NR_BASE + 345) }, { "getcwd", (__SCMP_NR_BASE + 183) }, { "getdents", (__SCMP_NR_BASE + 141) }, @@ -316,9 +317,11 @@ const struct arch_syscall_def arm_syscall_table[] = { \ { "rt_sigtimedwait", (__SCMP_NR_BASE + 177) }, { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 363) }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", (__SCMP_NR_BASE + 159) }, { "sched_get_priority_min", (__SCMP_NR_BASE + 160) }, { "sched_getaffinity", (__SCMP_NR_BASE + 242) }, diff --git a/src/arch-mips-syscalls.c b/src/arch-mips-syscalls.c index a5264c8..2dee53f 100644 --- a/src/arch-mips-syscalls.c +++ b/src/arch-mips-syscalls.c @@ -30,7 +30,7 @@ /* O32 ABI */ #define __SCMP_NR_BASE 4000 -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def mips_syscall_table[] = { \ { "_llseek", (__SCMP_NR_BASE + 140) }, { "_newselect", (__SCMP_NR_BASE + 142) }, @@ -126,6 +126,7 @@ const struct arch_syscall_def mips_syscall_table[] = { \ { "get_mempolicy", (__SCMP_NR_BASE + 269) }, { "get_robust_list", (__SCMP_NR_BASE + 310) }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", (__SCMP_NR_BASE + 312) }, { "getcwd", (__SCMP_NR_BASE + 203) }, { "getdents", (__SCMP_NR_BASE + 141) }, @@ -308,9 +309,11 @@ const struct arch_syscall_def mips_syscall_table[] = { \ { "rt_sigtimedwait", (__SCMP_NR_BASE + 197) }, { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 332) }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", (__SCMP_NR_BASE + 163) }, { "sched_get_priority_min", (__SCMP_NR_BASE + 164) }, { "sched_getaffinity", (__SCMP_NR_BASE + 240) }, diff --git a/src/arch-mips64-syscalls.c b/src/arch-mips64-syscalls.c index bc16b1d..97c6874 100644 --- a/src/arch-mips64-syscalls.c +++ b/src/arch-mips64-syscalls.c @@ -30,7 +30,7 @@ /* 64 ABI */ #define __SCMP_NR_BASE 5000 -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def mips64_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", (__SCMP_NR_BASE + 22) }, @@ -126,6 +126,7 @@ const struct arch_syscall_def mips64_syscall_table[] = { \ { "get_mempolicy", (__SCMP_NR_BASE + 228) }, { "get_robust_list", (__SCMP_NR_BASE + 269) }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", (__SCMP_NR_BASE + 271) }, { "getcwd", (__SCMP_NR_BASE + 77) }, { "getdents", (__SCMP_NR_BASE + 76) }, @@ -308,9 +309,11 @@ const struct arch_syscall_def mips64_syscall_table[] = { \ { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) }, { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 291) }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", (__SCMP_NR_BASE + 143) }, { "sched_get_priority_min", (__SCMP_NR_BASE + 144) }, { "sched_getaffinity", (__SCMP_NR_BASE + 196) }, diff --git a/src/arch-mips64n32-syscalls.c b/src/arch-mips64n32-syscalls.c index fa89bc2..a22d643 100644 --- a/src/arch-mips64n32-syscalls.c +++ b/src/arch-mips64n32-syscalls.c @@ -30,7 +30,7 @@ /* N32 ABI */ #define __SCMP_NR_BASE 6000 -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def mips64n32_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", (__SCMP_NR_BASE + 22) }, @@ -126,6 +126,7 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \ { "get_mempolicy", (__SCMP_NR_BASE + 232) }, { "get_robust_list", (__SCMP_NR_BASE + 273) }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", (__SCMP_NR_BASE + 275) }, { "getcwd", (__SCMP_NR_BASE + 77) }, { "getdents", (__SCMP_NR_BASE + 76) }, @@ -308,9 +309,11 @@ const struct arch_syscall_def mips64n32_syscall_table[] = { \ { "rt_sigtimedwait", (__SCMP_NR_BASE + 126) }, { "rt_tgsigqueueinfo", (__SCMP_NR_BASE + 295) }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", (__SCMP_NR_BASE + 143) }, { "sched_get_priority_min", (__SCMP_NR_BASE + 144) }, { "sched_getaffinity", (__SCMP_NR_BASE + 196) }, diff --git a/src/arch-ppc-syscalls.c b/src/arch-ppc-syscalls.c index fe0cdfb..7ff7fca 100644 --- a/src/arch-ppc-syscalls.c +++ b/src/arch-ppc-syscalls.c @@ -27,7 +27,7 @@ #include "arch.h" #include "arch-ppc.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def ppc_syscall_table[] = { \ { "_llseek", 140 }, { "_newselect", 142 }, @@ -123,6 +123,7 @@ const struct arch_syscall_def ppc_syscall_table[] = { \ { "get_mempolicy", 260 }, { "get_robust_list", 299 }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", 302 }, { "getcwd", 182 }, { "getdents", 141 }, @@ -305,9 +306,11 @@ const struct arch_syscall_def ppc_syscall_table[] = { \ { "rt_sigtimedwait", 176 }, { "rt_tgsigqueueinfo", 322 }, { "rtas", 255 }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", 159 }, { "sched_get_priority_min", 160 }, { "sched_getaffinity", 223 }, diff --git a/src/arch-ppc64-syscalls.c b/src/arch-ppc64-syscalls.c index dc09610..ee094bc 100644 --- a/src/arch-ppc64-syscalls.c +++ b/src/arch-ppc64-syscalls.c @@ -27,7 +27,7 @@ #include "arch.h" #include "arch-ppc64.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def ppc64_syscall_table[] = { \ { "_llseek", 140 }, { "_newselect", 142 }, @@ -123,6 +123,7 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \ { "get_mempolicy", 260 }, { "get_robust_list", 299 }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", 302 }, { "getcwd", 182 }, { "getdents", 141 }, @@ -305,9 +306,11 @@ const struct arch_syscall_def ppc64_syscall_table[] = { \ { "rt_sigtimedwait", 176 }, { "rt_tgsigqueueinfo", 322 }, { "rtas", 255 }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", 159 }, { "sched_get_priority_min", 160 }, { "sched_getaffinity", 223 }, diff --git a/src/arch-s390-syscalls.c b/src/arch-s390-syscalls.c index 8a6cecc..6024eaf 100644 --- a/src/arch-s390-syscalls.c +++ b/src/arch-s390-syscalls.c @@ -10,7 +10,7 @@ #include "arch.h" #include "arch-s390.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def s390_syscall_table[] = { \ { "_llseek", 140 }, { "_newselect", 142 }, @@ -106,6 +106,7 @@ const struct arch_syscall_def s390_syscall_table[] = { \ { "get_mempolicy", 269 }, { "get_robust_list", 305 }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", 311 }, { "getcwd", 183 }, { "getdents", 141 }, @@ -288,9 +289,11 @@ const struct arch_syscall_def s390_syscall_table[] = { \ { "rt_sigtimedwait", 177 }, { "rt_tgsigqueueinfo", 330 }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", 378 }, { "s390_pci_mmio_read", 353 }, { "s390_pci_mmio_write", 352 }, { "s390_runtime_instr", 342 }, + { "s390_sthyi", 380 }, { "sched_get_priority_max", 159 }, { "sched_get_priority_min", 160 }, { "sched_getaffinity", 240 }, diff --git a/src/arch-s390x-syscalls.c b/src/arch-s390x-syscalls.c index 728dfc4..74d1e57 100644 --- a/src/arch-s390x-syscalls.c +++ b/src/arch-s390x-syscalls.c @@ -10,7 +10,7 @@ #include "arch.h" #include "arch-s390x.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def s390x_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", __PNR__newselect }, @@ -106,6 +106,7 @@ const struct arch_syscall_def s390x_syscall_table[] = { \ { "get_mempolicy", 269 }, { "get_robust_list", 305 }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", 311 }, { "getcwd", 183 }, { "getdents", 141 }, @@ -288,9 +289,11 @@ const struct arch_syscall_def s390x_syscall_table[] = { \ { "rt_sigtimedwait", 177 }, { "rt_tgsigqueueinfo", 330 }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", 378 }, { "s390_pci_mmio_read", 353 }, { "s390_pci_mmio_write", 352 }, { "s390_runtime_instr", 342 }, + { "s390_sthyi", 380 }, { "sched_get_priority_max", 159 }, { "sched_get_priority_min", 160 }, { "sched_getaffinity", 240 }, diff --git a/src/arch-x32-syscalls.c b/src/arch-x32-syscalls.c index bb3e077..8a6cd64 100644 --- a/src/arch-x32-syscalls.c +++ b/src/arch-x32-syscalls.c @@ -26,7 +26,7 @@ #include "arch.h" #include "arch-x32.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def x32_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", __PNR__newselect }, @@ -122,6 +122,7 @@ const struct arch_syscall_def x32_syscall_table[] = { \ { "get_mempolicy", (X32_SYSCALL_BIT + 239) }, { "get_robust_list", (X32_SYSCALL_BIT + 531) }, { "get_thread_area", __PNR_get_thread_area }, + { "get_tls", __PNR_get_tls }, { "getcpu", (X32_SYSCALL_BIT + 309) }, { "getcwd", (X32_SYSCALL_BIT + 79) }, { "getdents", (X32_SYSCALL_BIT + 78) }, @@ -304,9 +305,11 @@ const struct arch_syscall_def x32_syscall_table[] = { \ { "rt_sigtimedwait", (X32_SYSCALL_BIT + 523) }, { "rt_tgsigqueueinfo", (X32_SYSCALL_BIT + 536) }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", (X32_SYSCALL_BIT + 146) }, { "sched_get_priority_min", (X32_SYSCALL_BIT + 147) }, { "sched_getaffinity", (X32_SYSCALL_BIT + 204) }, diff --git a/src/arch-x86-syscalls.c b/src/arch-x86-syscalls.c index 81a52a3..abce705 100644 --- a/src/arch-x86-syscalls.c +++ b/src/arch-x86-syscalls.c @@ -26,7 +26,7 @@ #include "arch.h" #include "arch-x86.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def x86_syscall_table[] = { \ { "_llseek", 140 }, { "_newselect", 142 }, @@ -41,7 +41,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \ { "alarm", 27 }, { "arm_fadvise64_64", __PNR_arm_fadvise64_64 }, { "arm_sync_file_range", __PNR_arm_sync_file_range }, - { "arch_prctl", __PNR_arch_prctl }, + { "arch_prctl", 384 }, { "bdflush", 134 }, { "bind", 361 }, { "bpf", 357 }, @@ -122,6 +122,7 @@ const struct arch_syscall_def x86_syscall_table[] = { \ { "get_mempolicy", 275 }, { "get_robust_list", 312 }, { "get_thread_area", 244 }, + { "get_tls", __PNR_get_tls }, { "getcpu", 318 }, { "getcwd", 183 }, { "getdents", 141 }, @@ -304,9 +305,11 @@ const struct arch_syscall_def x86_syscall_table[] = { \ { "rt_sigtimedwait", 177 }, { "rt_tgsigqueueinfo", 335 }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", 159 }, { "sched_get_priority_min", 160 }, { "sched_getaffinity", 242 }, diff --git a/src/arch-x86_64-syscalls.c b/src/arch-x86_64-syscalls.c index 1da2530..203dafa 100644 --- a/src/arch-x86_64-syscalls.c +++ b/src/arch-x86_64-syscalls.c @@ -26,7 +26,7 @@ #include "arch.h" #include "arch-x86_64.h" -/* NOTE: based on Linux 4.14 */ +/* NOTE: based on Linux 4.15-rc7 */ const struct arch_syscall_def x86_64_syscall_table[] = { \ { "_llseek", __PNR__llseek }, { "_newselect", __PNR__newselect }, @@ -122,6 +122,7 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \ { "get_mempolicy", 239 }, { "get_robust_list", 274 }, { "get_thread_area", 211 }, + { "get_tls", __PNR_get_tls }, { "getcpu", 309 }, { "getcwd", 79 }, { "getdents", 78 }, @@ -304,9 +305,11 @@ const struct arch_syscall_def x86_64_syscall_table[] = { \ { "rt_sigtimedwait", 128 }, { "rt_tgsigqueueinfo", 297 }, { "rtas", __PNR_rtas }, + { "s390_guarded_storage", __PNR_s390_guarded_storage }, { "s390_pci_mmio_read", __PNR_s390_pci_mmio_read }, { "s390_pci_mmio_write", __PNR_s390_pci_mmio_write }, { "s390_runtime_instr", __PNR_s390_runtime_instr }, + { "s390_sthyi", __PNR_s390_sthyi }, { "sched_get_priority_max", 146 }, { "sched_get_priority_min", 147 }, { "sched_getaffinity", 204 }, -- cgit v1.2.1