aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-12-07 11:34:37 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-12-10 19:18:26 -0500
commitb10bca0bc699af201770989a88fa293155e9d8de (patch)
tree7e9a997cd61232170a37bca7e99b170965991f41 /arch/arm/kernel/entry-common.S
parent39b175a0092d4a8e0875c67df82285475b1da591 (diff)
ARM: 7595/1: syscall: rework ordering in syscall_trace_exit
syscall_trace_exit is currently doing things back-to-front; invoking the audit hook *after* signalling the debugger, which presents an opportunity for the registers to be re-written by userspace in order to bypass auditing constaints. This patch fixes the ordering by moving the audit code first and the tracehook code last. On the face of it, it looks like current_thread_info()->syscall may be incorrect for the sys_exit tracepoint, but that's actually not an issue because it will have been set during syscall entry and cannot have changed since then. Reported-by: Andrew Gabbasov <Andrew_Gabbasov@mentor.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-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.S1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index ee81dbc6fa10..d863bbf0f1f5 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -455,7 +455,6 @@ __sys_trace:
455 455
456__sys_trace_return: 456__sys_trace_return:
457 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0 457 str r0, [sp, #S_R0 + S_OFF]! @ save returned r0
458 mov r1, scno
459 mov r0, sp 458 mov r0, sp
460 bl syscall_trace_exit 459 bl syscall_trace_exit
461 b ret_slow_syscall 460 b ret_slow_syscall