From: Eduard Zingerman <eddyz87@gmail.com>
To: Jeongjun Park <aha310510@gmail.com>
Cc: alexei.starovoitov@gmail.com, andrii@kernel.org, ast@kernel.org,
bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com,
john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org,
linux-kernel@vger.kernel.org, martin.lau@linux.dev,
sdf@fomichev.me, song@kernel.org, yonghong.song@linux.dev
Subject: Re: [PATCH bpf] bpf: add check for invalid name in btf_name_valid_section()
Date: Fri, 30 Aug 2024 11:04:17 -0700 [thread overview]
Message-ID: <cf8e7feb83f5f199db4f1b7489e48e89f8985c16.camel@gmail.com> (raw)
In-Reply-To: <CAO9qdTH5SgSy_Mn6VMUNnkKa-Dr9x2bpgG6q=_3K8jJJT1p6sQ@mail.gmail.com>
On Fri, 2024-08-30 at 20:41 +0900, Jeongjun Park wrote:
[...]
> So does that mean it's appropriate to add if(!isprint(*src)) instead
> of if(!*src)?
I'd prefer to add "if (!*src) return false" and remove "src++" in
order to not repeat isprint().
> As far as I know, the first character of name doesn't need isprint() check,
> so if that's true, it would be appropriate to use isprint. Once this
> is confirmed,
The intent of the buggy commit [1] was to check that all characters in
a section name are printable. But I can't even check name for
printable characters these days :(
[1] bd70a8fb7ca4 ("bpf: Allow all printable characters in BTF DATASEC names")
[...]
prev parent reply other threads:[~2024-08-30 18:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 10:43 [PATCH bpf] bpf: add check for invalid name in btf_name_valid_section() Jeongjun Park
2024-08-29 2:36 ` Alexei Starovoitov
2024-08-29 3:45 ` Jeongjun Park
2024-08-29 5:45 ` Eduard Zingerman
2024-08-30 1:26 ` Eduard Zingerman
2024-08-30 2:03 ` Jeongjun Park
2024-08-30 9:42 ` Eduard Zingerman
2024-08-30 11:41 ` Jeongjun Park
2024-08-30 18:04 ` Eduard Zingerman [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=cf8e7feb83f5f199db4f1b7489e48e89f8985c16.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=aha310510@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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