summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHengqi Chen <hengqi.chen@gmail.com>2021-10-21 15:47:51 +0200
committerAlexei Starovoitov <ast@kernel.org>2021-10-22 00:11:06 +0200
commit9eeb3aa33ae005526f672b394c1791578463513f (patch)
tree0c70fe4027644192a334d3bd60bbbcb8e4f7758d /scripts
parentsamples: bpf: Suppress readelf stderr when probing for BTF support (diff)
downloadlinux-9eeb3aa33ae005526f672b394c1791578463513f.tar.xz
linux-9eeb3aa33ae005526f672b394c1791578463513f.zip
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bpf_doc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/bpf_doc.py b/scripts/bpf_doc.py
index 00ac7b79cddb..a6403ddf5de7 100755
--- a/scripts/bpf_doc.py
+++ b/scripts/bpf_doc.py
@@ -537,6 +537,7 @@ class PrinterHelpers(Printer):
'struct tcp_timewait_sock',
'struct tcp_request_sock',
'struct udp6_sock',
+ 'struct unix_sock',
'struct task_struct',
'struct __sk_buff',
@@ -589,6 +590,7 @@ class PrinterHelpers(Printer):
'struct tcp_timewait_sock',
'struct tcp_request_sock',
'struct udp6_sock',
+ 'struct unix_sock',
'struct task_struct',
'struct path',
'struct btf_ptr',