linux/arch
Colin Ian King 9109165625 s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1]
Currently array jit->seen_reg[r1] is being accessed before the range
checking of index r1. The range changing on r1 should be performed
first since it will avoid any potential out-of-range accesses on the
array seen_reg[] and also it is more optimal to perform checks on r1
before fetching data from the array. Fix this by swapping the order
of the checks before the array access.

Fixes: 0546231057 ("s390/bpf: Add s390x eBPF JIT compiler backend")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/bpf/20210715125712.24690-1-colin.king@canonical.com
2021-07-15 19:47:25 +02:00
..
alpha Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
arc Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
arm ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq property 2021-07-01 13:27:10 -07:00
arm64 Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
csky Scheduler udpates for this cycle: 2021-06-28 12:14:19 -07:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
hexagon Scheduler udpates for this cycle: 2021-06-28 12:14:19 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
m68k for-5.14/block-2021-06-29 2021-06-30 12:12:56 -07:00
microblaze Microblaze patches for 5.14-rc1 2021-06-30 15:36:48 -07:00
mips Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
nds32 Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
nios2 Updates for the interrupt subsystem: 2021-06-29 12:25:04 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
parisc Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
powerpc Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
riscv Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
s390 s390/bpf: Perform r1 range checking before accessing jit->seen_reg[r1] 2021-07-15 19:47:25 +02:00
sh Merge branch 'akpm' (patches from Andrew) 2021-06-29 17:29:11 -07:00
sparc Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
um X86 entry code related updates: 2021-06-29 12:44:51 -07:00
x86 bpf: Track subprog poke descriptors correctly and fix use-after-free 2021-07-09 12:08:27 +02:00
xtensa for-5.14/block-2021-06-29 2021-06-30 12:12:56 -07:00
.gitignore
Kconfig Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR 2021-06-22 11:07:18 -07:00