Thread (6 messages) flat view 6 messages, 4 authors, 2021-01-05

Re: [PATCH bpf-next] tools/resolve_btfids: Warn when having multiple IDs for single type

From: Alexei Starovoitov <hidden>
Date: 2021-01-05 19:38:04
Also in: bpf

On Tue, Jan 5, 2021 at 7:39 AM Jiri Olsa [off-list ref] wrote:
The kernel image can contain multiple types (structs/unions)
with the same name. This causes distinct type hierarchies in
BTF data and makes resolve_btfids fail with error like:

  BTFIDS  vmlinux
FAILED unresolved symbol udp6_sock

as reported by Qais Yousef [1].

This change adds warning when multiple types of the same name
are detected:

  BTFIDS  vmlinux
WARN: multiple IDs found for 'file' (526, 113351)
WARN: multiple IDs found for 'sk_buff' (2744, 113958)

We keep the lower ID for the given type instance and let the
build continue.
I think it would make sense to mention this decision in the warning.
'WARN: multiple IDs' is ambiguous and confusing when action is not specified.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help