[PATCH v2 RESEND 1/2] ARM: spectre-v2: Fix potential missing mitigations

Sebastian Andrzej Siewior bigeasy at linutronix.de
Tue Oct 28 09:20:05 PDT 2025


On 2025-10-16 20:16:21 [+0800], Xie Yuanbin wrote:
> Over the past six years, there have been continuous reports of this bug:
…
> 2019.3.19 https://lore.kernel.org/all/20190319203239.gl46fxnfz6gzeeic@linutronix.de/
> 
> To fix it, we must check whether mitigation are needed before enabling
> interrupt(with PREEMPT) or before calling mm_read_lock()(without PREEMPT).
> 
> Fixes: f5fe12b1eaee ("ARM: spectre-v2: harden user aborts in kernel space")

Hmm.
I was moving things back in 2019 but things shifted and this is no
longer required. If I apply both patches (of yours) then it sends a
signal with disabled interrupts which breaks my PREEMPT_RT case.

The requirement is to invoke the mitigation callback of the right CPU.
What about disabling preemption before getting the callback and doing
the invocation?

Sebastian



More information about the linux-arm-kernel mailing list