selftests/bpf: add edge case backtracking logic test
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 10 Nov 2023 00:26:38 +0000 (16:26 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Nov 2023 04:11:20 +0000 (20:11 -0800)
commit62ccdb11d3c63dc697dea1fd92b3496fe43dcc1e
treeef2e9a422ae611e616fd521fc59a6b3b1cb97db3
parent4bb7ea946a370707315ab774432963ce47291946
selftests/bpf: add edge case backtracking logic test

Add a dedicated selftests to try to set up conditions to have a state
with same first and last instruction index, but it actually is a loop
3->4->1->2->3. This confuses mark_chain_precision() if verifier doesn't
take into account jump history.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231110002638.4168352-4-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_precision.c