From: Daniel Borkmann <daniel@iogearbox.net>
To: Martin KaFai Lau <kafai@fb.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
kernel-team@fb.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3 bpf] bpf: Sanitize the bpf_struct_ops tcp-cc name
Date: Tue, 17 Mar 2020 21:08:04 +0100 [thread overview]
Message-ID: <a428fb88-9b53-27dd-a195-497755944921@iogearbox.net> (raw)
In-Reply-To: <20200314010209.1131542-1-kafai@fb.com>
On 3/14/20 2:02 AM, Martin KaFai Lau wrote:
> The bpf_struct_ops tcp-cc name should be sanitized in order to
> avoid problematic chars (e.g. whitespaces).
>
> This patch reuses the bpf_obj_name_cpy() for accepting the same set
> of characters in order to keep a consistent bpf programming experience.
> A "size" param is added. Also, the strlen is returned on success so
> that the caller (like the bpf_tcp_ca here) can error out on empty name.
> The existing callers of the bpf_obj_name_cpy() only need to change the
> testing statement to "if (err < 0)". For all these existing callers,
> the err will be overwritten later, so no extra change is needed
> for the new strlen return value.
>
> v3:
> - reverse xmas tree style
>
> v2:
> - Save the orig_src to avoid "end - size" (Andrii)
>
> Fixes: 0baf26b0fcd7 ("bpf: tcp: Support tcp_congestion_ops in bpf")
> Acked-by: Andrii Nakryiko <andriin@fb.com>
> Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Applied, thanks!
prev parent reply other threads:[~2020-03-17 20:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 1:02 [PATCH v3 bpf] bpf: Sanitize the bpf_struct_ops tcp-cc name Martin KaFai Lau
2020-03-17 20:08 ` Daniel Borkmann [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=a428fb88-9b53-27dd-a195-497755944921@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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).