mbox series

[bpf-next,0/3] bpf: Omit inlined bounds checks for null elided map lookups

Message ID cover.1737433945.git.dxu@dxuuu.xyz (mailing list archive)
Headers show
Series bpf: Omit inlined bounds checks for null elided map lookups | expand

Message

Daniel Xu Jan. 21, 2025, 4:35 a.m. UTC
This follows up the null elision patchset with a corresponding codegen
change. When the lookup is known to be inbounds, the inlined lookup can
skip the bounds check.

See final commit for the JIT diff.

Daniel Xu (3):
  bpf: verifier: Store null elision decision in insn_aux_data
  bpf: map: Thread null elision metadata to map_gen_lookup
  bpf: arraymap: Skip boundscheck during inlining when possible

 include/linux/bpf.h          |  2 +-
 include/linux/bpf_verifier.h |  4 ++++
 kernel/bpf/arraymap.c        | 35 ++++++++++++++++++++++-------------
 kernel/bpf/hashtab.c         | 14 ++++++++++----
 kernel/bpf/verifier.c        |  6 ++++--
 net/xdp/xskmap.c             |  4 +++-
 6 files changed, 44 insertions(+), 21 deletions(-)