Thread (25 messages) 25 messages, 4 authors, 2026-03-27

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

From: Mark Rutland <mark.rutland@arm.com>
Date: 2026-03-24 10:52:09
Also in: lkml

On Tue, Mar 24, 2026 at 11:14:28AM +0800, Jinjie Ruan wrote:
On 2026/3/20 19:30, Mark Rutland wrote:
quoted
On arm64, involuntary kernel preemption has been subtly broken since the
move to the generic irq entry code. When preemption occurs, the new task
may run with SError and Debug exceptions masked unexpectedly, leading to
a loss of RAS events, breakpoints, watchpoints, and single-step
exceptions.
We can also add a check in arch_irqentry_exit_need_resched to prevent
schedule-out when the DA bit is set.
That *might* be good enough for a backport to stable, but that's not the
right fix going forwards.

Checking the DAIF.DA bits will prevent preemption from anything other
than real interrupts, and Thomas said we should preempt wherever
possible:

  https://lore.kernel.org/linux-arm-kernel/87h5qak2uv.ffs@tglx/ (local)

The interrupt handling path is also inconsistent w.r.t. masking DAIF
upon return, and with that cleaned up it'll look the same as other
exceptions, and we can't rely on DAIF.DA.

I think there are alternative options here; I have a half-written reply
to Thomas's other message:

  https://lore.kernel.org/linux-arm-kernel/87fr5six4d.ffs@tglx/ (local)

... and I'll try to finish that up and get it out shortly.

Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help