linux/arch/powerpc
Nicholas Piggin e2b36d5917 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
4da1f79227 ("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>
2019-05-03 01:58:11 +10:00
..
boot Kbuild updates for v5.1 2019-03-10 17:48:21 -07:00
configs powerpc/configs: Enable CONFIG_USB_XHCI_HCD by default 2019-04-20 22:02:26 +10:00
crypto powerpc/crypto: Use cheaper random numbers for crc-vpmsum self-test 2019-04-20 22:03:11 +10:00
include powerpc/mm: define an empty mm_iommu_init() 2019-05-03 01:58:11 +10:00
kernel powerpc/64: Don't trace code that runs with the soft irq mask unreconciled 2019-05-03 01:58:11 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2019-04-30 22:52:03 +10:00
lib powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
math-emu powerpc: math-emu: remove unneeded header search paths 2019-01-14 20:39:27 +11:00
mm powerpc/mm: print hash info in a helper 2019-05-03 01:20:26 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-03-16 12:20:08 -07:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
perf powerpc updates for 5.1 2019-03-07 12:56:26 -08:00
platforms powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
purgatory powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
sysdev powerpc/xive: add OPAL extensions for the XIVE native exploitation support 2019-04-11 15:31:41 +10:00
tools powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
xmon powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig powerpc/32: Add KASAN support 2019-05-03 01:20:26 +10:00
Kconfig.debug powerpc/32: prepare shadow area for KASAN 2019-05-03 01:20:26 +10:00
Makefile powerpc: vdso: Make vdso32 installation conditional in vdso_install 2019-04-20 22:02:12 +10:00
Makefile.postlink