[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f7ba5ff9-59a2-b79f-a004-35ce3c12ba8b@iogearbox.net>
Date: Thu, 30 Apr 2020 01:14:44 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Jakub Sitnicki <jakub@...udflare.com>, bpf@...r.kernel.org
Cc: netdev@...r.kernel.org, kernel-team@...udflare.com,
Alexei Starovoitov <ast@...nel.org>,
Joe Stringer <joe@...d.net.nz>,
John Fastabend <john.fastabend@...il.com>,
Lorenz Bauer <lmb@...udflare.com>,
Martin KaFai Lau <kafai@...com>
Subject: Re: [PATCH bpf-next 0/3] Enable socket lookup in SOCKMAP/SOCKHASH
from BPF
On 4/29/20 8:11 PM, Jakub Sitnicki wrote:
> 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(-)
>
Applied, thanks!
Powered by blists - more mailing lists