summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorFlorent Revest <revest@chromium.org>2021-02-10 14:14:03 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-02-12 04:44:41 +0300
commitc5dbb89fc2ac013afe67b9e4fcb3743c02b567cd (patch)
tree717c986e70611b002a57850957d7132121c7ec9f /include/linux
parent07881ccbf40cc7893869f3f170301889ddca54ac (diff)
downloadlinux-c5dbb89fc2ac013afe67b9e4fcb3743c02b567cd.tar.xz
bpf: Expose bpf_get_socket_cookie to tracing programs
This needs a new helper that: - can work in a sleepable context (using sock_gen_cookie) - takes a struct sock pointer and checks that it's not NULL Signed-off-by: Florent Revest <revest@chromium.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: KP Singh <kpsingh@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210210111406.785541-2-revest@chromium.org
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bpf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 1c8ea682c007..cccaef1088ea 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1885,6 +1885,7 @@ extern const struct bpf_func_proto bpf_per_cpu_ptr_proto;
extern const struct bpf_func_proto bpf_this_cpu_ptr_proto;
extern const struct bpf_func_proto bpf_ktime_get_coarse_ns_proto;
extern const struct bpf_func_proto bpf_sock_from_file_proto;
+extern const struct bpf_func_proto bpf_get_socket_ptr_cookie_proto;
const struct bpf_func_proto *bpf_tracing_func_proto(
enum bpf_func_id func_id, const struct bpf_prog *prog);