summaryrefslogtreecommitdiff
path: root/kernel/Kconfig.locks
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-07-23 20:21:09 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2015-07-30 14:34:44 +1000
commit2449acc5348b94325e9374056b2cc3ed55816e96 (patch)
tree0701e112a318bc4d00c5d37a502766487b447cac /kernel/Kconfig.locks
parent1b60bab04e03d7ed74826dc20fda9d907d011313 (diff)
powerpc/kernel: Enable seccomp filter
This commit enables seccomp filter on powerpc, now that we have all the necessary pieces in place. To support seccomp's desire to modify the syscall return value under some circumstances, we use a different ABI to the ptrace ABI. That is we use r3 as the syscall return value, and orig_gpr3 is the first syscall parameter. This means the seccomp code, or a ptracer via SECCOMP_RET_TRACE, will see -ENOSYS preloaded in r3. This is identical to the behaviour on x86, and allows seccomp or the ptracer to either leave the -ENOSYS or change it to something else, as well as rejecting or not the syscall by modifying r0. If seccomp does not reject the syscall, we restore the register state to match what ptrace and audit expect, ie. r3 is the first syscall parameter again. We do this restore using orig_gpr3, which may have been modified by seccomp, which allows seccomp to modify the first syscall paramater and allow the syscall to proceed. We need to #ifdef the the additional handling of r3 for seccomp, so move it all out of line. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'kernel/Kconfig.locks')
0 files changed, 0 insertions, 0 deletions