linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH] powerpc/64: Don't trace code that runs with the soft irq mask unreconciled
Date: Fri,  3 May 2019 16:59:29 +1000 (AEST)	[thread overview]
Message-ID: <44wNKY504cz9sPZ@ozlabs.org> (raw)
In-Reply-To: <20190502052107.24738-1-npiggin@gmail.com>

On Thu, 2019-05-02 at 05:21:07 UTC, Nicholas Piggin wrote:
> "Reconciling" in terms of interrupt handling, is to bring the soft irq
> mask state in to synch with the hardware, after an interrupt causes
> MSR[EE] to be cleared (while the soft mask may be enabled, and hard
> irqs not marked disabled).
> 
> General kernel code should not be called while unreconciled, because
> local_irq_disable, etc. manipulations can cause surprising irq traces,
> and it's fragile because the soft irq code does not really expect to
> be called in this situation.
> 
> When exiting from an interrupt, MSR[EE] is cleared to prevent races,
> but soft irq state is enabled for the returned-to context, so this is
> now an unreconciled state. restore_math is called in this state, and
> that can be ftraced, and the ftrace subsystem disables local irqs.
> 
> Mark restore_math and its callees as notrace. Restore a sanity check
> in the soft irq code that had to be disabled for this case, by commit
> 4da1f79227ad4 ("powerpc/64: Disable irq restore warning for now").
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/e2b36d591720d81741f37e047a6f0047

cheers

      reply	other threads:[~2019-05-03  7:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02  5:21 [PATCH] powerpc/64: Don't trace code that runs with the soft irq mask unreconciled Nicholas Piggin
2019-05-03  6:59 ` 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=44wNKY504cz9sPZ@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.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).