WSL2-Linux-Kernel/arch/riscv
Luke Nelson 745abfaa9e bpf, riscv: Fix tail call count off by one in RV32 BPF JIT
This patch fixes an off by one error in the RV32 JIT handling for BPF
tail call. Currently, the code decrements TCC before checking if it
is less than zero. This limits the maximum number of tail calls to 32
instead of 33 as in other JITs. The fix is to instead check the old
value of TCC before decrementing.

Fixes: 5f316b65e9 ("riscv, bpf: Add RV32G eBPF JIT")
Signed-off-by: Luke Nelson <luke.r.nels@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Xi Wang <xi.wang@gmail.com>
Link: https://lore.kernel.org/bpf/20200421002804.5118-1-luke.r.nels@gmail.com
2020-04-26 08:40:01 -07:00
..
boot RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
configs RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
include arch: split MODULE_ARCH_VERMAGIC definitions out to <asm/vermagic.h> 2020-04-23 10:50:26 +09:00
kernel RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
lib RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
mm RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
net bpf, riscv: Fix tail call count off by one in RV32 BPF JIT 2020-04-26 08:40:01 -07:00
Kbuild riscv: add arch/riscv/Kbuild 2019-08-30 17:34:00 -07:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-04-16 14:52:29 -07:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.socs RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00
Makefile RISC-V Patches for the 5.7 Merge Window, Part 1 2020-04-09 10:51:30 -07:00