bpf: btf: Support flags for BTF_SET8 sets
authorDaniel Xu <dxu@dxuuu.xyz>
Mon, 29 Jan 2024 01:24:06 +0000 (18:24 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 31 Jan 2024 20:05:24 +0000 (12:05 -0800)
commit79b47344bbc5a693a92ed6b2b09dac59254bfac8
treee4c178e4c0ba6bed66b699a815c7289301b21b37
parent2ef61296d2844c6a4211e07ab70ef2fb412b2c30
bpf: btf: Support flags for BTF_SET8 sets

This commit adds support for flags on BTF_SET8s. struct btf_id_set8
already supported 32 bits worth of flags, but was only used for
alignment purposes before.

We now use these bits to encode flags. The first use case is tagging
kfunc sets with a flag so that pahole can recognize which
BTF_ID_FLAGS(func, ..) are actual kfuncs.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Link: https://lore.kernel.org/r/7bb152ec76d6c2c930daec88e995bf18484a5ebb.1706491398.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/btf_ids.h