From: Alexei Starovoitov use_nonstatic_global_other_sec() is an fentry prog, so it has to return 0. It returns the result of the global function __nonstatic_global(), which always returns 0. Before llvm commit 28b4a2032f97 ("[BPF] Mark global functions noipa") the compiler replaced the result of the call with 0. Now it does not look into a global function. The verifier does not either: 11: (85) call pc+1 Func#1 ('__nonstatic_global') is global and assumed valid. 12: R0=scalar() 12: (95) exit At program exit the register R0 has unknown scalar value should have been in [0, 0] The skeleton does not load, and all subtests of bpf_gotox fail. Only the cpuv4 flavour shows it: the other flavours have no gotox and skip the test. Ignore the result of the call and return 0. Commit fdda033f7fb5 ("selftests/bpf: Fix callback recursion test with noipa global func") fixed the same problem in another test. Signed-off-by: Alexei Starovoitov --- tools/testing/selftests/bpf/progs/bpf_gotox.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/bpf_gotox.c b/tools/testing/selftests/bpf/progs/bpf_gotox.c index 99b3c9c9a01c..f3488d7b4b4c 100644 --- a/tools/testing/selftests/bpf/progs/bpf_gotox.c +++ b/tools/testing/selftests/bpf/progs/bpf_gotox.c @@ -418,7 +418,8 @@ int use_nonstatic_global_other_sec(void *ctx) if (bpf_get_current_pid_tgid() >> 32 != pid) return 0; - return __nonstatic_global(in_user); + __nonstatic_global(in_user); + return 0; } SEC("syscall") -- 2.55.0