]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: iterator based loop and STACK_MISC states pruning
authorEduard Zingerman <eddyz87@gmail.com>
Wed, 31 Dec 2025 05:36:04 +0000 (21:36 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 31 Dec 2025 17:01:13 +0000 (09:01 -0800)
commit4fd99103eef347174b3c9b6071428324a3cf9a60
treef2bf35632cfafc9621ffd47c3f094edb4152b44c
parent840692326e92b5deb76c224931e8ca145ce7cfb8
selftests/bpf: iterator based loop and STACK_MISC states pruning

The test case first initializes 9 stack slots as STACK_MISC,
then conditionally updates each of them to SCALAR spill inside an
iterator based loop. This leads to 2**9 combinations of MISC/SPILL
marks for these slots at the iterator next call.
The loop converges only if the verifier treats such states as
equivalent, otherwise visited states are evicted from the states cache
too quickly.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20251230-loop-stack-misc-pruning-v1-2-585cfd6cec51@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/iters.c