Skip to content

arm64: fix lockdep in NMI context

Mark Rutland linux-arm-kernel lkml 1 version Applied

Status from this message: Applied to arm64 (for-next/irqflags-nmi), thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2arch: make TRACE_IRQFLAGS_NMI_SUPPORT genericarch/Kconfig arch/x86/Kconfig arch/x86/Kconfig.debug+4 -30 replies
2/2arm64: select TRACE_IRQFLAGS_NMI_SUPPORTarch/arm64/Kconfig+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] arm64: fix lockdep in NMI context

For lockdep to function correctly in NMI context, architectures need to correctly save/restore lockdep state at NMI entry/exit time, correctly manage lockdep state within the NMI context, and need to select TRACE_IRQFLAGS_NMI_SUPPORT.

Currently arm64 falls short of this merely by failing to select TRACE_IRQFLAGS_NMI_SUPPORT, and this can result in spurious lockdep splats with GICv3 Pseudo-NMIs are in use. Patch 2 has an example.

Patch 1 makes TRACE_IRQFLAGS_NMI_SUPPORT a generically selectable kconfig symbol (as it is currently defined under arch/x86). Patch 2 selects this on arm64 (providing the behaviour we'd intended when reworking our entry code).

For anyone testing, beware that there are some other latent issues with GICv3 Pseudo-NMIs. I'm currently working to fix those whcih I am aware of, but as this is orthogonal I'd like to get it out the way on its own.

Thanks,
Mark.

Mark Rutland (2):
arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic
arm64: select TRACE_IRQFLAGS_NMI_SUPPORT

 arch/Kconfig           | 3 +++
 arch/arm64/Kconfig     | 1 +
 arch/x86/Kconfig       | 1 +
 arch/x86/Kconfig.debug | 3 ---
 4 files changed, 5 insertions(+), 3 deletions(-)
Signature · 1 line
2.30.2