bpf: verifier: Rename kernel_type_name helper to btf_type_name
authorDave Marchevsky <davemarchevsky@fb.com>
Thu, 9 Mar 2023 18:01:06 +0000 (10:01 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 10 Mar 2023 20:16:37 +0000 (12:16 -0800)
commitb32a5dae44cc7346835839c2e92356ff4609c823
treef4c77d5477716ac94e19ec71e08654982b7d34a7
parent4659fba121dac21a3516986a3c2cf8459c7ac3bc
bpf: verifier: Rename kernel_type_name helper to btf_type_name

kernel_type_name was introduced in commit 9e15db66136a ("bpf: Implement accurate raw_tp context access via BTF")
with type signature:

  const char *kernel_type_name(u32 id)

At that time the function used global btf_vmlinux BTF for all id lookups. Later,
in commit 22dc4a0f5ed1 ("bpf: Remove hard-coded btf_vmlinux assumption from BPF verifier"),
the type signature was changed to:

  static const char *kernel_type_name(const struct btf* btf, u32 id)

With the btf parameter used for lookups instead of global btf_vmlinux.

The helper will function as expected for type name lookup using non-kernel BTFs,
and will be used for such in further patches in the series. Let's rename it to
avoid incorrect assumptions that might arise when seeing the current name.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/r/20230309180111.1618459-2-davemarchevsky@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c