Re: [PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-15 Thread Eduard Zingerman
On Thu, 2025-03-13 at 18:21 +0100, Luis Gerhorst wrote: > This improves the expressiveness of unprivileged BPF by inserting > speculation barriers instead of rejecting the programs. > > The approach was previously presented at LPC'24 [1] and RAID'24 [2]. > > To mitigate the Spectre v1 (PHT) vulne

Re: [PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-15 Thread Luis Gerhorst
Eduard Zingerman writes: > I think it would be good to have some tests checking that nospec > instructions are inserted in expected locations. > Could you please take look at use of __xlated tag in e.g. > tools/testing/selftests/bpf/progs/verifier_sdiv.c ? That looks very promising, I will look i

[PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-13 Thread Luis Gerhorst
This improves the expressiveness of unprivileged BPF by inserting speculation barriers instead of rejecting the programs. The approach was previously presented at LPC'24 [1] and RAID'24 [2]. To mitigate the Spectre v1 (PHT) vulnerability, the kernel rejects potentially-dangerous unprivileged BPF