linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Matt Evans <matt@ozlabs.org>, linuxppc-dev@lists.ozlabs.org
Subject: Re: powerpc: Clear branch trap (MSR.BE) before delivering SIGTRAP
Date: Wed,  4 Apr 2018 02:03:42 +1000 (AEST)	[thread overview]
Message-ID: <40Fv5p4GXqz9s0y@ozlabs.org> (raw)
In-Reply-To: <74EBF461-0D94-4C2D-ABA7-0B9BE010F173@ozlabs.org>

On Mon, 2018-03-26 at 16:55:21 UTC, Matt Evans wrote:
> When using SIG_DBG_BRANCH_TRACING, MSR.BE is left enabled in the
> user context when single_step_exception() prepares the SIGTRAP
> delivery.  The resulting branch-trap-within-the-SIGTRAP-handler
> isn't healthy.
> 
> Commit 2538c2d08f46141550a1e68819efa8fe31c6e3dc broke this, by
> replacing an MSR mask operation of ~(MSR_SE | MSR_BE) with a call
> to clear_single_step() which only clears MSR_SE.
> 
> This patch adds a new helper, clear_br_trace(), which clears the
> debug trap before invoking the signal handler.  This helper is a
> NOP for BookE as SIG_DBG_BRANCH_TRACING isn't supported on BookE.
> 
> Signed-off-by: Matt Evans <matt@ozlabs.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/0e524e761fc2157f1037e0f5d616cd

cheers

      parent reply	other threads:[~2018-04-03 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 16:55 [PATCH] powerpc: Clear branch trap (MSR.BE) before delivering SIGTRAP Matt Evans
2018-03-28  5:54 ` Michael Ellerman
2018-03-28 10:36   ` Matt Evans
2018-03-29 11:54     ` Matt Evans
2018-04-04  6:11       ` Michael Ellerman
2018-04-03 16:03 ` Michael Ellerman [this message]

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=40Fv5p4GXqz9s0y@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=matt@ozlabs.org \
    /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).