public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf v2 0/2] bpf: refine u32/s32 bounds when ranges cross min/max boundary
@ 2026-03-05 19:48 Eduard Zingerman
  2026-03-05 19:48 ` [PATCH bpf v2 1/2] " Eduard Zingerman
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Eduard Zingerman @ 2026-03-05 19:48 UTC (permalink / raw)
  To: bpf, ast, andrii
  Cc: daniel, martin.lau, kernel-team, yonghong.song, eddyz87, emil,
	arighi, shung-hsi.yu

Cover the following cases in range refinement logic for 32-bit ranges:
- s32 range crosses U32_MAX/0 boundary, positive part of the s32 range
  overlaps with u32 range.
- s32 range crosses U32_MAX/0 boundary, negative part of the s32 range
  overlaps with u32 range.

These cases are already handled for 64-bit range refinement.

Changelog:
- v1 -> v2:
  - Extended commit message and comments (Emil)
  - Targeting 'bpf' tree instead of bpf-next (Alexei)

v1: https://lore.kernel.org/bpf/9a23fbacdc6d33ec8fcb3f6988395b5129f75369.camel@gmail.com/T
---
Eduard Zingerman (2):
      bpf: refine u32/s32 bounds when ranges cross min/max boundary
      selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary

 kernel/bpf/verifier.c                              | 24 +++++++++
 .../testing/selftests/bpf/prog_tests/reg_bounds.c  | 62 ++++++++++++++++++++--
 .../testing/selftests/bpf/progs/verifier_bounds.c  | 37 +++++++++++++
 3 files changed, 119 insertions(+), 4 deletions(-)
---
base-commit: 56145d237385ca0e7ca9ff7b226aaf2eb8ef368b
change-id: 20260305-bpf-32-bit-range-overflow-00351dfb8083

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

end of thread, other threads:[~2026-03-19 10:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 19:48 [PATCH bpf v2 0/2] bpf: refine u32/s32 bounds when ranges cross min/max boundary Eduard Zingerman
2026-03-05 19:48 ` [PATCH bpf v2 1/2] " Eduard Zingerman
2026-03-05 20:28   ` bot+bpf-ci
2026-03-05 20:31     ` Eduard Zingerman
2026-03-05 20:51   ` Emil Tsalapatis
2026-03-06  0:13   ` Paul Chaignon
2026-03-06  0:18     ` Eduard Zingerman
2026-03-06  0:24       ` Paul Chaignon
2026-03-12  6:45         ` Shung-Hsi Yu
2026-03-17 15:37           ` Paul Chaignon
2026-03-19  7:03             ` Shung-Hsi Yu
2026-03-19 10:21               ` Paul Chaignon
2026-03-05 19:48 ` [PATCH bpf v2 2/2] selftests/bpf: test refining " Eduard Zingerman
2026-03-05 19:54   ` Eduard Zingerman
2026-03-05 20:54     ` Emil Tsalapatis
2026-03-05 20:55   ` Emil Tsalapatis
2026-03-06  0:21   ` Paul Chaignon
2026-03-05 22:59 ` [PATCH bpf v2 0/2] bpf: refine " Eduard Zingerman
2026-03-06  5:17 ` Shung-Hsi Yu

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