bpf: Add bpf_ksock_sendto() kfunc
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf: add bpf_ksock_sendto() kfuncnet/ | +69 | 4 replies | Applied |
| 2/3 | selftests/bpf: Test ksock sendto()tools/ tools/ tools/ | +169 | 0 replies | Applied |
| 3/3 | selftests/bpf: Test forbidden bpf_ksock_sendto() LSM attachtools/ | +24 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH bpf-next v2 0/3] bpf: Add bpf_ksock_sendto() kfunc
This patch series improves the bpf_ksock infrastructure in line with the work proposed during Prague Plumbers 2026 presentation[^1] by adding the bpf_ksock_sendto() kfunc to complement the bpf_ksock_send().
This is useful when using ksock to reply to differents peers while reusing the same UDP socket and generally works toward the goal of ksock to support the basic socket operations.
[^1]: https://lpc.events/event/20/contributions/2430/
v2 updates:
- remove the LSM verifier filter refinements (alexei)
- remove allowing calling connect() from the send path (alexei)
- change order of the tests patches for signature definition (sashiko)
v1: https://lore.kernel.org/bpf/[email protected]/
Mahe Tardy (3):
bpf: add bpf_ksock_sendto() kfunc
selftests/bpf: Test ksock sendto()
selftests/bpf: Test forbidden bpf_ksock_sendto() LSM attach
net/core/bpf_ksock.c | 96 +++++++++++----- .../selftests/bpf/prog_tests/ksock_sendto.c | 108 ++++++++++++++++++ .../selftests/bpf/progs/ksock_common.h | 2 + .../selftests/bpf/progs/ksock_lsm_verifier.c | 25 +++- .../selftests/bpf/progs/ksock_sendto.c | 59 ++++++++++ 5 files changed, 262 insertions(+), 28 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/ksock_sendto.c create mode 100644 tools/testing/selftests/bpf/progs/ksock_sendto.c
--
2.43.0