diff options
author | Jordan Rife <jrife@google.com> | 2024-05-10 14:02:32 -0500 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-05-12 17:10:42 -0700 |
commit | dfb7539b47b501ccc0d23bae718500ada2157aee (patch) | |
tree | af8bfb396616fb4fff15762645efa514dfd30f89 /tools/testing/selftests/bpf/progs/bind6_prog.c | |
parent | 1e0a8367c89f82816735973d0e65a3c8e1b43179 (diff) | |
download | linux-dfb7539b47b501ccc0d23bae718500ada2157aee.tar.gz linux-dfb7539b47b501ccc0d23bae718500ada2157aee.tar.bz2 linux-dfb7539b47b501ccc0d23bae718500ada2157aee.zip |
sefltests/bpf: Expand sockaddr hook deny tests
This patch expands test coverage for EPERM tests to include connect and
bind calls and rounds out the coverage for sendmsg by adding tests for
sendmsg_unix.
Signed-off-by: Jordan Rife <jrife@google.com>
Link: https://lore.kernel.org/r/20240510190246.3247730-16-jrife@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/bind6_prog.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/bind6_prog.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/bind6_prog.c b/tools/testing/selftests/bpf/progs/bind6_prog.c index 9c86c712348c..501c3fc11d35 100644 --- a/tools/testing/selftests/bpf/progs/bind6_prog.c +++ b/tools/testing/selftests/bpf/progs/bind6_prog.c @@ -175,4 +175,10 @@ int bind_v6_prog(struct bpf_sock_addr *ctx) return 1; } +SEC("cgroup/bind6") +int bind_v6_deny_prog(struct bpf_sock_addr *ctx) +{ + return 0; +} + char _license[] SEC("license") = "GPL"; |