Skip to content

bpf: verifier: linked register tests and fixes

Shung-Hsi Yu bpf 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selftests: bpf: Add test for multiple syncs from linked registertools/testing/selftests/bpf/progs/verifier_linked_scalars.c+33 -00 replies
2/6selftests/bpf: Add tests for improved linked register trackingtools/testing/selftests/bpf/progs/verifier_linked_scalars.c+301 -20 replies
3/6selftests/bpf: Add a test cases for sync_linked_regs regarding zext propagationtools/testing/selftests/bpf/progs/verifier_linked_scalars.c+108 -00 replies
4/6bpf: Clear delta when clearing reg id for non-{add,sub} opskernel/bpf/verifier.c+26 -240 replies
5/6selftests/bpf: Add tests for delta tracking when src_reg == dst_regtools/testing/selftests/bpf/progs/verifier_linked_scalars.c+57 -00 replies
6/6selftests/bpf: Add tests for stale delta leaking through id reassignmenttools/testing/selftests/bpf/progs/verifier_linked_scalars.c+55 -00 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchEduard Zingerman
1/6T-b
2/6A-b
3/6A-b
4/6
5/6
6/6

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

Read the v1 thread

Cover letter [PATCH stable 6.18 0/6] bpf: verifier: linked register tests and fixes

This patchset mainly aims to backport upstream commit 1b327732c846 ("bpf: Clear delta when clearing reg id for non-{add,sub} ops") (patch 4), and its selftests patch in commit cac16ce1e378 ("selftests/bpf: Add tests for stale delta leaking through id reassignment") (patch 6). While doing so, I find that a BPF selftests patches are missing as context, so backported them along to import coverage.

The full list of patches that were backported are:
1. "selftests/bpf: Add tests for stale delta leaking through id reassignment"
2. "selftests/bpf: Add tests for delta tracking when src_reg == dst_reg"
3. "bpf: Clear delta when clearing reg id for non-{add,sub} ops"
4. "selftests/bpf: Add a test cases for sync_linked_regs regarding zext propagation"
5. "selftests/bpf: Add tests for improved linked register tracking"
6. "selftests: bpf: Add test for multiple syncs from linked register"

I have confirmed that after this patchset is applied, BPF selftests (test_progs*, test_verifier, and test_maps) still passes on x86_64[1] and aarch64[2].

1: https://github.com/kernel-patches/linux-stable/actions/runs/29553646000/job/87801246946
2: https://github.com/kernel-patches/linux-stable/actions/runs/29553646000/job/87801246917

Daniel Borkmann (4):
selftests/bpf: Add a test cases for sync_linked_regs regarding zext
propagation
bpf: Clear delta when clearing reg id for non-{add,sub} ops selftests/bpf: Add tests for delta tracking when src_reg == dst_reg selftests/bpf: Add tests for stale delta leaking through id
reassignment

Puranjay Mohan (2):
selftests: bpf: Add test for multiple syncs from linked register selftests/bpf: Add tests for improved linked register tracking

 kernel/bpf/verifier.c                         |  50 +-
 .../bpf/progs/verifier_linked_scalars.c       | 556 +++++++++++++++++-
 2 files changed, 580 insertions(+), 26 deletions(-)
Signature · 1 line
2.54.0