From: Paul Chaignon <paul.chaignon@gmail.com>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Shung-Hsi Yu <shung-hsi.yu@suse.com>
Subject: [PATCH bpf-next v3 0/3] Optimize bounds refinement by reordering deductions
Date: Fri, 13 Mar 2026 12:36:11 +0100 [thread overview]
Message-ID: <cover.1773401138.git.paul.chaignon@gmail.com> (raw)
This patchset optimizes the bounds refinement (reg_bounds_sync) by
reordering deductions in __reg_deduce_bounds. This reordering allows us
to improve precision slightly while losing one call to
__reg_deduce_bounds.
The first patch from Eduard refactors the __reg_deduce_bounds
subfunctions, the second patch implements the reordering, and the last
one adds a selftest.
Changes in v3:
- Added first commit from Eduard that significantly helps with
readability of second commit.
- Reshuffled a bit more the functions in the second commit to improve
precision (Eduard).
- Rebased.
Changes in v2:
- Updated description to mention potential precision improvement and
to clarify the sequence of refinements (Shung-Hsi).
- Added the second patch.
- Rebased.
Eduard Zingerman (1):
bpf: better naming for __reg_deduce_bounds() parts
Paul Chaignon (2):
bpf: Avoid one round of bounds deduction
selftests/bpf: Test case for refinement improvement using 64b bounds
kernel/bpf/verifier.c | 18 ++++++----
.../selftests/bpf/progs/verifier_bounds.c | 33 +++++++++++++++++++
2 files changed, 44 insertions(+), 7 deletions(-)
--
2.43.0
next reply other threads:[~2026-03-13 11:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 11:36 Paul Chaignon [this message]
2026-03-13 11:40 ` [PATCH bpf-next v3 1/3] bpf: better naming for __reg_deduce_bounds() parts Paul Chaignon
2026-03-13 12:21 ` bot+bpf-ci
2026-03-13 11:40 ` [PATCH bpf-next v3 2/3] bpf: Avoid one round of bounds deduction Paul Chaignon
2026-03-13 11:43 ` [PATCH bpf-next v3 3/3] selftests/bpf: Test case for refinement improvement using 64b bounds Paul Chaignon
2026-03-13 21:58 ` Eduard Zingerman
2026-03-13 22:02 ` [PATCH bpf-next v3 0/3] Optimize bounds refinement by reordering deductions Eduard Zingerman
2026-03-14 2:18 ` Alexei Starovoitov
2026-03-14 8:22 ` Eduard Zingerman
2026-03-14 15:08 ` Alexei Starovoitov
2026-03-14 2:20 ` patchwork-bot+netdevbpf
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.1773401138.git.paul.chaignon@gmail.com \
--to=paul.chaignon@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=shung-hsi.yu@suse.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.