Enable socket lookup in SOCKMAP/SOCKHASH from BPF
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf: Allow bpf_map_lookup_elem for SOCKMAP and SOCKHASHkernel/ net/ net/ | +55 | 1 reply | |
| 2/3 | selftests/bpf: Test that lookup on SOCKMAP/SOCKHASH is allowedtools/ tools/ | +70 | 3 replies | |
| 3/3 | selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign testtools/ tools/ tools/ | +53 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | John Fastabend |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf-next 0/3] Enable socket lookup in SOCKMAP/SOCKHASH from BPF
This series enables BPF programs to fetch sockets from SOCKMAP/SOCKHASH by doing a map lookup, as proposed during virtual BPF conference.
Patch 1 description covers changes on verifier side needed to make it work.
Fetched socket can be inspected or passed to helpers such as bpf_sk_assign, which is demonstrated by the test updated in patch 3.
Thanks,
Jakub
Jakub Sitnicki (3):
bpf: Allow bpf_map_lookup_elem for SOCKMAP and SOCKHASH selftests/bpf: Test that lookup on SOCKMAP/SOCKHASH is allowed selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test
kernel/bpf/verifier.c | 45 +++++++--- net/core/filter.c | 4 + net/core/sock_map.c | 18 +++- tools/testing/selftests/bpf/Makefile | 2 +- .../selftests/bpf/prog_tests/sk_assign.c | 21 ++++- .../selftests/bpf/progs/test_sk_assign.c | 82 ++++++++----------- .../bpf/verifier/prevent_map_lookup.c | 30 ------- tools/testing/selftests/bpf/verifier/sock.c | 70 ++++++++++++++++ 8 files changed, 178 insertions(+), 94 deletions(-)
Signature · 1 line
2.25.3