[PATCH v2] powerpc/ptrace: remove BUG_ON when full register set not available

Paul Mackerras paulus at samba.org
Thu Mar 17 15:20:56 EST 2011


On Wed, Mar 16, 2011 at 08:37:22AM -0500, Michael Wolf wrote:

> In some cases during a threaded core dump not all 
> the threads will have a full register set.  This
> will cause problems when the sigkill is sent to
> the thread.  To solve this problem a poison value
> (0xdeadbeef) will be placed in the buffer in place 
> of the actual register values.  This will affect
> gpr14 to gpr31.

To be clear, this happens when the signal causing the core dump races
with a thread exiting.  The race happens when the exiting thread has
entered the kernel for the last time before the signal arrives, but
doesn't get far enough through the exit code to avoid being included
in the core dump.  So we get a thread included in the core dump which
is never going to go out to userspace again and only has a partial
register set recorded.  Normally we would catch each thread as it is
about to go into userspace and capture the full register set then.
However, this exiting thread is never going to go out to userspace
again, so we have no way to capture its full register set.  It doesn't
really matter, though, as this is a thread which is effectively
already dead.

Paul.



More information about the Linuxppc-dev mailing list