Skip to content

bpf: Fix bounds when ranges cross sign boundary

Paul Chaignon stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6bpf: Improve bounds when s64 crosses sign boundarykernel/bpf/verifier.c+52 -00 replies
2/6selftests/bpf: Test cross-sign 64bits range refinementtools/testing/selftests/bpf/progs/verifier_bounds.c+118 -00 replies
3/6selftests/bpf: Test invariants on JSLT crossing signtools/testing/selftests/bpf/progs/verifier_bounds.c+1 -10 replies
4/6bpf: Add third round of bounds deductionkernel/bpf/verifier.c tools/testing/selftests/bpf/progs/verifier_bounds.c+2 -10 replies
5/6bpf: Fix u32/s32 bounds when ranges cross min/max boundarykernel/bpf/verifier.c tools/testing/selftests/bpf/prog_tests/reg_bounds.c+82 -40 replies
6/6selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundarytools/testing/selftests/bpf/progs/verifier_bounds.c+38 -10 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchEduard ZingermanShung-Hsi YuEmil TsalapatisPaul Chaignon
1/6A-b A-b
2/6A-b
3/6A-b
4/6A-b
5/6A-b R-b
6/6A-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH stable 6.12 0/6] bpf: Fix bounds when ranges cross sign boundary

As discussed in [1], this series backports two sets of fixes for BPF, with their selftests:
- 00bf8d0c6c9b ("bpf: Improve bounds when s64 crosses sign boundary")
- 26e5e346a52c ("selftests/bpf: Test cross-sign 64bits range refinement")
- f96841bbf4a1 ("selftests/bpf: Test invariants on JSLT crossing sign")
- 5dbb19b16ac4 ("bpf: Add third round of bounds deduction")
- fbc7aef517d8 ("bpf: Fix u32/s32 bounds when ranges cross min/max boundary")
- f81fdfd16771 ("selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary")

Using Shung-Hsi's stable CI repo [2], I verified the BPF selftests pass with these commits applied on top of v6.12.

1: https://lore.kernel.org/stable/2026040240-friday-gurgling-7088@gregkh/
2: https://github.com/pchaigno/stable-bpf-ci/actions/runs/23940850516/job/69826632354

Eduard Zingerman (2):
bpf: Fix u32/s32 bounds when ranges cross min/max boundary selftests/bpf: test refining u32/s32 bounds when ranges cross min/max
boundary

Paul Chaignon (4):
bpf: Improve bounds when s64 crosses sign boundary selftests/bpf: Test cross-sign 64bits range refinement selftests/bpf: Test invariants on JSLT crossing sign
bpf: Add third round of bounds deduction

 kernel/bpf/verifier.c                         |  77 +++++++++
 .../selftests/bpf/prog_tests/reg_bounds.c     |  62 ++++++-
 .../selftests/bpf/progs/verifier_bounds.c     | 159 +++++++++++++++++-
 3 files changed, 292 insertions(+), 6 deletions(-)
Signature · 1 line
2.43.0