[PATCH 0/2] arm64/entry: Fix involuntary preemption exception masking

From: Mark Rutland

Date: Fri Mar 20 2026 - 07:31:07 EST


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(-)

--
2.30.2