]> git.baikalelectronics.ru Git - kernel.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)
commit706caf6393a8687afb66089160c156286ed8b5e3
tree5273ac46e99e0b7e9e101e40adb370ba306e3fd9
parent33acbc1fc939b519ebad52db3417f88d2b13861b
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]