]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] Ensure FULL_REGS on exec
authorRoland McGrath <roland@redhat.com>
Mon, 24 Sep 2007 23:52:44 +0000 (16:52 -0700)
committerPaul Mackerras <paulus@samba.org>
Tue, 25 Sep 2007 10:40:41 +0000 (20:40 +1000)
commit474f81967217f3bec2389ae913da72641f2c40e3
tree8c9e16b05eeb0f56c49dcf61b145732569010ec8
parent4942de4a0e914f205d351a81873f4f63986bcc3c
[POWERPC] Ensure FULL_REGS on exec

When PTRACE_O_TRACEEXEC is used, a ptrace call to fetch the registers at
the PTRACE_EVENT_EXEC stop (PTRACE_PEEKUSR) will oops in CHECK_FULL_REGS.
With recent versions, "gdb --args /bin/sh -c 'exec /bin/true'" and "run" at
the (gdb) prompt is sufficient to produce this.  I also have written an
isolated test case, see https://bugzilla.redhat.com/show_bug.cgi?id=301791#c15.

This change fixes the problem by clearing the low bit of pt_regs.trap in
start_thread so that FULL_REGS is true again.  This is correct since all of
the GPRs that "full" refers to are cleared in start_thread.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/process.c