From: Jerome Marchand <jmarchan@redhat.com>
To: Eduard Zingerman <eddyz87@gmail.com>
Cc: bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
linux-kernel@vger.kernel.org,
Yonghong Song <yonghong.song@linux.dev>
Subject: Re: [PATCH] bpf: Specify access type of bpf_sysctl_get_name args
Date: Thu, 29 May 2025 13:35:55 +0200 [thread overview]
Message-ID: <c97284b4-cac8-4dcc-991b-d535694f31c5@redhat.com> (raw)
In-Reply-To: <m24ix43cxd.fsf@gmail.com>
On 28/05/2025 18:41, Eduard Zingerman wrote:
> Jerome Marchand <jmarchan@redhat.com> writes:
>
> [...]
>
>>> Looks like we don't run bpf_sysctl_get_name tests on the CI.
>>> CI executes the following binaries:
>>> - test_progs{,-no_alu32,-cpuv4}
>>> - test_verifier
>>> - test_maps
>>> test_progs is what is actively developed.
>>> I agree with the reasoning behind this patch, however, could you
>>> please
>>> add a selftest demonstrating unsafe behaviour?
>>
>> Do you mean to write a selftest that demonstrate the current unsafe
>> behavior of the bpf_sysctl_get_name helper? I could write something
>> similar as the failing test_sysctl cases.
>
> Yes, something like that, taking an unsafe action based on content of
> the buffer after the helper call.
Alright, I'll do that.
>
>> I'm thinking that a more general test that would check that helpers
>> don't access memory in a different way than advertised in their
>> prototype would be more useful. But that's quite a different endeavor.
>
> That would be interesting, I think.
> Depends on how much time you need to write such a test.
I might think about it, but ATM, I just don't have time to do that. If
someone is interested in implementing it, be my guest.
>
> [...]
>
next prev parent reply other threads:[~2025-05-29 11:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 16:54 Jerome Marchand
2025-05-27 19:56 ` Yonghong Song
2025-05-28 9:09 ` Jerome Marchand
2025-05-28 17:41 ` Yonghong Song
2025-05-27 21:39 ` Eduard Zingerman
2025-05-28 12:47 ` Jerome Marchand
2025-05-28 16:41 ` Eduard Zingerman
2025-05-29 11:35 ` Jerome Marchand [this message]
2025-06-10 9:19 ` [PATCH v2 0/2] " Jerome Marchand
2025-06-10 9:19 ` [PATCH v2 1/2] " Jerome Marchand
2025-06-10 16:41 ` Yonghong Song
2025-06-10 9:19 ` [PATCH v2 2/2] selftests/bpf: Convert test_sysctl to prog_tests Jerome Marchand
2025-06-10 17:16 ` Yonghong Song
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=c97284b4-cac8-4dcc-991b-d535694f31c5@redhat.com \
--to=jmarchan@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--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
all inboxes | Powered by JetHome®