summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-07-19 17:49:22 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-07-28 11:11:53 +0100
commitc7aa00db074e4961b49277d7d0fc2f5367d914ca (patch)
treec8c511d3f07ad7dc53cf5ca2b326ba0c4c352cea /arch/arm/kernel/entry-common.S
parent6628521784d1da3b7354c6b6e8499e19ab46a3d1 (diff)
downloadop-kernel-dev-c7aa00db074e4961b49277d7d0fc2f5367d914ca.zip
op-kernel-dev-c7aa00db074e4961b49277d7d0fc2f5367d914ca.tar.gz
ARM: 7475/1: sys_trace: allow all syscall arguments to be updated via ptrace
Prior to syscall invocation, __sys_trace only reloads r0-r3 from the kernel stack, preventing the debugger from updating arguments 5-7 when signalled via ptrace. This patch updates the code to reload r0-r6, updating arguments 5 and 6 on the stack (argument 7 is only used by OABI indirect syscalls and can remain in a register). Reported-by: Al Viro <viro@zeniv.linux.org.uk> 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.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 2909bbca..978eac5 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -443,7 +443,8 @@ __sys_trace:
mov scno, r0 @ syscall number (possibly new)
add r1, sp, #S_R0 + S_OFF @ pointer to regs
cmp scno, #NR_syscalls @ check upper syscall limit
- ldmccia r1, {r0 - r3} @ have to reload r0 - r3
+ ldmccia r1, {r0 - r6} @ have to reload r0 - r6
+ stmccia sp, {r4, r5} @ and update the stack args
ldrcc pc, [tbl, scno, lsl #2] @ call sys_* routine
b 2b
OpenPOWER on IntegriCloud