Skip to content

bpf: Skip bounds adjustment for conditional jumps on same scalar register

KaFai Wan bpf linux-kselftest lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 3 repliesIn review 1 of 2 applied
  2. v32 patches 2 repliesSuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches12 repliesSuperseded

Changes in v4 from the cover letter

- make code better. (Alexei)

Patches in v4 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Skip bounds adjustment for conditional jumps on same scalar registerkernel/bpf/verifier.c+31 -01 replyApplied
2/2selftests/bpf: Add test for conditional jumps on same scalar registertools/testing/selftests/bpf/progs/verifier_bounds.c+154 -02 replies

Reviews trailers per patch

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

PatchEduard Zingerman
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH bpf-next v4 0/2] bpf: Skip bounds adjustment for conditional jumps on same scalar register

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

v4:
- make code better. (Alexei)

v3:
https://lore.kernel.org/bpf/[email protected]/
- 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/[email protected]/
- 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/[email protected]/
---
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                         |  31 ++++
 .../selftests/bpf/progs/verifier_bounds.c     | 154 ++++++++++++++++++
 2 files changed, 185 insertions(+)
Signature · 1 line
2.43.0