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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQLf426mmqofhnA2eD7dAsG+DTaAM5GueS9PTqq0ooxf5g@mail.gmail.com>
Date:   Tue, 5 Jan 2021 12:02:04 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Jiri Olsa <jolsa@...nel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andriin@...com>,
        Qais Yousef <qais.yousef@....com>,
        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>
Subject: Re: [PATCH bpf-next] tools/resolve_btfids: Warn when having multiple
 IDs for single type

On Tue, Jan 5, 2021 at 11:50 AM Jiri Olsa <jolsa@...hat.com> wrote:
>
> On Tue, Jan 05, 2021 at 11:37:09AM -0800, Alexei Starovoitov wrote:
> > On Tue, Jan 5, 2021 at 7:39 AM 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)
> > > 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.
>
> ok, how about:
>
> WARN: multiple IDs found for 'file': 526, 113351 - using 526

yep. much better imo.
Please add a comment to .c file with the suggestion that such types should
be renamed to avoid ambiguity.
Adding 'please rename' to WARN is probably overkill.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ