public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Xu <dxu@dxuuu.xyz>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: [PATCH bpf-next 0/3] bpf: Omit inlined bounds checks for null elided map lookups
Date: Mon, 20 Jan 2025 21:35:09 -0700	[thread overview]
Message-ID: <cover.1737433945.git.dxu@dxuuu.xyz> (raw)

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


             reply	other threads:[~2025-01-21  4:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21  4:35 Daniel Xu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1737433945.git.dxu@dxuuu.xyz \
    --to=dxu@dxuuu.xyz \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox