From: Andrey Ignatov <rdna@fb.com>
To: Stanislav Fomichev <sdf@google.com>
Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>,
<davem@davemloft.net>, <ast@kernel.org>, <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>
Subject: Re: [PATCH bpf-next v4 4/4] bpf: allow any port in bpf_bind helper
Date: Thu, 7 May 2020 13:26:50 -0700 [thread overview]
Message-ID: <20200507202650.GA3757@rdna-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200507191215.248860-5-sdf@google.com>
Stanislav Fomichev <sdf@google.com> [Thu, 2020-05-07 12:12 -0700]:
> We want to have a tighter control on what ports we bind to in
> the BPF_CGROUP_INET{4,6}_CONNECT hooks even if it means
> connect() becomes slightly more expensive. The expensive part
> comes from the fact that we now need to call inet_csk_get_port()
> that verifies that the port is not used and allocates an entry
> in the hash table for it.
>
> Since we can't rely on "snum || !bind_address_no_port" to prevent
> us from calling POST_BIND hook anymore, let's add another bind flag
> to indicate that the call site is BPF program.
>
> v3:
> * More bpf_bind documentation refinements (Martin KaFai Lau)
> * Add UDP tests as well (Martin KaFai Lau)
> * Don't start the thread, just do socket+bind+listen (Martin KaFai Lau)
>
> v2:
> * Update documentation (Andrey Ignatov)
> * Pass BIND_FORCE_ADDRESS_NO_PORT conditionally (Andrey Ignatov)
>
> Cc: Andrey Ignatov <rdna@fb.com>
> Acked-by: Martin KaFai Lau <kafai@fb.com>
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
It seems my Ack from v2 got lost so just reposting it:
Acked-by: Andrey Ignatov <rdna@fb.com>
--
Andrey Ignatov
prev parent reply other threads:[~2020-05-07 20:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 19:12 [PATCH bpf-next v4 0/4] bpf: allow any port in bpf_bind helper Stanislav Fomichev
2020-05-07 19:12 ` [PATCH bpf-next v4 1/4] selftests/bpf: generalize helpers to control background listener Stanislav Fomichev
2020-05-08 7:19 ` Martin KaFai Lau
2020-05-07 19:12 ` [PATCH bpf-next v4 2/4] selftests/bpf: move existing common networking parts into network_helpers Stanislav Fomichev
2020-05-08 7:13 ` Martin KaFai Lau
2020-05-07 19:12 ` [PATCH bpf-next v4 3/4] net: refactor arguments of inet{,6}_bind Stanislav Fomichev
2020-05-07 19:12 ` [PATCH bpf-next v4 4/4] bpf: allow any port in bpf_bind helper Stanislav Fomichev
2020-05-07 20:26 ` Andrey Ignatov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200507202650.GA3757@rdna-mbp.dhcp.thefacebook.com \
--to=rdna@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=sdf@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).