mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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
This commit is contained in:
parent
44ce0ac11e
commit
9eeb3aa33a
6 changed files with 42 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue