BPF iterator for UNIX domain socket.
Status from this message: Applied to bpf-next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest4 patches 1 replyApplied
- v54 patches 9 repliesSuperseded
- v43 patches 8 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 2 patches | 8 replies | Superseded | |
| v2 | 2 patches | 0 replies | Superseded | |
| v1 | 2 patches | 10 replies | Superseded |
Changes in v6 from the cover letter
- Align the header "Inde" column
- Change int vars to __u64 not to break test_progs-no_alu32
- Move the if statement into the for loop not to depend on the fix [0]
- Drop the README change
- Modify "%c" positive test patterns
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpf: af_unix: Implement BPF iterator for UNIX domain socket.include/ net/ | +95 | 0 replies | |
| 2/4 | bpf: Support "%c" in bpf_bprintf_prepare().kernel/ | +14 | 0 replies | |
| 3/4 | selftest/bpf: Implement sample UNIX domain socket iterator program.tools/ tools/ tools/ +1 more | +108 | 1 reply | |
| 4/4 | selftest/bpf: Extend the bpf_snprintf() test for "%c".tools/ tools/ | +6 | 0 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Yonghong Song |
|---|---|
| 1/4 | A-b |
| 2/4 | A-b |
| 3/4 | A-b |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 bpf-next 0/4] BPF iterator for UNIX domain socket.
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().
Thanks to Yonghong Song for the fix [0] for the LLVM code gen. The fix prevents the LLVM compiler from transforming the loop exit condition '<' to '!=', where the upper bound is not a constant. The transformation leads the verifier to interpret it as an infinite loop.
And thanks to Andrii Nakryiko for its workaround [1].
[0] https://reviews.llvm.org/D107483
[1] https://lore.kernel.org/netdev/CAEf4BzZ3sVx1m1mOCcPcuVPiY6cWEAO=6VGHDiXEs9ZVD-RoLg@mail.gmail.com/
Changelog:
v6:
- Align the header "Inde" column
- Change int vars to __u64 not to break test_progs-no_alu32
- Move the if statement into the for loop not to depend on the fix [0]
- Drop the README change
- Modify "%c" positive test patterns
v5:
https://lore.kernel.org/netdev/[email protected]/
- Align header line of bpf_iter_unix.c
- Add test for "%c"
v4:
https://lore.kernel.org/netdev/[email protected]/
- 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/[email protected]/
- Export some functions for CONFIG_UNIX=m
v2:
https://lore.kernel.org/netdev/[email protected]/
- 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/[email protected]/
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 +++++++++++++++++++ .../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 | 80 ++++++++++++++++ .../selftests/bpf/progs/bpf_tracing_net.h | 4 + .../selftests/bpf/progs/test_snprintf.c | 6 +- 9 files changed, 223 insertions(+), 5 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/bpf_iter_unix.c
Signature · 1 line
2.30.2