linux/tools/include
Lorenz Bauer 6d3fad2b44 bpf: Add PROG_TEST_RUN support for sk_lookup programs
commit 7c32e8f8bc upstream.

Allow to pass sk_lookup programs to PROG_TEST_RUN. User space
provides the full bpf_sk_lookup struct as context. Since the
context includes a socket pointer that can't be exposed
to user space we define that PROG_TEST_RUN returns the cookie
of the selected socket or zero in place of the socket pointer.

We don't support testing programs that select a reuseport socket,
since this would mean running another (unrelated) BPF program
from the sk_lookup test handler.

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210303101816.36774-3-lmb@cloudflare.com
Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-03 12:00:52 +02:00
..
asm tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' - again 2022-07-25 11:26:56 +02:00
asm-generic
linux tools headers: Remove broken definition of __LITTLE_ENDIAN 2022-07-25 11:26:56 +02:00
nolibc tools/nolibc: fix incorrect truncation of exit code 2022-01-27 10:53:42 +01:00
tools
trace/events
uapi bpf: Add PROG_TEST_RUN support for sk_lookup programs 2022-08-03 12:00:52 +02:00
vdso tools headers: Synchronize linux/bits.h with the kernel sources 2020-04-14 11:40:05 -03:00