Re: [PATCH 1/2] arm64: sdei: Run the event handler on the kernel vectors
From: Kiryl Shutsemau
Date: Thu Nov 05 2026 - 06:38:39 EST
On Wed, Nov 04, 2026 at 10:28:41AM -0800, Usama Arif wrote:
> Would doing the swap in __sdei_handler(), around the whole NMI
> entry and exit pair, close that window?
Yes. The WARNs you point at only fire when context tracking is already
broken, but the same window has tracepoints: trace_hardirqs_off_finish()
fires irq_disable exactly when the event lands in user space, and a BPF
program attached there can fault.
It applies to 2/2 too: anything that traps in irqentry_nmi_enter()
overwrites ELR, ESR and FAR before do_sdei_event() saves them.
I'll move both into __sdei_handler(), around irqentry_nmi_enter() and
irqentry_nmi_exit(), in v2. do_sdei_event() still needs the interrupted
VBAR for the IRQ-like resume, so it will get it as an argument.
--
Kiryl Shutsemau / Kirill A. Shutemov