diff options
author | Kees Cook <keescook@chromium.org> | 2014-06-25 19:08:24 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2014-07-18 15:13:37 -0400 |
commit | 48dc92b9fc3926844257316e75ba11eb5c742b2c (patch) | |
tree | 2f35355b95a7c1473fd8d361b4f15a9f368999b4 /include/uapi/asm-generic | |
parent | 3b23dd12846215eff4afb073366b80c0c4d7543e (diff) |
seccomp: add "seccomp" syscall
This adds the new "seccomp" syscall with both an "operation" and "flags"
parameter for future expansion. The third argument is a pointer value,
used with the SECCOMP_SET_MODE_FILTER operation. Currently, flags must
be 0. This is functionally equivalent to prctl(PR_SET_SECCOMP, ...).
In addition to the TSYNC flag later in this patch series, there is a
non-zero chance that this syscall could be used for configuring a fixed
argument area for seccomp-tracer-aware processes to pass syscall arguments
in the future. Hence, the use of "seccomp" not simply "seccomp_add_filter"
for this syscall. Additionally, this syscall uses operation, flags,
and user pointer for arguments because strictly passing arguments via
a user pointer would mean seccomp itself would be unable to trivially
filter the seccomp syscall itself.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>
Diffstat (limited to 'include/uapi/asm-generic')
-rw-r--r-- | include/uapi/asm-generic/unistd.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 333640608087..65acbf0e2867 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -699,9 +699,11 @@ __SYSCALL(__NR_sched_setattr, sys_sched_setattr) | |||
699 | __SYSCALL(__NR_sched_getattr, sys_sched_getattr) | 699 | __SYSCALL(__NR_sched_getattr, sys_sched_getattr) |
700 | #define __NR_renameat2 276 | 700 | #define __NR_renameat2 276 |
701 | __SYSCALL(__NR_renameat2, sys_renameat2) | 701 | __SYSCALL(__NR_renameat2, sys_renameat2) |
702 | #define __NR_seccomp 277 | ||
703 | __SYSCALL(__NR_seccomp, sys_seccomp) | ||
702 | 704 | ||
703 | #undef __NR_syscalls | 705 | #undef __NR_syscalls |
704 | #define __NR_syscalls 277 | 706 | #define __NR_syscalls 278 |
705 | 707 | ||
706 | /* | 708 | /* |
707 | * All syscalls below here should go away really, | 709 | * All syscalls below here should go away really, |