Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v5 bpf-next 0/4] BPF iterator for UNIX domain socket.
@ 2021-08-12 16:45 Kuniyuki Iwashima
  2021-08-12 16:45 ` [PATCH v5 bpf-next 1/4] bpf: af_unix: Implement " Kuniyuki Iwashima
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Kuniyuki Iwashima @ 2021-08-12 16:45 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh
  Cc: Benjamin Herrenschmidt, Kuniyuki Iwashima, Kuniyuki Iwashima,
	bpf, netdev

This patch set adds BPF iterator support for UNIX domain socket.  The first
patch implements it, and the second adds "%c" support for BPF_SEQ_PRINTF().


Changelog:
  v5:
  - Align header line of bpf_iter_unix.c
  - Add test for "%c"

  v4:
  https://lore.kernel.org/netdev/20210810092807.13190-1-kuniyu@amazon.co.jp/
  - Check IS_BUILTIN(CONFIG_UNIX)
  - Support "%c" in BPF_SEQ_PRINTF()
  - Uncomment the code to print the name of the abstract socket
  - Mention the LLVM fix in README.rst
  - Remove the 'aligned' attribute in bpf_iter.h
  - Keep the format string on a single line

  v3:
  https://lore.kernel.org/netdev/20210804070851.97834-1-kuniyu@amazon.co.jp/
  - Export some functions for CONFIG_UNIX=m

  v2:
  https://lore.kernel.org/netdev/20210803011110.21205-1-kuniyu@amazon.co.jp/
  - Implement bpf_iter specific seq_ops->stop()
  - Add bpf_iter__unix in bpf_iter.h
  - Move common definitions in selftest to bpf_tracing_net.h
  - Include the code for abstract UNIX domain socket as comment in selftest
  - Use ASSERT_OK_PTR() instead of CHECK()
  - Make ternary operators on single line

  v1:
  https://lore.kernel.org/netdev/20210729233645.4869-1-kuniyu@amazon.co.jp/


Kuniyuki Iwashima (4):
  bpf: af_unix: Implement BPF iterator for UNIX domain socket.
  bpf: Support "%c" in bpf_bprintf_prepare().
  selftest/bpf: Implement sample UNIX domain socket iterator program.
  selftest/bpf: Extend the bpf_snprintf() test for "%c".

 include/linux/btf_ids.h                       |  3 +-
 kernel/bpf/helpers.c                          | 14 +++
 net/unix/af_unix.c                            | 93 +++++++++++++++++++
 tools/testing/selftests/bpf/README.rst        | 38 ++++++++
 .../selftests/bpf/prog_tests/bpf_iter.c       | 16 ++++
 .../selftests/bpf/prog_tests/snprintf.c       |  4 +-
 tools/testing/selftests/bpf/progs/bpf_iter.h  |  8 ++
 .../selftests/bpf/progs/bpf_iter_unix.c       | 77 +++++++++++++++
 .../selftests/bpf/progs/bpf_tracing_net.h     |  4 +
 .../selftests/bpf/progs/test_snprintf.c       |  7 +-
 10 files changed, 259 insertions(+), 5 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_unix.c

-- 
2.30.2


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

end of thread, other threads:[~2021-08-16 12:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 16:45 [PATCH v5 bpf-next 0/4] BPF iterator for UNIX domain socket Kuniyuki Iwashima
2021-08-12 16:45 ` [PATCH v5 bpf-next 1/4] bpf: af_unix: Implement " Kuniyuki Iwashima
2021-08-12 16:45 ` [PATCH v5 bpf-next 2/4] bpf: Support "%c" in bpf_bprintf_prepare() Kuniyuki Iwashima
2021-08-12 16:45 ` [PATCH v5 bpf-next 3/4] selftest/bpf: Implement sample UNIX domain socket iterator program Kuniyuki Iwashima
2021-08-13 23:25   ` Andrii Nakryiko
2021-08-14  0:21     ` Kuniyuki Iwashima
2021-08-14  0:26       ` Andrii Nakryiko
2021-08-14  1:00         ` Kuniyuki Iwashima
2021-08-15 18:10       ` Yonghong Song
2021-08-16 12:45         ` Kuniyuki Iwashima
2021-08-12 16:45 ` [PATCH v5 bpf-next 4/4] selftest/bpf: Extend the bpf_snprintf() test for "%c" Kuniyuki Iwashima
2021-08-13 23:28   ` Andrii Nakryiko
2021-08-13 23:30     ` Andrii Nakryiko
2021-08-14  0:37       ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).