Re: [PATCH v2 RESEND 1/2] ARM: spectre-v2: Fix potential missing mitigations
From: Sebastian Andrzej Siewior
Date: Tue Oct 28 2025 - 12:20:08 EST
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@xxxxxxxxxxxxx/
>
> 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