linux/arch/arm
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
..
boot Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
common
configs ARM: Defconfig changes for 5.14 2021-07-10 10:29:35 -07:00
crypto crypto: arm - use a pattern rule for generating *.S files 2021-05-14 19:07:54 +08:00
include mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t * 2021-07-08 11:48:22 -07:00
kernel arm: convert to setup_initial_init_mm() 2021-07-08 11:48:21 -07:00
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: Move prototypes to mutually included header 2021-03-26 18:20:49 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: davinci: Constify the software nodes 2021-04-08 23:45:55 +02:00
mach-digicolor
mach-dove
mach-ep93xx
mach-exynos ARM: exynos: add missing of_node_put for loop iteration 2021-05-11 08:33:01 -04:00
mach-footbridge ARM updates for 5.13-rc1: 2021-05-06 09:28:07 -07:00
mach-gemini
mach-highbank
mach-hisi ARM: hisi: use the correct HiSilicon copyright 2021-04-02 15:36:27 +08:00
mach-imx Merge branch 'arm/fixes' into arm/soc 2021-07-09 10:46:02 -07:00
mach-integrator
mach-iop32x ARM: iop32x: disable N2100 PCI parity reporting 2021-03-31 12:29:40 -05:00
mach-ixp4xx ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
mach-keystone ARM: keystone: fix integer overflow warning 2021-04-01 16:32:37 +02:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mstar ARM: mstar: Select MSTAR_MSC313_MPLL 2021-04-01 12:40:55 +02:00
mach-mv78xx0
mach-mvebu of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
mach-mxs
mach-nomadik
mach-npcm ARM: npcm: wpcm450: select interrupt controller driver 2021-05-18 15:27:27 +02:00
mach-nspire
mach-omap1 Non-urgent fixes for omaps for v5.14 merge window 2021-06-23 18:45:23 -07:00
mach-omap2 Non-urgent fixes for omaps for v5.14 merge window 2021-06-23 18:45:23 -07:00
mach-orion5x
mach-oxnas
mach-pxa ARM: PXA: Fix cplds irqdesc allocation when using legacy mode 2021-05-10 14:12:25 +01:00
mach-qcom
mach-rda
mach-realtek
mach-realview
mach-rockchip
mach-rpc
mach-s3c ARM: s3c: Remove unnecessary break in RX1950 2021-05-11 08:29:40 -04:00
mach-s5pv210
mach-sa1100
mach-shmobile
mach-socfpga ARM: socfpga: drop ARCH_SOCFPGA 2021-03-23 11:03:36 -05:00
mach-spear ARM/spi: spear: Drop PL022 num_chipselect 2021-04-08 15:21:58 +01:00
mach-sti
mach-stm32 ARM: stm32: Add a new SoC - STM32H750 2021-04-01 09:54:45 +02:00
mach-sunxi
mach-tegra
mach-uniphier
mach-ux500 ARM: ux500: make ux500_cpu_die static 2021-04-01 22:30:49 +02:00
mach-versatile
mach-vexpress
mach-vt8500
mach-zynq arm: zynq: don't disable CONFIG_ARM_GLOBAL_TIMER due to CONFIG_CPU_FREQ anymore 2021-06-16 17:33:04 +02:00
mm arm: ioremap: don't abuse pfn_valid() to check if pfn is in RAM 2021-07-10 09:17:13 -07:00
net bpf: Introduce BPF nospec instruction for mitigating Spectre v4 2021-07-29 00:20:56 +02:00
nwfpe
plat-omap ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock 2021-03-31 08:58:42 +03:00
plat-orion
plat-pxa
plat-versatile
probes ARM development updates for 5.14-rc1: 2021-07-06 11:52:58 -07:00
tools ARM development updates for 5.14-rc1: 2021-07-06 11:52:58 -07:00
vdso
vfp
xen ARM development updates for 5.14-rc1: 2021-07-06 11:52:58 -07:00
Kbuild
Kconfig ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug ARM: SoC changes for 5.14 2021-07-10 09:22:44 -07:00
Makefile kbuild: require all architectures to have arch/$(SRCARCH)/Kbuild 2021-05-26 23:10:37 +09:00