aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2010-08-26 18:08:35 -0400
committerNicolas Pitre <nicolas.pitre@linaro.org>2010-10-01 22:32:18 -0400
commit70c70d97809c3cdb8ff04f38ee3718c5385a2a4d (patch)
tree33b30af89b35370f01f69f80e44a660e8e80c137 /arch/arm/kernel
parent087aaffcdf9c91667c93923fbc05fa8fb6bc7d3a (diff)
ARM: SECCOMP support
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/entry-common.S15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 7885722bdf4..0385a8207b6 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -295,7 +295,6 @@ ENTRY(vector_swi)
295 295
296 get_thread_info tsk 296 get_thread_info tsk
297 adr tbl, sys_call_table @ load syscall table pointer 297 adr tbl, sys_call_table @ load syscall table pointer
298 ldr ip, [tsk, #TI_FLAGS] @ check for syscall tracing
299 298
300#if defined(CONFIG_OABI_COMPAT) 299#if defined(CONFIG_OABI_COMPAT)
301 /* 300 /*
@@ -312,8 +311,20 @@ ENTRY(vector_swi)
312 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number 311 eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
313#endif 312#endif
314 313
314 ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
315 stmdb sp!, {r4, r5} @ push fifth and sixth args 315 stmdb sp!, {r4, r5} @ push fifth and sixth args
316 tst ip, #_TIF_SYSCALL_TRACE @ are we tracing syscalls? 316
317#ifdef CONFIG_SECCOMP
318 tst r10, #_TIF_SECCOMP
319 beq 1f
320 mov r0, scno
321 bl __secure_computing
322 add r0, sp, #S_R0 + S_OFF @ pointer to regs
323 ldmia r0, {r0 - r3} @ have to reload r0 - r3
3241:
325#endif
326
327 tst r10, #_TIF_SYSCALL_TRACE @ are we tracing syscalls?
317 bne __sys_trace 328 bne __sys_trace
318 329
319 cmp scno, #NR_syscalls @ check upper syscall limit 330 cmp scno, #NR_syscalls @ check upper syscall limit