OSDN Git Service

libbpf: report vmlinux vs module name when dealing with ksyms
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 18 Apr 2023 00:21:44 +0000 (17:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 18 Apr 2023 19:45:10 +0000 (12:45 -0700)
commitf709160d1724a4be469b985dcaadaa2aa8d5ce94
tree88fd7880080791f6d7891ae3b251c707308d8235
parent3055ddd654f65ebdd7860b4dfecd7e49e54c01b7
libbpf: report vmlinux vs module name when dealing with ksyms

Currently libbpf always reports "kernel" as a source of ksym BTF type,
which is ambiguous given ksym's BTF can come from either vmlinux or
kernel module BTFs. Make this explicit and log module name, if used BTF
is from kernel module.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230418002148.3255690-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c