Skip to content

arm64/entry: Fix involuntary preemption exception masking

Mark Rutland linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2arm64/entry: Fix involuntary preemption exception maskingarch/Kconfig arch/arm64/Kconfig arch/arm64/kernel/entry-common.c +1 more+9 -122 replies
2/2arm64/entry: Remove arch_irqentry_exit_need_resched()arch/arm64/include/asm/entry-common.h arch/arm64/kernel/entry-common.c kernel/entry/common.c+27 -430 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/entry: Fix involuntary preemption exception masking

Hi all,

Since the move to generic IRQ entry, arm64's involuntary kernel preemption logic has been subtly broken, and preemption can lead to tasks running with some exceptions masked unexpectedly.

Patch 1 describes the gory details, but the gist is that due to the way exceptions work on arm64 architecturally, and due to the number of independently maskable exceptions, some aspects of the generic irq entry code aren't a great fit, and arm64 needs to manage more of the sequencing and state management itself. Doing so will also make it possible to implement new stuff in the near future (e.g. architectural NMI).

Patch 2 is purely a cleanup atop patch 1.

Thomas, Peter, I have some questions at the end of the patch 1 commit message, but otherwise I hope this looks good to you. I'm assuming that this should go via the arm64 tree, so I'm looking for your acks on both patches.

Mark.

Mark Rutland (2):
arm64/entry: Fix involuntary preemption exception masking arm64/entry: Remove arch_irqentry_exit_need_resched()

 arch/Kconfig                          |  3 +++
 arch/arm64/Kconfig                    |  1 +
 arch/arm64/include/asm/entry-common.h | 27 ---------------------------
 arch/arm64/kernel/entry-common.c      | 27 +++++++++++++++++++++++++++
 kernel/entry/common.c                 | 20 ++++----------------
 5 files changed, 35 insertions(+), 43 deletions(-)
Signature · 1 line
2.30.2