diff options
author | Kees Cook <keescook@chromium.org> | 2014-06-10 18:45:09 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2014-07-18 15:13:38 -0400 |
commit | 8855d608c145c1ca0e26f4da00741080bb49d80d (patch) | |
tree | 9e55c5a93a9654ea37f812b209113019e0ce6d76 | |
parent | 839669714f0a85d677283690e6e164fb698ce206 (diff) |
MIPS: add seccomp syscall
Wires up the new seccomp syscall.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
-rw-r--r-- | arch/mips/include/uapi/asm/unistd.h | 15 | ||||
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 1 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 1 |
5 files changed, 13 insertions, 6 deletions
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index 5805414777e0..9bc13eaf9d67 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
@@ -372,16 +372,17 @@ | |||
372 | #define __NR_sched_setattr (__NR_Linux + 349) | 372 | #define __NR_sched_setattr (__NR_Linux + 349) |
373 | #define __NR_sched_getattr (__NR_Linux + 350) | 373 | #define __NR_sched_getattr (__NR_Linux + 350) |
374 | #define __NR_renameat2 (__NR_Linux + 351) | 374 | #define __NR_renameat2 (__NR_Linux + 351) |
375 | #define __NR_seccomp (__NR_Linux + 352) | ||
375 | 376 | ||
376 | /* | 377 | /* |
377 | * Offset of the last Linux o32 flavoured syscall | 378 | * Offset of the last Linux o32 flavoured syscall |
378 | */ | 379 | */ |
379 | #define __NR_Linux_syscalls 351 | 380 | #define __NR_Linux_syscalls 352 |
380 | 381 | ||
381 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 382 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
382 | 383 | ||
383 | #define __NR_O32_Linux 4000 | 384 | #define __NR_O32_Linux 4000 |
384 | #define __NR_O32_Linux_syscalls 351 | 385 | #define __NR_O32_Linux_syscalls 352 |
385 | 386 | ||
386 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 387 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
387 | 388 | ||
@@ -701,16 +702,17 @@ | |||
701 | #define __NR_sched_setattr (__NR_Linux + 309) | 702 | #define __NR_sched_setattr (__NR_Linux + 309) |
702 | #define __NR_sched_getattr (__NR_Linux + 310) | 703 | #define __NR_sched_getattr (__NR_Linux + 310) |
703 | #define __NR_renameat2 (__NR_Linux + 311) | 704 | #define __NR_renameat2 (__NR_Linux + 311) |
705 | #define __NR_seccomp (__NR_Linux + 312) | ||
704 | 706 | ||
705 | /* | 707 | /* |
706 | * Offset of the last Linux 64-bit flavoured syscall | 708 | * Offset of the last Linux 64-bit flavoured syscall |
707 | */ | 709 | */ |
708 | #define __NR_Linux_syscalls 311 | 710 | #define __NR_Linux_syscalls 312 |
709 | 711 | ||
710 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 712 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
711 | 713 | ||
712 | #define __NR_64_Linux 5000 | 714 | #define __NR_64_Linux 5000 |
713 | #define __NR_64_Linux_syscalls 311 | 715 | #define __NR_64_Linux_syscalls 312 |
714 | 716 | ||
715 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 717 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
716 | 718 | ||
@@ -1034,15 +1036,16 @@ | |||
1034 | #define __NR_sched_setattr (__NR_Linux + 313) | 1036 | #define __NR_sched_setattr (__NR_Linux + 313) |
1035 | #define __NR_sched_getattr (__NR_Linux + 314) | 1037 | #define __NR_sched_getattr (__NR_Linux + 314) |
1036 | #define __NR_renameat2 (__NR_Linux + 315) | 1038 | #define __NR_renameat2 (__NR_Linux + 315) |
1039 | #define __NR_seccomp (__NR_Linux + 316) | ||
1037 | 1040 | ||
1038 | /* | 1041 | /* |
1039 | * Offset of the last N32 flavoured syscall | 1042 | * Offset of the last N32 flavoured syscall |
1040 | */ | 1043 | */ |
1041 | #define __NR_Linux_syscalls 315 | 1044 | #define __NR_Linux_syscalls 316 |
1042 | 1045 | ||
1043 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1046 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
1044 | 1047 | ||
1045 | #define __NR_N32_Linux 6000 | 1048 | #define __NR_N32_Linux 6000 |
1046 | #define __NR_N32_Linux_syscalls 315 | 1049 | #define __NR_N32_Linux_syscalls 316 |
1047 | 1050 | ||
1048 | #endif /* _UAPI_ASM_UNISTD_H */ | 1051 | #endif /* _UAPI_ASM_UNISTD_H */ |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 3245474f19d5..ab02d14f1b5c 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -578,3 +578,4 @@ EXPORT(sys_call_table) | |||
578 | PTR sys_sched_setattr | 578 | PTR sys_sched_setattr |
579 | PTR sys_sched_getattr /* 4350 */ | 579 | PTR sys_sched_getattr /* 4350 */ |
580 | PTR sys_renameat2 | 580 | PTR sys_renameat2 |
581 | PTR sys_seccomp | ||
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index be2fedd4ae33..010dccf128ec 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S | |||
@@ -431,4 +431,5 @@ EXPORT(sys_call_table) | |||
431 | PTR sys_sched_setattr | 431 | PTR sys_sched_setattr |
432 | PTR sys_sched_getattr /* 5310 */ | 432 | PTR sys_sched_getattr /* 5310 */ |
433 | PTR sys_renameat2 | 433 | PTR sys_renameat2 |
434 | PTR sys_seccomp | ||
434 | .size sys_call_table,.-sys_call_table | 435 | .size sys_call_table,.-sys_call_table |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index c1dbcda4b816..c3b3b6525df5 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -424,4 +424,5 @@ EXPORT(sysn32_call_table) | |||
424 | PTR sys_sched_setattr | 424 | PTR sys_sched_setattr |
425 | PTR sys_sched_getattr | 425 | PTR sys_sched_getattr |
426 | PTR sys_renameat2 /* 6315 */ | 426 | PTR sys_renameat2 /* 6315 */ |
427 | PTR sys_seccomp | ||
427 | .size sysn32_call_table,.-sysn32_call_table | 428 | .size sysn32_call_table,.-sysn32_call_table |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index f1343ccd7ed7..bb1550b1f501 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -557,4 +557,5 @@ EXPORT(sys32_call_table) | |||
557 | PTR sys_sched_setattr | 557 | PTR sys_sched_setattr |
558 | PTR sys_sched_getattr /* 4350 */ | 558 | PTR sys_sched_getattr /* 4350 */ |
559 | PTR sys_renameat2 | 559 | PTR sys_renameat2 |
560 | PTR sys_seccomp | ||
560 | .size sys32_call_table,.-sys32_call_table | 561 | .size sys32_call_table,.-sys32_call_table |