aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bpf_types.h
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-05-13 17:36:03 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2021-05-19 00:33:39 +0200
commit79a7f8bdb159d9914b58740f3d31d602a6e4aca8 (patch)
tree4713544ec684ad91106265a60d4275e96a9e9064 /include/linux/bpf_types.h
parentbpf: Check for BPF_F_ADJ_ROOM_FIXED_GSO when bpf_skb_change_proto (diff)
downloadlinux-dev-79a7f8bdb159d9914b58740f3d31d602a6e4aca8.tar.xz
linux-dev-79a7f8bdb159d9914b58740f3d31d602a6e4aca8.zip
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
Diffstat (limited to 'include/linux/bpf_types.h')
-rw-r--r--include/linux/bpf_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h
index f883f01a5061..a9db1eae6796 100644
--- a/include/linux/bpf_types.h
+++ b/include/linux/bpf_types.h
@@ -77,6 +77,8 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_LSM, lsm,
void *, void *)
#endif /* CONFIG_BPF_LSM */
#endif
+BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL, bpf_syscall,
+ void *, void *)
BPF_MAP_TYPE(BPF_MAP_TYPE_ARRAY, array_map_ops)
BPF_MAP_TYPE(BPF_MAP_TYPE_PERCPU_ARRAY, percpu_array_map_ops)