[PATCH] powerpc/64: Don't trace code that runs with the soft irq mask unreconciled

Michael Ellerman patch-notifications at ellerman.id.au
Fri May 3 16:59:29 AEST 2019


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 at gmail.com>

Applied to powerpc next, thanks.

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

cheers


More information about the Linuxppc-dev mailing list