[PATCH v7 00/10] bpf: bug fixes
Stephen Hemminger
stephen at networkplumber.org
Wed Jul 22 18:05:12 CEST 2026
BPF related fixes mostly related to JIT.
The arm64 BPF JIT did not implement BPF_LD | BPF_ABS or BPF_LD | BPF_IND,
so cBPF filters converted by rte_bpf_convert() could not be JIT compiled
and silently fell back to the interpreter on arm64.
The first patch fixes a latent bug in emit_return_zero_if_src_zero():
the offset of the branch to the epilogue was held in an unsigned.
A backward branch wrapped around. Existing JIT tests were never
being run on ARM.
The next two patches make the bpf tests assert that,
on an architecture with a JITbackend, code is actually generated,
so a missing or failed JIT is reported rather than skipped.
The final patch adds the ABS/IND opcodes, mirroring the x86 JIT
with a fast path for data in the first
mbuf segment and a __rte_pktmbuf_read() slow path for the rest.
Christophe Fontaine (1):
bpf/arm64: fix offset type to allow a negative jump
Stephen Hemminger (9):
bpf/x86: fix JIT encoding of fixed-width immediates
test/bpf: add JSET test with small immediate
bpf: mask shift count in interpreter per RFC 9669
bpf/arm64: mask shift count per RFC 9669
test/bpf: add test for large shift
bpf/arm64: add BPF_ABS/BPF_IND packet load support
test/bpf: check that JIT was generated
test/bpf: check that bpf_convert can be JIT'd
bpf: fix uninitialized warning
app/test/test_bpf.c | 320 +++++++++++++++++++++++++++++++---------
lib/bpf/bpf_exec.c | 31 ++--
lib/bpf/bpf_jit_arm64.c | 185 ++++++++++++++++++++++-
lib/bpf/bpf_jit_x86.c | 6 +-
lib/bpf/bpf_validate.c | 2 +-
lib/bpf/meson.build | 2 +
6 files changed, 457 insertions(+), 89 deletions(-)
--
2.53.0
More information about the dev
mailing list