]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, sk_msg: Add some generic helpers that may be useful from sk_msg
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 24 May 2020 16:50:33 +0000 (09:50 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:38:20 +0000 (14:38 -0700)
commit05170c0dad346348f90dc7ba3f03f82d4e7e4cff
treebc46d5b791ee91b93716a916cbafb802a9858cf0
parentfc7a8543e187c0d8aaf6996b3a5fd50bc6fa683d
bpf, sk_msg: Add some generic helpers that may be useful from sk_msg

Add these generic helpers that may be useful to use from sk_msg programs.
The helpers do not depend on ctx so we can simply add them here,

 BPF_FUNC_perf_event_output
 BPF_FUNC_get_current_uid_gid
 BPF_FUNC_get_current_pid_tgid
 BPF_FUNC_get_current_cgroup_id
 BPF_FUNC_get_current_ancestor_cgroup_id
 BPF_FUNC_get_cgroup_classid

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/159033903373.12355.15489763099696629346.stgit@john-Precision-5820-Tower
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/filter.c