]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/bpf: Add pruning test case for bpf_spin_lock
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Fri, 9 Dec 2022 13:57:32 +0000 (15:57 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 10 Dec 2022 21:35:57 +0000 (13:35 -0800)
commit2026f2062df860e5d282ffd4962ea5d5ed53dc51
treeeed63f52c3eb9c0ae00474a8cf1895c8818762aa
parent4ea2bb158bec2fe171e7e07c033dcf208d86e274
selftests/bpf: Add pruning test case for bpf_spin_lock

Test that when reg->id is not same for the same register of type
PTR_TO_MAP_VALUE between current and old explored state, we currently
return false from regsafe and continue exploring.

Without the fix in prior commit, the test case fails.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20221209135733.28851-7-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/spin_lock.c