summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/helpers.c
diff options
context:
space:
mode:
authorLuke Nelson <lukenels@cs.washington.edu>2020-04-21 02:28:04 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-04-26 17:40:01 +0200
commit745abfaa9eafa597d31fdf24a3249e5206a98768 (patch)
tree7317971ec5e492834da0e4e0b0abd564995f32f8 /kernel/bpf/helpers.c
parentbpf_helpers.h: Add note for building with vmlinux.h or linux/types.h (diff)
downloadlinux-745abfaa9eafa597d31fdf24a3249e5206a98768.tar.xz
linux-745abfaa9eafa597d31fdf24a3249e5206a98768.zip
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: 5f316b65e99f ("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
Diffstat (limited to 'kernel/bpf/helpers.c')
0 files changed, 0 insertions, 0 deletions