linux_dsm_epyc7002/arch/arm
Luke Nelson bb9562cf5c arm, bpf: Fix bugs with ALU64 {RSH, ARSH} BPF_K shift by 0
The current arm BPF JIT does not correctly compile RSH or ARSH when the
immediate shift amount is 0. This causes the "rsh64 by 0 imm" and "arsh64
by 0 imm" BPF selftests to hang the kernel by reaching an instruction
the verifier determines to be unreachable.

The root cause is in how immediate right shifts are encoded on arm.
For LSR and ASR (logical and arithmetic right shift), a bit-pattern
of 00000 in the immediate encodes a shift amount of 32. When the BPF
immediate is 0, the generated code shifts by 32 instead of the expected
behavior (a no-op).

This patch fixes the bugs by adding an additional check if the BPF
immediate is 0. After the change, the above mentioned BPF selftests pass.

Fixes: 39c13c204b ("arm: eBPF JIT compiler")
Co-developed-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200408181229.10909-1-luke.r.nels@gmail.com
2020-04-09 01:05:53 +02:00
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
common ARM: sa1111: Fix irq_retrigger callback return value 2020-03-16 15:48:54 +00:00
configs ARM: socfpga_defconfig: add back DEBUGFS 2020-03-04 08:51:55 -08:00
crypto crypto: arm/chacha - fix build failured when kernel mode NEON is disabled 2020-01-22 16:21:11 +08:00
include timekeeping and timer updates: 2020-03-30 18:51:47 -07:00
kernel CPU (hotplug) updates: 2020-03-30 18:06:39 -07:00
kvm KVM: Drop kvm_arch_vcpu_setup() 2020-01-27 19:59:28 +01:00
lib ARM: 8958/1: rename missed uaccess .fixup section 2020-02-21 17:03:21 +00:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed ARM: SoC fixes 2019-09-30 10:04:28 -07:00
mach-at91 ARM: at91: pm: use of_device_id array to find the proper shdwc node 2020-01-10 23:40:31 +01:00
mach-axxia
mach-bcm ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: SoC: late updates 2020-02-08 14:17:27 -08:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx Merge branch 'spi-5.4' into spi-next 2019-09-15 10:32:06 +01:00
mach-exynos ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-footbridge ARM: 8911/1: move pcibios_report_status to <asm/pci.h> 2019-10-27 21:14:40 +00:00
mach-gemini
mach-highbank
mach-hisi ARM: hisi: drop useless depend on ARCH_MULTI_V7 2019-10-26 15:31:22 +08:00
mach-imx ARM: imx: build v7_cpu_resume() unconditionally 2020-02-13 21:21:44 +08:00
mach-integrator
mach-iop32x
mach-ixp4xx ARM/net: ixp4xx: Pass ethernet physical base as resource 2020-01-12 12:59:53 -08:00
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson ARM: meson: Drop unneeded select of COMMON_CLK 2020-02-29 08:16:20 -08:00
mach-milbeaut
mach-mmp ARM: mmp: do not divide the clock rate 2020-01-06 09:18:50 -08:00
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm ARM: npcm: Bring back GPIOLIB support 2020-02-09 03:44:51 -08:00
mach-nspire
mach-omap1 ARM: OMAP1: drop duplicated dependency on ARCH_OMAP1 2019-11-11 12:30:39 -08:00
mach-omap2 ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set 2020-02-26 10:49:25 -08:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa USB/Thunderbolt/PHY driver updates for 5.6-rc1 2020-01-29 10:09:44 -08:00
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: Switch to atomic pwm API in rx1950 2020-01-21 20:56:47 +01:00
mach-s3c64xx ARM: SoC platform updates 2020-02-08 13:55:25 -08:00
mach-s5pv210
mach-sa1100
mach-shmobile remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
mach-socfpga arm: socfpga: execute cold reboot by default 2019-11-22 12:12:10 -06:00
mach-spear
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Fix CPU powerdown on A83T 2019-10-29 09:09:56 +01:00
mach-tango
mach-tegra ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume 2020-01-08 12:58:46 +01:00
mach-u300 pinctrl: Allow modules to use pinctrl_[un]register_mappings 2019-12-30 14:27:17 +01:00
mach-uniphier
mach-ux500 mfd: db8500-prcmu: Support U8420-sysclk firmware 2019-11-11 08:45:04 +00:00
mach-versatile
mach-vexpress ARM: vexpress: Set-up shared OPP table instead of individual for each CPU 2019-12-09 11:52:50 +00:00
mach-vt8500
mach-zx
mach-zynq ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start 2020-01-08 15:21:09 +01:00
mm lib/vdso: Cleanup clock mode storage leftovers 2020-02-17 20:12:17 +01:00
net arm, bpf: Fix bugs with ALU64 {RSH, ARSH} BPF_K shift by 0 2020-04-09 01:05:53 +02:00
nwfpe
oprofile
plat-omap dmaengine: ti: omap-dma: Configure global priority register directly 2019-12-30 09:45:25 -08:00
plat-orion
plat-pxa spi: pxa2xx: No need to keep pointer to platform device 2019-10-18 18:24:50 +01:00
plat-samsung ARM: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:44:22 +01:00
plat-versatile
probes
tools threads-v5.6 2020-01-29 19:38:34 -08:00
vdso kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
vfp
xen dma-mapping updates for 5.5-rc1 2019-11-28 11:16:43 -08:00
Kconfig ARM/arm64: vdso: Use common vdso clock mode storage 2020-02-17 20:12:16 +01:00
Kconfig-nommu
Kconfig.debug ARM: debug-ll: select DEBUG_AT91_RM9200_DBGU for sam9x60 2019-12-10 00:45:30 +01:00
Makefile ARM: 8961/2: Fix Kbuild issue caused by per-task stack protector GCC plugin 2020-02-21 17:03:22 +00:00