All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andriin@fb.com>,
	Qais Yousef <qais.yousef@arm.com>,
	Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, Martin KaFai Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>
Subject: Re: [PATCH bpf-next] tools/resolve_btfids: Warn when having multiple IDs for single type
Date: Tue, 5 Jan 2021 11:37:09 -0800	[thread overview]
Message-ID: <CAADnVQJSry=o-GOPT0XL0=qGrikz=TuP=Wx7fHyiQVjLqMcOxA@mail.gmail.com> (raw)
In-Reply-To: <20210105153944.951019-1-jolsa@kernel.org>

On Tue, Jan 5, 2021 at 7:39 AM Jiri Olsa <jolsa@kernel.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.

  reply	other threads:[~2021-01-05 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 15:39 [PATCH bpf-next] tools/resolve_btfids: Warn when having multiple IDs for single type Jiri Olsa
2021-01-05 19:37 ` Alexei Starovoitov [this message]
2021-01-05 19:50   ` Jiri Olsa
2021-01-05 20:02     ` Alexei Starovoitov
2021-01-05 21:15 ` Andrii Nakryiko
2021-01-05 22:47   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAADnVQJSry=o-GOPT0XL0=qGrikz=TuP=Wx7fHyiQVjLqMcOxA@mail.gmail.com' \
    --to=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=netdev@vger.kernel.org \
    --cc=qais.yousef@arm.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.