selftests/bpf: tests with delayed read/precision makrs in loop body
authorEduard Zingerman <eddyz87@gmail.com>
Tue, 24 Oct 2023 00:09:14 +0000 (03:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:18:58 +0000 (16:18 -0800)
commit7f764ea0c8e6b4fd6fbf8c8fd13c209c5e64d8f3
tree0504709074a8a150303febec5a6a559bca427896
parentab470fefce2837e66b771c60858118d50bb5bb10
selftests/bpf: tests with delayed read/precision makrs in loop body

commit 389ede06c2974b2f878a7ebff6b0f4f707f9db74 upstream.

These test cases try to hide read and precision marks from loop
convergence logic: marks would only be assigned on subsequent loop
iterations or after exploring states pushed to env->head stack first.
Without verifier fix to use exact states comparison logic for
iterators convergence these tests (except 'triple_continue') would be
errorneously marked as safe.

Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231024000917.12153-5-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/bpf/progs/iters.c