From: Ben Woodard <woodard@redhat.com>
To: gprocida at google dot com <sourceware-bugzilla@sourceware.org>
Cc: libabigail@sourceware.org
Subject: Re: [Bug default/28954] New: add Linux Kernel symbol namespace support
Date: Thu, 10 Mar 2022 07:52:19 -0800 [thread overview]
Message-ID: <713ACA03-1A66-4BE8-9EA8-5ECA0C478A46@redhat.com> (raw)
In-Reply-To: <bug-28954-9487@http.sourceware.org/bugzilla/>
I’m a little confused by this the LKM name spacing doesn’t seem to use any of the symbol mangling that C++ does. From the links that you posted it seems like the way that the kernel mangles these names is simply by putting “.<subsystem>” into the ELF linkage name. This confuses me because, I would think that this change in linkage name would show up in ABI reports but your bug description below suggests that it doesn’t. I must be missing something.
-ben
> On Mar 10, 2022, at 5:26 AM, gprocida at google dot com via Libabigail <libabigail@sourceware.org> wrote:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28954
>
> Bug ID: 28954
> Summary: add Linux Kernel symbol namespace support
> Product: libabigail
> Version: unspecified
> Status: UNCONFIRMED
> Severity: normal
> Priority: P2
> Component: default
> Assignee: dodji at redhat dot com
> Reporter: gprocida at google dot com
> CC: libabigail at sourceware dot org
> Target Milestone: ---
>
> Hi.
>
> We have started to see Linux kernel symbol namespace changes break module
> loading, without being picked up by ABI monitoring beforehand.
>
> If a symbol has a namespace, then any module attempting to use it (run-time
> load check) must have imported (compile-time) the namespace. Load failure can
> be commuted to a warning but I doubt we would do that for Android.
>
> In terms of ABI monitoring, a change to a symbol's namespace should be reported
> as an ABI diff.
>
> While it might also be nice to store the imported namespaces per module (at the
> abg-corpus level), without also tracking undefined symbols this wouldn't allow
> any automatic checking of kernel / module compatibility. Also, there is a
> compile-time check that does that anyway. We are trying to ensure that
> separately built kernel and modules will (continue to) work together.
>
> At a minimum we need the following:
>
> * new ELF symbol XML attribute (and possible documentation update)
> * new field in ELF symbol
> * symtab reader changes to populate this
> * XML writer change to print this
> * XML reader change to read this
> * categorisation of symbol namespace changes (probably the same as for CRCs)
> * symbol namespace diff generation / reporting
>
> I'm happy to start work on this, but would welcome any early feedback.
>
> References
>
> https://www.kernel.org/doc/html/latest/core-api/symbol-namespaces.html
> https://lwn.net/Articles/760045/
> https://lpc.events/event/2/contributions/220/attachments/44/51/01._Symbol_Namespaces__Plumbers_v2.pdf
>
> Giuliano.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
next prev parent reply other threads:[~2022-03-10 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 13:25 gprocida at google dot com
2022-03-10 15:52 ` Ben Woodard [this message]
2022-03-10 15:53 ` [Bug default/28954] " woodard at redhat dot com
2022-03-10 16:25 ` gprocida at google dot com
2022-03-10 17:25 ` gprocida at google dot com
2022-03-11 12:20 ` maennich at android dot com
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=713ACA03-1A66-4BE8-9EA8-5ECA0C478A46@redhat.com \
--to=woodard@redhat.com \
--cc=libabigail@sourceware.org \
--cc=sourceware-bugzilla@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).