linux-stable/arch/s390
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
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390/boot: replace magic string check with a bootdata flag 2021-07-05 12:44:23 +02:00
configs s390/configs: change CONFIG_VIRTIO_CONSOLE to "m" 2021-04-30 17:17:01 +02:00
crypto s390/archrandom: add parameter check for s390_arch_random_generate 2021-04-21 12:32:12 +02:00
hypfs s390/hypfs: use register pair instead of register asm 2021-06-28 11:18:28 +02:00
include s390: preempt: Fix preempt_count initialization 2021-07-08 22:12:18 +02:00
kernel s390 updates for the 5.14 merge window #2 2021-07-10 10:46:14 -07:00
kvm s390 updates for the 5.14 merge window 2021-07-04 12:17:38 -07:00
lib s390/lib: use call_on_stack() macro 2021-07-08 22:12:18 +02:00
mm s390/mm: use call_on_stack() macro 2021-07-08 22:12:18 +02:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
pci s390/pci: add zpci_set_irq()/zpci_clear_irq() 2021-06-28 11:18:28 +02:00
purgatory s390: disable SSP when needed 2021-06-07 17:07:00 +02:00
tools KVM: s390: gen_facilities: allow facilities 165, 193, 194 and 196 2021-06-23 09:35:03 +02:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig s390/vdso: add minimal compat vdso 2021-07-08 15:37:28 +02:00
Kconfig.debug s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
Makefile Kbuild updates for v5.14 2021-07-10 11:01:38 -07:00