Re: [PATCH bpf-next v1 8/8] resolve_btfids: Enforce consistent kfunc flags across BTF ID sets

Eduard Zingerman <[email protected]> Tue, 28 Jul 2026 18:40:46 -0700
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.bpf
Message-ID <[email protected]>
eOn Wed, 2026-07-22 at 16:35 -0700, Ihor Solodrai wrote:
> A kfunc may be listed in several BTF ID sets, which is expected
> because different kfuncs are available to BPF programs depending on
> their type.
> 
> However kfunc flags across different BTF ID sets must be consistent [1].
> The flags should be considered a part of the kfunc declaration,
> because they influence its BTF representation and verifier handling.
> 
> Enforce the kfunc flag consistency in resolve_btifds by hard failing
> on error and blocking kernel (or module) build.
> 
> [1] https://lore.kernel.org/bpf/[email protected]/
> 
> Signed-off-by: Ihor Solodrai <[email protected]>
> ---

Reviewed-by: Eduard Zingerman <[email protected]>

...