[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m24ix43cxd.fsf@gmail.com>
Date: Wed, 28 May 2025 09:41:50 -0700
From: Eduard Zingerman <eddyz87@...il.com>
To: Jerome Marchand <jmarchan@...hat.com>
Cc: bpf@...r.kernel.org, Martin KaFai Lau <martin.lau@...ux.dev>, Alexei
Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, linux-kernel@...r.kernel.org,
Yonghong Song <yonghong.song@...ux.dev>
Subject: Re: [PATCH] bpf: Specify access type of bpf_sysctl_get_name args
Jerome Marchand <jmarchan@...hat.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.
> 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.
[...]
Powered by blists - more mailing lists