1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-23 16:53:58 -05:00
linux/arch/mips
Daniel Borkmann f5e81d1117 bpf: Introduce BPF nospec instruction for mitigating Spectre v4
In case of JITs, each of the JIT backends compiles the BPF nospec instruction
/either/ to a machine instruction which emits a speculation barrier /or/ to
/no/ machine instruction in case the underlying architecture is not affected
by Speculative Store Bypass or has different mitigations in place already.

This covers both x86 and (implicitly) arm64: In case of x86, we use 'lfence'
instruction for mitigation. In case of arm64, we rely on the firmware mitigation
as controlled via the ssbd kernel parameter. Whenever the mitigation is enabled,
it works for all of the kernel code with no need to provide any additional
instructions here (hence only comment in arm64 JIT). Other archs can follow
as needed. The BPF nospec instruction is specifically targeting Spectre v4
since i) we don't use a serialization barrier for the Spectre v1 case, and
ii) mitigation instructions for v1 and v4 might be different on some archs.

The BPF nospec is required for a future commit, where the BPF verifier does
annotate intermediate BPF programs with speculation barriers.

Co-developed-by: Piotr Krysiuk <piotras@gmail.com>
Co-developed-by: Benedict Schlueter <benedict.schlueter@rub.de>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Piotr Krysiuk <piotras@gmail.com>
Signed-off-by: Benedict Schlueter <benedict.schlueter@rub.de>
Acked-by: Alexei Starovoitov <ast@kernel.org>
2021-07-29 00:20:56 +02:00
..
alchemy
ar7
ath25
ath79
bcm47xx
bcm63xx
bmips
boot - fix for accesing gic via vdso 2021-07-10 10:36:33 -07:00
cavium-octeon
cobalt
configs
crypto
dec
fw
generic
include Two fixes: 2021-07-11 11:17:57 -07:00
ingenic
jazz
kernel irqchip fixes for 5.14, take #1 2021-07-09 15:35:13 +02:00
kvm - added support for OpeneEmbed SOM9331 board 2021-07-01 17:03:11 -07:00
lantiq
lib
loongson2ef
loongson32
loongson64
math-emu
mm - added support for OpeneEmbed SOM9331 board 2021-07-01 17:03:11 -07:00
mti-malta
n64
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
netlogic
pci
pic32
pistachio
power
ralink This is the bulk of pin control changes for the v5.14 kernel: 2021-07-01 16:57:14 -07:00
rb532
sgi-ip22 kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
sgi-ip27
sgi-ip30
sgi-ip32 kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
sibyte
sni
tools
txx9
vdso
vr41xx
Kbuild
Kbuild.platforms
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
Kconfig.debug
Makefile
Makefile.postlink