summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/verifier.c
diff options
context:
space:
mode:
authorJakub Sitnicki <jakub@cloudflare.com>2024-05-27 13:20:09 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2024-05-27 19:34:26 +0200
commita63bf556160fb19591183383da6757f52119981d (patch)
treee6102ba20bfdef0c8312cf878c6e129995581b1c /tools/testing/selftests/bpf/prog_tests/verifier.c
parentRevert "bpf, sockmap: Prevent lock inversion deadlock in map delete elem" (diff)
downloadlinux-a63bf556160fb19591183383da6757f52119981d.tar.xz
linux-a63bf556160fb19591183383da6757f52119981d.zip
selftests/bpf: Cover verifier checks for mutating sockmap/sockhash
Verifier enforces that only certain program types can mutate sock{map,hash} maps, that is update it or delete from it. Add test coverage for these checks so we don't regress. Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20240527-sockmap-verify-deletes-v1-3-944b372f2101@cloudflare.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/verifier.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/verifier.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/verifier.c b/tools/testing/selftests/bpf/prog_tests/verifier.c
index c60db8beeb73..1c9c4ec1be11 100644
--- a/tools/testing/selftests/bpf/prog_tests/verifier.c
+++ b/tools/testing/selftests/bpf/prog_tests/verifier.c
@@ -67,6 +67,7 @@
#include "verifier_search_pruning.skel.h"
#include "verifier_sock.skel.h"
#include "verifier_sock_addr.skel.h"
+#include "verifier_sockmap_mutate.skel.h"
#include "verifier_spill_fill.skel.h"
#include "verifier_spin_lock.skel.h"
#include "verifier_stack_ptr.skel.h"
@@ -183,6 +184,7 @@ void test_verifier_sdiv(void) { RUN(verifier_sdiv); }
void test_verifier_search_pruning(void) { RUN(verifier_search_pruning); }
void test_verifier_sock(void) { RUN(verifier_sock); }
void test_verifier_sock_addr(void) { RUN(verifier_sock_addr); }
+void test_verifier_sockmap_mutate(void) { RUN(verifier_sockmap_mutate); }
void test_verifier_spill_fill(void) { RUN(verifier_spill_fill); }
void test_verifier_spin_lock(void) { RUN(verifier_spin_lock); }
void test_verifier_stack_ptr(void) { RUN(verifier_stack_ptr); }