bpf: Introduce bpf_sys_bpf() helper and program type.
authorAlexei Starovoitov <ast@kernel.org>
Fri, 14 May 2021 00:36:03 +0000 (17:36 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 18 May 2021 22:33:39 +0000 (00:33 +0200)
commit79a7f8bdb159d9914b58740f3d31d602a6e4aca8
tree4713544ec684ad91106265a60d4275e96a9e9064
parentfa7b83bf3b156c767f3e4a25bbf3817b08f3ff8e
bpf: Introduce bpf_sys_bpf() helper and program type.

Add placeholders for bpf_sys_bpf() helper and new program type.
Make sure to check that expected_attach_type is zero for future extensibility.
Allow tracing helper functions to be used in this program type, since they will
only execute from user context via bpf_prog_test_run.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210514003623.28033-2-alexei.starovoitov@gmail.com
include/linux/bpf.h
include/linux/bpf_types.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c
kernel/bpf/verifier.c
net/bpf/test_run.c
tools/include/uapi/linux/bpf.h