android_kernel_google_msm/kernel
Kees Cook 18540f293a 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>

Conflicts:
	arch/x86/syscalls/syscall_32.tbl
	arch/x86/syscalls/syscall_64.tbl
	include/linux/syscalls.h
	include/uapi/asm-generic/unistd.h
	include/uapi/linux/seccomp.h
	kernel/seccomp.c
	kernel/sys_ni.c
2014-10-31 19:46:27 -07:00
..
debug debug: add parameters to prevent entering debug mode on errors 2012-05-18 17:03:10 -07:00
events perf: Treat attr.config as u64 in perf_swevent_init() 2013-05-14 09:12:03 -07:00
gcov
irq random: remove rand_initialize_irq() 2013-09-09 17:01:42 -07:00
power Power: Changes the permission to read only for sysfs file 2014-08-05 19:00:47 +00:00
sched sched: Fix migration thread runtime bogosity 2014-07-09 14:32:18 -07:00
time timekeeping: fix 32-bit overflow in get_monotonic_boottime 2013-04-18 16:08:05 -07:00
trace trace/events: add gpu trace events 2013-04-18 16:08:19 -07:00
.gitignore
acct.c
async.c
audit.c
audit.h
audit_tree.c
audit_watch.c
auditfilter.c
auditsc.c seccomp: remove duplicated failure logging 2014-10-31 19:46:13 -07:00
backtracetest.c
bounds.c
capability.c
cgroup.c cgroup: Fix use after free of cgrp (cgrp->css_sets) 2014-07-24 15:38:09 -07:00
cgroup_freezer.c
compat.c compat: Fix RT signal mask corruption via sigprocmask 2012-05-10 08:58:33 -07:00
configs.c
cpu.c Move x86_64 idle notifiers to generic 2012-04-09 13:57:52 -07:00
cpu_pm.c
cpuset.c
crash_dump.c
cred.c cred: copy_process() should clear child->replacement_session_keyring 2012-04-11 08:20:11 -07:00
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c lockdep: remove task argument from debug_check_no_locks_held 2013-07-12 14:22:56 -07:00
extable.c
fork.c seccomp: add system call filtering using BPF 2014-10-31 19:46:13 -07:00
freezer.c freezer: skip waking up tasks with PF_FREEZER_SKIP set 2013-07-12 14:22:56 -07:00
futex.c futex: Make lookup_pi_state more robust 2014-06-11 15:16:22 -07:00
futex_compat.c
groups.c
hrtimer.c nanosleep: use freezable blocking call 2013-07-12 14:22:58 -07:00
hung_task.c
irq_work.c irq_work: fix compile failure on tile from missing include 2012-04-13 13:15:16 -04:00
itimer.c itimer: Use printk_once instead of WARN_ONCE 2012-04-10 11:00:30 +02:00
jump_label.c
kallsyms.c vsprintf: Fix %ps on non symbols when using kallsyms 2013-02-08 15:14:22 -08:00
Kconfig.freezer
Kconfig.hz
Kconfig.locks
Kconfig.preempt
kexec.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
latencytop.c
lockdep.c lockdep: remove task argument from debug_check_no_locks_held 2013-07-12 14:22:56 -07:00
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
Makefile
module.c
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
nsproxy.c
padata.c
panic.c panic: resume console if panic after console suspend. 2013-09-09 17:16:14 -07:00
params.c
pid.c
pid_namespace.c
posix-cpu-timers.c
posix-timers.c
printk.c panic: resume console if panic after console suspend. 2013-09-09 17:16:14 -07:00
profile.c
ptrace.c ptrace: ensure arch_ptrace/ptrace_request can never race with SIGKILL 2013-04-18 16:08:07 -07:00
range.c
rcu.h
rcupdate.c
rcutiny.c
rcutiny_plugin.h
rcutorture.c
rcutree.c rcu: Fix day-one dyntick-idle stall-warning bug 2013-02-08 15:14:25 -08:00
rcutree.h
rcutree_plugin.h
rcutree_trace.c
relay.c
res_counter.c
resource.c DMM: Fix for movable bytes near end of address space 2013-02-20 02:50:30 -08:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
seccomp.c seccomp: add "seccomp" syscall 2014-10-31 19:46:27 -07:00
semaphore.c
signal.c signal, x86: add SIGSYS info and make it synchronous. 2014-10-31 19:46:15 -07:00
smp.c
softirq.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c
sys.c seccomp: add system call filtering using BPF 2014-10-31 19:46:13 -07:00
sys_ni.c seccomp: add "seccomp" syscall 2014-10-31 19:46:27 -07:00
sysctl.c Revert "sched: add sysctl for controlling task migrations on wake" 2013-03-15 17:13:14 -07:00
sysctl_binary.c msm: 8x55: put reason for boot in procfs from SMEM 2013-02-08 15:14:28 -08:00
taskstats.c
test_kprobes.c
time.c
timeconst.pl
timer.c timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE 2013-06-24 18:55:42 +00:00
tracepoint.c
tsacct.c
uid16.c
up.c
user-return-notifier.c
user.c
user_namespace.c
utsname.c
utsname_sysctl.c
wait.c
watchdog.c
workqueue.c workqueue: skip nr_running sanity check in worker_enter_idle() if trustee is active 2013-03-04 12:48:24 -08:00
workqueue_sched.h