linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: mjw@us.ibm.com
Cc: linuxppc-dev@ozlabs.org, mikey@neuling.org, anton@samba.org
Subject: Re: [PATCH v2] powerpc/ptrace: remove BUG_ON when full register set not available
Date: Thu, 17 Mar 2011 15:20:56 +1100	[thread overview]
Message-ID: <20110317042056.GA29602@drongo> (raw)
In-Reply-To: <1300282642.15145.2.camel@w500>

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.

  reply	other threads:[~2011-03-17  4:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 13:37 [PATCH v2] powerpc/ptrace: remove BUG_ON when full register set not available Michael Wolf
2011-03-17  4:20 ` Paul Mackerras [this message]
2011-03-21  0:15 ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317042056.GA29602@drongo \
    --to=paulus@samba.org \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=mjw@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).