]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite3eda4e0668514c3d5491a8e8f40af307d257c44
treeea8ee79c7da31f82b07edceaf781de9618b8143f
parentd209f7adcf294c5009dffdf8b194609a0c378494
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