On Tue, Jun 24, 2025 at 4:31 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > On Tue, 2025-06-24 at 14:55 -0700, Alexei Starovoitov wrote: > > On Tue, Jun 24, 2025 at 12:10 PM Eduard Zingerman <eddyz87@xxxxxxxxx> wrote: > > > > > > Originally prog_tests/verifier.c was developed to run tests ported > > > from test_verifier binary. test_verifier runs tests with CAP_SYS_ADMIN > > > dropped, hence this behaviour was copied in prog_tests/verifier.c. > > > BPF_OBJ_GET_NEXT_ID BPF syscall command fails w/o CAP_SYS_ADMIN and > > > this prevents libbpf from loading module BTFs. > > > > You need this only because of 'bpf_kfunc_trusted_num_test' access > > in patch 4? > > Can you use kernel kfunc instead? > > This turned out non-trivial, not many kernel kfuncs take pointers to > primitive types, and those that do are either STRUCT_OPS or need > device bound program or have special checks requiring stack pointers. > > I declared a separate prog_tests/mem_rdonly_untrusted.c runner. Just skip it for now. Adding unpriv btf access can be a follow up.