Re: [PATCH 6.8 196/715] bpf: don't infer PTR_TO_CTX for programs with unnamed context type

From: Miguel Ojeda
Date: Mon Mar 25 2024 - 10:41:35 EST


Hi Sasha, all,

I got this one while built-testing 6.8.y for LoongArch with Rust enabled:

kernel/bpf/btf.c:5690:10: error: expression which evaluates to zero treated as a null pointer constant of type 'const struct btf_type *' [-Werror,-Wnon-literal-null-conversion]
5690 | return false;
| ^~~~~

Upstream fb5b86cfd4ef ("bpf: simplify btf_get_prog_ctx_type() into btf_is_prog_ctx_type()") changed the function into another one, including its return type to `bool`, so it seems that one is a stable dep or perhaps making it return `NULL` here.

Hope that helps!

Cheers,
Miguel