]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64: Don't trace code that runs with the soft irq mask unreconciled
authorNicholas Piggin <npiggin@gmail.com>
Thu, 2 May 2019 05:21:07 +0000 (15:21 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 15:58:11 +0000 (01:58 +1000)
commitf64a5c6feb084cc1aed1f6f233075ab784141ea8
tree2481304e6d5276d27a69bd09353759c300e33b9e
parent22d5e64961c4018a0960e00e96e4fd9c60398956
powerpc/64: Don't trace code that runs with the soft irq mask unreconciled

"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
b53ae2a710ec2 ("powerpc/64: Disable irq restore warning for now").

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/fpu.S
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/process.c
arch/powerpc/kernel/vector.S