ARM: add seccomp syscall
authorKees Cook <keescook@chromium.org>
Tue, 10 Jun 2014 22:40:23 +0000 (15:40 -0700)
committerLee Campbell <leecam@chromium.org>
Thu, 9 Oct 2014 19:37:14 +0000 (12:37 -0700)
Wires up the new seccomp syscall.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Conflicts:
arch/arm/include/uapi/asm/unistd.h
arch/arm/kernel/calls.S

Signed-off-by: Lee Campbell <leecam@chromium.org>
arch/arm/include/asm/unistd.h
arch/arm/include/uapi/asm/unistd.h
arch/arm/kernel/calls.S

index 141baa3f9a72d1d931da67c30c600fa85bc4bfc5..acabef1a75df00637def7a94af9f1425d281b7f0 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <uapi/asm/unistd.h>
 
-#define __NR_syscalls  (380)
+#define __NR_syscalls  (384)
 #define __ARM_NR_cmpxchg               (__ARM_NR_BASE+0x00fff0)
 
 #define __ARCH_WANT_STAT64
index af33b44990ed4a395662f0c5e7021049e5755a78..17407c92c0dabd746d538657d929f29380d1b600 100644 (file)
 #define __NR_process_vm_writev         (__NR_SYSCALL_BASE+377)
 #define __NR_kcmp                      (__NR_SYSCALL_BASE+378)
 #define __NR_finit_module              (__NR_SYSCALL_BASE+379)
+/* Reserve for later
+#define __NR_sched_setattr             (__NR_SYSCALL_BASE+380)
+#define __NR_sched_getattr             (__NR_SYSCALL_BASE+381)
+#define __NR_renameat2                 (__NR_SYSCALL_BASE+382)
+*/
+#define __NR_seccomp                   (__NR_SYSCALL_BASE+383)
 
 /*
  * This may need to be greater than __NR_last_syscall+1 in order to
index c6ca7e376773fcc73ef619e1c5a97793d97b41b4..725f844926eaac3ab58468eda87ae3a57e6fddcd 100644 (file)
                CALL(sys_process_vm_writev)
                CALL(sys_kcmp)
                CALL(sys_finit_module)
+/* 380 */      CALL(sys_ni_syscall)            /* reserved sys_sched_setattr */
+               CALL(sys_ni_syscall)            /* reserved sys_sched_getattr */
+               CALL(sys_ni_syscall)            /* reserved sys_renameat2     */
+               CALL(sys_seccomp)
+
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted