From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: "Alessandro Carminati (Red Hat)" <alessandro.carminati@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Daniel Bristot de Oliveira <bristot@kernel.org>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
"Luis Chamberlain" <mcgrof@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
Nicolas Schier <nicolas@fjasle.eu>,
Nick Alcock <nick.alcock@oracle.com>,
Kris Van Hees <kris.van.hees@oracle.com>,
Eugene Loh <eugene.loh@oracle.com>,
"Francis Laniel" <flaniel@linux.microsoft.com>,
Viktor Malik <vmalik@redhat.com>, <linux-kbuild@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>,
<live-patching@vger.kernel.org>
Subject: Re: [PATCH v3] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms
Date: Mon, 11 Sep 2023 16:21:10 +0200 [thread overview]
Message-ID: <d385548e-9788-2814-05c9-bb0f275b233f@intel.com> (raw)
In-Reply-To: <20230828080423.3539686-1-alessandro.carminati@gmail.com>
From: Alessandro Carminati (Red Hat) <alessandro.carminati@gmail.com>
Date: Mon, 28 Aug 2023 08:04:23 +0000
> From: Alessandro Carminati <alessandro.carminati@gmail.com>
>
> It is not uncommon for drivers or modules related to similar peripherals
> to have symbols with the exact same name.
[...]
> Changes from v2:
> - Alias tags are created by querying DWARF information from the vmlinux.
> - The filename + line number is normalized and appended to the original name.
> - The tag begins with '@' to indicate the symbol source.
> - Not a change, but worth mentioning, since the alias is added to the existing
> list, the old duplicated name is preserved, and the livepatch way of dealing
> with duplicates is maintained.
> - Acknowledging the existence of scenarios where inlined functions declared in
> header files may result in multiple copies due to compiler behavior, though
> it is not actionable as it does not pose an operational issue.
> - Highlighting a single exception where the same name refers to different
> functions: the case of "compat_binfmt_elf.c," which directly includes
> "binfmt_elf.c" producing identical function copies in two separate
> modules.
Oh, I thought you managed to handle this in v3 since you didn't reply in
the previous thread...
>
> sample from new v3
>
> ~ # cat /proc/kallsyms | grep gic_mask_irq
> ffffd0b03c04dae4 t gic_mask_irq
> ffffd0b03c04dae4 t gic_mask_irq@_drivers_irqchip_irq-gic_c_167
> ffffd0b03c050960 t gic_mask_irq
> ffffd0b03c050960 t gic_mask_irq@_drivers_irqchip_irq-gic-v3_c_404
BTW, why normalize them? Why not just
gic_mask_irq@drivers/irqchip/...
Aaaaand why line number? Line numbers break reproducible builds and also
would make it harder to refer to a particular symbol by its path and
name since we also have to pass its line number which may change once
you add a debug print there, for example.
OTOH there can't be 2 symbols with the same name within one file, so
just path + name would be enough. Or not?
(sorry if some of this was already discussed previously)
[...]
Thanks,
Olek
next prev parent reply other threads:[~2023-09-11 22:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 8:04 [PATCH v3] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms Alessandro Carminati (Red Hat)
2023-08-29 14:51 ` Francis Laniel
2023-09-02 7:26 ` Alessandro Carminati
2023-08-30 6:00 ` Masami Hiramatsu
2023-09-02 7:26 ` Alessandro Carminati
2023-09-03 14:50 ` Masami Hiramatsu
2023-09-01 5:31 ` Masahiro Yamada
2023-09-02 7:27 ` Alessandro Carminati
2023-09-02 6:36 ` Masahiro Yamada
2023-09-02 7:40 ` Alessandro Carminati
2023-09-04 13:09 ` Francis Laniel
2023-09-06 10:09 ` Alessandro Carminati
2023-09-06 15:06 ` Masahiro Yamada
2023-09-11 14:21 ` Alexander Lobakin [this message]
2023-09-12 14:18 ` Alessandro Carminati
2023-09-13 8:06 ` Petr Mladek
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=d385548e-9788-2814-05c9-bb0f275b233f@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=alessandro.carminati@gmail.com \
--cc=bristot@kernel.org \
--cc=eugene.loh@oracle.com \
--cc=flaniel@linux.microsoft.com \
--cc=jpoimboe@kernel.org \
--cc=kris.van.hees@oracle.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=mhiramat@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nick.alcock@oracle.com \
--cc=nicolas@fjasle.eu \
--cc=rostedt@goodmis.org \
--cc=vmalik@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox