]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add bpf_skc_to_unix_sock() helper
authorHengqi Chen <hengqi.chen@gmail.com>
Thu, 21 Oct 2021 13:47:51 +0000 (21:47 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 21 Oct 2021 22:11:06 +0000 (15:11 -0700)
commitaf7f49a0b33c57f1a3f89c3978f68facaffc38d6
tree0c70fe4027644192a334d3bd60bbbcb8e4f7758d
parenta791b7c6018b48a058b4af7e27301410f62ee7f0
bpf: Add bpf_skc_to_unix_sock() helper

The helper is used in tracing programs to cast a socket
pointer to a unix_sock pointer.
The return value could be NULL if the casting is illegal.

Suggested-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20211021134752.1223426-2-hengqi.chen@gmail.com
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/trace/bpf_trace.c
net/core/filter.c
scripts/bpf_doc.py
tools/include/uapi/linux/bpf.h