Re: [PATCH v1] arm64: Mitigate Spectre v1 in the BPF interpreter

From: Alexei Starovoitov

Date: Fri Nov 20 2026 - 12:39:03 EST


On Fri Nov 20, 2026 at 10:02 AM UTC, Catalin Marinas wrote:
> On Thu, Nov 19, 2026 at 01:18:03AM +0000, Alexei Starovoitov wrote:
>> On Tue, Nov 17, 2026 at 09:23 AM Ryan Roberts <ryan.roberts@xxxxxxx> wrote:
>> > The arm64 JIT implements BPF_NOSPEC with a speculation barrier, but the
>> > interpreter calls barrier_nospec(), which falls back to a no-op on
>> > arm64. Programs executed by the interpreter therefore lack the
>> > Spectre-v1 barriers assumed by the verifier. Contrary to the code
>> > comment, kernel-wide SSBD does not provide this protection, since it
>> > mitigates Spectre v4 rather than Spectre v1.
>>
>> Nack.
>> In bpf-next arm64 has no interpreter when the JIT is built.
>
> And what about current mainline/stable or when one disables BPF_JIT
> explicitly? Should we force BPF_JIT=y as well when ALWAYS_ON=y?

Anyone who didn't have BPF_JIT_ALWAYS_ON=y were exposed to speculation
attacks forever. The security hole was wide open. We've been saying it
forever. At the next merge window we will say
"you cannot make wrong choice anymore".