selftests/bpf: add stack access precision test
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 5 Dec 2023 18:42:40 +0000 (10:42 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 5 Dec 2023 21:40:20 +0000 (13:40 -0800)
commit876301881c436bf38e83a2c0d276a24b642e4aab
treedcac49d7f85b37e4f999fd1d3cf382036eaf565d
parent41f6f64e6999a837048b1bd13a2f8742964eca6b
selftests/bpf: add stack access precision test

Add a new selftests that validates precision tracking for stack access
instruction, using both r10-based and non-r10-based accesses. For
non-r10 ones we also make sure to have non-zero var_off to validate that
final stack offset is tracked properly in instruction history
information inside verifier.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231205184248.1502704-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/verifier_subprog_precision.c