public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3 0/2] bpf: Skip bounds adjustment for conditional jumps on same scalar register
@ 2025-10-31 15:41 KaFai Wan
  2025-10-31 15:41 ` [PATCH bpf-next v3 1/2] " KaFai Wan
  2025-10-31 15:41 ` [PATCH bpf-next v3 2/2] selftests/bpf: Add test " KaFai Wan
  0 siblings, 2 replies; 5+ messages in thread
From: KaFai Wan @ 2025-10-31 15:41 UTC (permalink / raw)
  To: ast, daniel, john.fastabend, andrii, martin.lau, eddyz87, song,
	yonghong.song, kpsingh, sdf, haoluo, jolsa, shuah, paul.chaignon,
	m.shachnai, henriette.herzog, kafai.wan, luis.gerhorst,
	harishankar.vishwanathan, colin.i.king, bpf, linux-kernel,
	linux-kselftest

This small patchset is about avoid verifier bug warning when conditional
 jumps on same register when the register holds a scalar with range.

v3:
  - Enhance is_scalar_branch_taken() to handle scalar case. (Eduard)
  - Update the selftest to cover all conditional jump opcodes. (Eduard)

v2:
  https://lore.kernel.org/bpf/20251025053017.2308823-1-kafai.wan@linux.dev/
 - Enhance is_branch_taken() and is_scalar_branch_taken() to handle
   branch direction computation for same register. (Eduard and Alexei)
 - Update the selftest.
 

v1:
  https://lore.kernel.org/bpf/20251022164457.1203756-1-kafai.wan@linux.dev/
---
KaFai Wan (2):
  bpf: Skip bounds adjustment for conditional jumps on same scalar
    register
  selftests/bpf: Add test for conditional jumps on same scalar register

 kernel/bpf/verifier.c                         |  33 ++++
 .../selftests/bpf/progs/verifier_bounds.c     | 154 ++++++++++++++++++
 2 files changed, 187 insertions(+)

-- 
2.43.0


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

end of thread, other threads:[~2025-11-03  6:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 15:41 [PATCH bpf-next v3 0/2] bpf: Skip bounds adjustment for conditional jumps on same scalar register KaFai Wan
2025-10-31 15:41 ` [PATCH bpf-next v3 1/2] " KaFai Wan
2025-10-31 16:37   ` Alexei Starovoitov
2025-11-03  6:23     ` KaFai Wan
2025-10-31 15:41 ` [PATCH bpf-next v3 2/2] selftests/bpf: Add test " KaFai Wan

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