public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] bpf: Omit inlined bounds checks for null elided map lookups
@ 2025-01-21  4:35 Daniel Xu
  2025-01-21  4:35 ` [PATCH bpf-next 1/3] bpf: verifier: Store null elision decision in insn_aux_data Daniel Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Xu @ 2025-01-21  4:35 UTC (permalink / raw)
  To: netdev, linux-kernel, bpf

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(-)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-01-23  0:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21  4:35 [PATCH bpf-next 0/3] bpf: Omit inlined bounds checks for null elided map lookups Daniel Xu
2025-01-21  4:35 ` [PATCH bpf-next 1/3] bpf: verifier: Store null elision decision in insn_aux_data Daniel Xu
2025-01-23  0:23   ` Alexei Starovoitov
2025-01-21  4:35 ` [PATCH bpf-next 2/3] bpf: map: Thread null elision metadata to map_gen_lookup Daniel Xu
2025-01-23  0:29   ` Alexei Starovoitov
2025-01-21  4:35 ` [PATCH bpf-next 3/3] bpf: arraymap: Skip boundscheck during inlining when possible Daniel Xu
2025-01-23  0:15   ` Eduard Zingerman
2025-01-23  0:33   ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox