lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQ+PvG+aiKyhtf3Q7U6=6w_uehQ436k+K8fLvf4DD6VLnw@mail.gmail.com>
Date:   Tue, 5 Jan 2021 18:21:21 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...omium.org>,
        Qais Yousef <qais.yousef@....com>
Subject: Re: [PATCHv2 bpf-next] tools/resolve_btfids: Warn when having
 multiple IDs for single type

On Tue, Jan 5, 2021 at 3:42 PM Jiri Olsa <jolsa@...nel.org> 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@...nel.org>
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
> v2 changes:
>   - changed the warning message [Alexei]
>   - renamed 'nr' to 'nr_types' [Andrii]

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ