diff options
| author | Eduard Zingerman <eddyz87@gmail.com> | 2026-03-06 16:54:25 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-03-06 18:16:17 -0800 |
| commit | f81fdfd16771e266753146bd83f6dd23515ebee9 (patch) | |
| tree | d7c260ea56a4eea76280a8048d0ab93f5fe93c85 /include/linux | |
| parent | fbc7aef517d8765e4c425d2792409bb9bf2e1f13 (diff) | |
selftests/bpf: test refining u32/s32 bounds when ranges cross min/max boundary
Two test cases for signed/unsigned 32-bit bounds refinement
when s32 range crosses the sign boundary:
- s32 range [S32_MIN..1] overlapping with u32 range [3..U32_MAX],
s32 range tail before sign boundary overlaps with u32 range.
- s32 range [-3..5] overlapping with u32 range [0..S32_MIN+3],
s32 range head after the sign boundary overlaps with u32 range.
This covers both branches added in the __reg32_deduce_bounds().
Also, crossing_32_bit_signed_boundary_2() no longer triggers invariant
violations.
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Reviewed-by: Paul Chaignon <paul.chaignon@gmail.com>
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260306-bpf-32-bit-range-overflow-v3-2-f7f67e060a6b@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
