BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] Add bpf_skc_to_unix_sock() helper
@ 2021-10-06  4:06 Hengqi Chen
  2021-10-06  4:06 ` [PATCH bpf-next 1/2] bpf: " Hengqi Chen
  2021-10-06  4:06 ` [PATCH bpf-next 2/2] selftests/bpf: Test bpf_skc_to_unix_sock() Hengqi Chen
  0 siblings, 2 replies; 7+ messages in thread
From: Hengqi Chen @ 2021-10-06  4:06 UTC (permalink / raw)
  To: bpf
  Cc: ast, daniel, andrii, yhs, john.fastabend, kafai, songliubraving,
	hengqi.chen

This patch set adds a new BPF helper bpf_skc_to_unix_sock().
The helper is used in tracing programs to cast a socket
pointer to a unix_sock pointer.

Hengqi Chen (2):
  bpf: Add bpf_skc_to_unix_sock() helper
  selftests/bpf: Test bpf_skc_to_unix_sock()

 include/linux/bpf.h                           |  1 +
 include/uapi/linux/bpf.h                      |  7 +++
 kernel/trace/bpf_trace.c                      |  2 +
 net/core/filter.c                             | 23 ++++++++
 scripts/bpf_doc.py                            | 12 +++--
 tools/include/uapi/linux/bpf.h                |  7 +++
 .../bpf/prog_tests/skc_to_unix_sock.c         | 54 +++++++++++++++++++
 .../bpf/progs/test_skc_to_unix_sock.c         | 28 ++++++++++
 8 files changed, 129 insertions(+), 5 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/skc_to_unix_sock.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_skc_to_unix_sock.c

--
2.25.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-07  4:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-06  4:06 [PATCH bpf-next 0/2] Add bpf_skc_to_unix_sock() helper Hengqi Chen
2021-10-06  4:06 ` [PATCH bpf-next 1/2] bpf: " Hengqi Chen
2021-10-06  5:00   ` Song Liu
2021-10-07  4:02     ` Hengqi Chen
2021-10-06  4:06 ` [PATCH bpf-next 2/2] selftests/bpf: Test bpf_skc_to_unix_sock() Hengqi Chen
2021-10-06  5:09   ` Song Liu
2021-10-07  4:05     ` Hengqi Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox