Re: [PATCH v2] percpu: do not put btf_type_tag on per-cpu variable declarations
From: Alexei Starovoitov
Date: Fri Dec 04 2026 - 16:07:55 EST
On Thu, Dec 03, 2026 at 04:00 PM Vineet Gupta <vineet.gupta@xxxxxxxxx> wrote:
> The verifier would not use them anyway. It finds a per-cpu variable
> through the .data..percpu DATASEC, not through a tag, and it reads the
> percpu tag only on attach function arguments and struct members.
>
> They come from typecasts: the accessor macros cast to the type of &var
> in __verify_pcpu_ptr():
>
> const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;
I see.
Pls explain that bit in commit log.
> So it would have to wrap each per-cpu declaration of a struct or union
> type, about 650 of them, at which point we might as well do
> -Wno-attributes for the whole kernel.
fair. No pragmas then.
Pls respin as [PATCH bpf-next v3] and cc build folks.
pw-bot: cr