Skip to content

Limit tail calls to 33 in all JIT compilers

Paul Chaignon bpf linux-riscv netdev 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2bpf, riscv: limit to 33 tail callsarch/riscv/net/bpf_jit_comp.c+2 -23 replies
2/2bpf, mips: limit to 33 tail callsarch/mips/net/ebpf_jit.c+5 -45 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBjörn TöpelMartin KaFai LauPaul Burton
SeriesA-b
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH bpf 0/2] Limit tail calls to 33 in all JIT compilers

The BPF interpreter and all JIT compilers, except RISC-V's and MIPS', enforce a 33-tail calls limit at runtime. Because of this discrepancy, a BPF program can have a different behavior and output depending on whether it is interpreted or JIT compiled, or depending on the underlying architecture.

This patchset changes the RISC-V and MIPS JIT compilers to limit tail calls to 33 instead of 32. I have checked other BPF JIT compilers for the same discrepancy.

Paul Chaignon (2):
bpf, riscv: limit to 33 tail calls
bpf, mips: limit to 33 tail calls

 arch/mips/net/ebpf_jit.c      | 9 +++++----
 arch/riscv/net/bpf_jit_comp.c | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.1