Jerome Marchand <jmarchan@xxxxxxxxxx> 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. [...]