[Bug default/28954] add Linux Kernel symbol namespace support
woodard at redhat dot com
sourceware-bugzilla@sourceware.org
Thu Mar 10 15:53:07 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=28954
--- Comment #1 from Ben Woodard <woodard at redhat dot com> ---
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.
>
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libabigail
mailing list