]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/bpf: Tests for sockmap/sockhash holding listening sockets
authorJakub Sitnicki <jakub@cloudflare.com>
Tue, 18 Feb 2020 17:10:23 +0000 (17:10 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 21 Feb 2020 21:29:46 +0000 (22:29 +0100)
commit44d28be2b8d41e3198052b8c9eded2e23eb9e08b
tree5273ac46e99e0b7e9e101e40adb370ba306e3fd9
parent11318ba8cafd59105637b2b82b8a32719e44a2d2
selftests/bpf: Tests for sockmap/sockhash holding listening sockets

Now that SOCKMAP and SOCKHASH map types can store listening sockets,
user-space and BPF API is open to a new set of potential pitfalls.

Exercise the map operations, with extra attention to code paths susceptible
to races between map ops and socket cloning, and BPF helpers that work with
SOCKMAP/SOCKHASH to gain confidence that all works as expected.

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/20200218171023.844439-12-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_sockmap_listen.c [new file with mode: 0644]