bpf: make struct_ops_map support btfs other than btf_vmlinux.
authorKui-Feng Lee <thinker.li@gmail.com>
Fri, 19 Jan 2024 22:49:56 +0000 (14:49 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 24 Jan 2024 00:37:44 +0000 (16:37 -0800)
commit47f4f657acd5d04c78c5c5ac7022cba9ce3b4a7d
tree5b68fada69c50bef366af6a183fa544887cdab12
parente61995111a76633376419d1bccede8696e94e6e5
bpf: make struct_ops_map support btfs other than btf_vmlinux.

Once new struct_ops can be registered from modules, btf_vmlinux is no
longer the only btf that struct_ops_map would face.  st_map should remember
what btf it should use to get type information.

Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240119225005.668602-6-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
kernel/bpf/bpf_struct_ops.c