]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add tests with stack ptr register in conditional jmp
authorYonghong Song <yonghong.song@linux.dev>
Sat, 24 May 2025 04:13:40 +0000 (21:13 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 27 May 2025 21:09:12 +0000 (14:09 -0700)
commit5ffb537e416ee22dbfb3d552102e50da33fec7f6
tree7326b917a04cb803c6459e8a8cf021552644154a
parente2d2115e56c4a02377189bfc3a9a7933552a7b0f
selftests/bpf: Add tests with stack ptr register in conditional jmp

Add two tests:
  - one test has 'rX <op> r10' where rX is not r10, and
  - another test has 'rX <op> rY' where rX and rY are not r10
    but there is an early insn 'rX = r10'.

Without previous verifier change, both tests will fail.

Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250524041340.4046304-1-yonghong.song@linux.dev
kernel/bpf/verifier.c
tools/testing/selftests/bpf/progs/verifier_precision.c