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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 5, 2021 at 3:42 PM Jiri Olsa <jolsa@xxxxxxxxxx> 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 - using 526
> WARN: multiple IDs found for 'sk_buff': 2744, 113958 - using 2744
>
> We keep the lower ID for the given type instance and let the
> build continue.
>
> Also changing the 'nr' variable name to 'nr_types' to avoid confusion.
>
> [1] https://lore.kernel.org/lkml/20201229151352.6hzmjvu3qh6p2qgg@e107158-lin/
> Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> ---
> v2 changes:
>   - changed the warning message [Alexei]
>   - renamed 'nr' to 'nr_types' [Andrii]

Applied to bpf tree. I think it's more appropriate there.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux