aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2012-12-09 01:16:14 -0500
committerHelge Deller <deller@gmx.de>2013-02-20 16:51:11 -0500
commit52ab532ea76d30b7e7a7b98021e2e873e83029a5 (patch)
treefa11ff7efd4251743d444bef649bfa068e702237 /arch/parisc
parent872420b3b869d47b1f1dd93418c34e306d962668 (diff)
parisc: fix ptrace breakage
1) PTRACE_SYSCALL doesn't work for 64bit process on parisc64. Compat syscall table is used instead of 64bit one. IMO we should either refuse to allow PTRACE_SYSCALL for 64bit processes or duplicate the logics choosing the right syscall table into .Ltracesys. 2) if you have let the tracee run with PTRACE_SYSCALL and it had stopped, you can use PTRACE_POKEUSR to modify syscall number (r20) and arguments 1--4 (r26--r23). Modifications will have effect. However, modifying arguments 5 and 6 (r22 and r21 resp.) works only when process (32bit one) runs on 64bit host - on 32bit one it has no effect. AFAICS, the diff below should fix that one. Signed-off-by: Al Viro <viro@ZenIV.linux.org.uk> Tested-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/syscall.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 86742df0b194..5e055240f00b 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -309,10 +309,13 @@ tracesys_next:
309 LDREG TASK_PT_GR25(%r1), %r25 309 LDREG TASK_PT_GR25(%r1), %r25
310 LDREG TASK_PT_GR24(%r1), %r24 310 LDREG TASK_PT_GR24(%r1), %r24
311 LDREG TASK_PT_GR23(%r1), %r23 311 LDREG TASK_PT_GR23(%r1), %r23
312#ifdef CONFIG_64BIT
313 LDREG TASK_PT_GR22(%r1), %r22 312 LDREG TASK_PT_GR22(%r1), %r22
314 LDREG TASK_PT_GR21(%r1), %r21 313 LDREG TASK_PT_GR21(%r1), %r21
314#ifdef CONFIG_64BIT
315 ldo -16(%r30),%r29 /* Reference param save area */ 315 ldo -16(%r30),%r29 /* Reference param save area */
316#else
317 stw %r22, -52(%r30) /* 5th argument */
318 stw %r21, -56(%r30) /* 6th argument */
316#endif 319#endif
317 320
318 comiclr,>>= __NR_Linux_syscalls, %r20, %r0 321 comiclr,>>= __NR_Linux_syscalls, %r20, %r0