[POWERPC] Allow ptrace write to pt_regs trap and orig_r3
commit912000e73ee8fcb97831b123c9c3a7274b71cab7
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 4 Jun 2007 05:15:46 +0000 (4 15:15 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 14 Jun 2007 12:29:57 +0000 (14 22:29 +1000)
treea81fcda0f11cbb4c428ffae9f9f55f12677051fe
parent1b6610d6fcb8dc23631cf48f09aa02e6649e379d
[POWERPC] Allow ptrace write to pt_regs trap and orig_r3

This patch allows a ptracer to write to the "trap" and "orig_r3" words
of the pt_regs.

This, along with a subsequent patch to the signal restart code, should
enable gdb to properly handle syscall restarting after executing a separate
function (at least when there's no restart block).

This patch also removes ptrace32.c code toying directly with the registers
and makes it use the ptrace_get/put_reg() accessors for everything so that
the logic for checking what is permitted is in only one place.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/ptrace.c
arch/powerpc/kernel/ptrace32.c