UBUNTU: SAUCE: SECCOMP: x86: Enable HAVE_ARCH_SECCOMP_FILTER
authorWill Drewry <wad@chromium.org>
Thu, 9 Feb 2012 17:28:23 +0000 (11:28 -0600)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:23:08 +0000 (13:23 -0700)
commit9fe7d2fb8535a1ebab8e0ec319b22a19e0d7669a
tree127ff07fc1e6fa611d348ffd06b5c3b2e0513e3b
parentf90be5540056277e156d3a3d5e27599dd2e0ae8a
UBUNTU: SAUCE: SECCOMP: x86: Enable HAVE_ARCH_SECCOMP_FILTER

Enable support for seccomp filter on x86:
- asm/tracehook.h exists
- syscall_get_arguments() works
- syscall_rollback() works
- ptrace_report_syscall() works
- secure_computing() return value is honored (see below)

This also adds support for honoring the return
value from secure_computing().

SECCOMP_RET_TRACE and SECCOMP_RET_TRAP may result in seccomp needing to
skip a system call without killing the process.  This is done by
returning a non-zero (-1) value from secure_computing.  This change
makes x86 respect that return value.

To ensure that minimal kernel code is exposed, a non-zero return value
results in an immediate return to user space (with an invalid syscall
number).

Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Kees Cook <kees@ubuntu.com>
arch/x86/Kconfig
arch/x86/kernel/ptrace.c