public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/3] Optimize bounds refinement by reordering deductions
@ 2026-03-13 11:36 Paul Chaignon
  2026-03-13 11:40 ` [PATCH bpf-next v3 1/3] bpf: better naming for __reg_deduce_bounds() parts Paul Chaignon
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Paul Chaignon @ 2026-03-13 11:36 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Eduard Zingerman, Shung-Hsi Yu

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


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

end of thread, other threads:[~2026-03-14 15:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-13 11:36 [PATCH bpf-next v3 0/3] Optimize bounds refinement by reordering deductions Paul Chaignon
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

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