bpf/selftests: Test using global cpumask kptr with RCU
authorDavid Vernet <void@manifault.com>
Thu, 16 Mar 2023 05:40:26 +0000 (00:40 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 16 Mar 2023 19:28:30 +0000 (12:28 -0700)
commita5a197df58c44ce32a86b57e970da4bd7b71b399
tree83ed0b741f7fe78a8fcc9bfc9398b1bdd9db3826
parent63d2d83d21a6e2c6f019da5b2d5cdabe6d1cb951
bpf/selftests: Test using global cpumask kptr with RCU

Now that struct bpf_cpumask * is considered an RCU-safe type according
to the verifier, we should add tests that validate its common usages.
This patch adds those tests to the cpumask test suite. A subsequent
changes will remove bpf_cpumask_kptr_get(), and will adjust the selftest
and BPF documentation accordingly.

Signed-off-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/r/20230316054028.88924-4-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/cpumask.c
tools/testing/selftests/bpf/progs/cpumask_common.h
tools/testing/selftests/bpf/progs/cpumask_failure.c
tools/testing/selftests/bpf/progs/cpumask_success.c