aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2012-11-15 16:12:00 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-11-19 09:14:17 -0500
commit9b790d71d58be65f9508ab60920eb978af828412 (patch)
tree42114518c27f840aca3ef395636ca1f2fcf09a0e /arch/arm/kernel/entry-common.S
parent1f59d13bee172945ccdfbc5018477ba94a0ac28e (diff)
ARM: 7578/1: arch/move secure_computing into trace
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since tracehook needs to do register changing, this portion is best left in its own function instead of copy/pasting into the callers. Additionally, the return value for secure_computing() is now checked and a -1 value will result in the system call being skipped. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Will Drewry <wad@chromium.org> Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 417bac1846bd..b621871dd277 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -417,16 +417,6 @@ local_restart:
417 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing 417 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
418 stmdb sp!, {r4, r5} @ push fifth and sixth args 418 stmdb sp!, {r4, r5} @ push fifth and sixth args
419 419
420#ifdef CONFIG_SECCOMP
421 tst r10, #_TIF_SECCOMP
422 beq 1f
423 mov r0, scno
424 bl __secure_computing
425 add r0, sp, #S_R0 + S_OFF @ pointer to regs
426 ldmia r0, {r0 - r3} @ have to reload r0 - r3
4271:
428#endif
429
430 tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls? 420 tst r10, #_TIF_SYSCALL_WORK @ are we tracing syscalls?
431 bne __sys_trace 421 bne __sys_trace
432 422