BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] bpf: Add value tracking for BPF_DIV
@ 2025-12-23  9:10 Yazhou Tang
  2025-12-23  9:10 ` [PATCH bpf-next v2 1/2] bpf: Add interval and tnum analysis for signed and unsigned BPF_DIV Yazhou Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Yazhou Tang @ 2025-12-23  9:10 UTC (permalink / raw)
  To: bpf
  Cc: ast, daniel, john.fastabend, andrii, martin.lau, eddyz87, song,
	yonghong.song, kpsingh, sdf, haoluo, jolsa, tangyazhou518,
	shenghaoyuan0928, ziye

From: Yazhou Tang <tangyazhou518@outlook.com>

Add value tracking (range and bitwise tracking) for BPF_DIV. Please
see commit log of 1/2 for more details.

---

Changes v1 => v2:
1. Fixed 2 bugs in sdiv32 analysis logic and corrected the associated
   selftest cases (AI reviewer).
2. Renamed `tnum_bottom` to `tnum_empty` for better clarity, and updated
   commit message to explain its role in signed BPF_DIV analysis.

v1:
https://lore.kernel.org/bpf/tencent_717092CD734D050CCD93401CA624BB3C8307@qq.com/
https://lore.kernel.org/bpf/tencent_7C98FAECA40C98489ACF4515CE346F031509@qq.com/

Yazhou Tang (2):
  bpf: Add interval and tnum analysis for signed and unsigned BPF_DIV
  selftests/bpf: Add tests for BPF_DIV analysis

 include/linux/tnum.h                          |   4 +
 kernel/bpf/tnum.c                             | 159 ++++++-
 kernel/bpf/verifier.c                         | 225 ++++++++++
 .../selftests/bpf/prog_tests/verifier.c       |   2 +
 .../selftests/bpf/progs/verifier_div_bounds.c | 404 ++++++++++++++++++
 .../bpf/progs/verifier_value_illegal_alu.c    |   7 +-
 6 files changed, 797 insertions(+), 4 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_div_bounds.c

-- 
2.52.0


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

end of thread, other threads:[~2026-01-03  8:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-23  9:10 [PATCH bpf-next v2 0/2] bpf: Add value tracking for BPF_DIV Yazhou Tang
2025-12-23  9:10 ` [PATCH bpf-next v2 1/2] bpf: Add interval and tnum analysis for signed and unsigned BPF_DIV Yazhou Tang
2025-12-23 20:58   ` Yonghong Song
2025-12-25  9:17     ` Yazhou Tang
2026-01-03  0:21       ` Alexei Starovoitov
2026-01-03  8:40         ` Yazhou Tang
2025-12-24  0:32   ` kernel test robot
2025-12-24 12:41   ` kernel test robot
2025-12-24 15:30   ` kernel test robot
2025-12-23  9:10 ` [PATCH bpf-next v2 2/2] selftests/bpf: Add tests for BPF_DIV analysis Yazhou Tang
2025-12-23 13:50 ` [syzbot ci] Re: bpf: Add value tracking for BPF_DIV syzbot ci

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