bpf: Extend sys_bpf commands for bpf_syscall programs.
authorAlexei Starovoitov <ast@kernel.org>
Wed, 9 Feb 2022 23:19:57 +0000 (15:19 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 Feb 2022 22:31:51 +0000 (23:31 +0100)
commitb1d18a7574d0df5eb4117c14742baf8bc2b9bb74
treeea8ee79c7da31f82b07edceaf781de9618b8143f
parent4f5e483b8c7a644733db941a1ae00173baa7b463
bpf: Extend sys_bpf commands for bpf_syscall programs.

bpf_sycall programs can be used directly by the kernel modules
to load programs and create maps via kernel skeleton.
. Export bpf_sys_bpf syscall wrapper to be used in kernel skeleton.
. Export bpf_map_get to be used in kernel skeleton.
. Allow prog_run cmd for bpf_syscall programs with recursion check.
. Enable link_create and raw_tp_open cmds.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220209232001.27490-2-alexei.starovoitov@gmail.com
kernel/bpf/syscall.c