From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Matthias Maennich <maennich@google.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Cc: Android Kernel" <kernel-team@android.com>,
Jessica Yu <jeyu@kernel.org>, Martijn Coenen <maco@android.com>,
Lucas De Marchi <lucas.de.marchi@gmail.com>,
Shaun Ruffell <sruffell@sruffell.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Will Deacon <will@kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
linux-modules <linux-modules@vger.kernel.org>
Subject: Re: [PATCH 3/4] symbol namespaces: revert to previous __ksymtab name scheme
Date: Sat, 12 Oct 2019 12:35:47 +0900 [thread overview]
Message-ID: <CAK7LNASMn9GY2dzVvouDW5MfqR3M1pEkWM73quh1HKb_XW1L4g@mail.gmail.com> (raw)
In-Reply-To: <20191010151443.7399-4-maennich@google.com>
On Fri, Oct 11, 2019 at 12:16 AM Matthias Maennich <maennich@google.com> wrote:
>
> The introduction Symbol Namespaces changed the naming schema of the
> __ksymtab entries from __kysmtab__symbol to __ksymtab_NAMESPACE.symbol.
>
> That caused some breakages in tools that depend on the name layout in
> either the binaries(vmlinux,*.ko) or in System.map. E.g. kmod's depmod
> would not be able to read System.map without a patch to support symbol
> namespaces. A warning reported by depmod for namespaced symbols would
> look like
>
> depmod: WARNING: [...]/uas.ko needs unknown symbol usb_stor_adjust_quirks
>
> In order to address this issue, revert to the original naming scheme and
> rather read the __kstrtabns_<symbol> entries and their corresponding
> values from __ksymtab_strings to update the namespace values for
> symbols. After having read all symbols and handled them in
> handle_modversions(), the symbols are created. In a second pass, read
> the __kstrtabns_ entries and update the namespaces accordingly.
>
> Suggested-by: Jessica Yu <jeyu@kernel.org>
> Fixes: 8651ec01daed ("module: add support for symbol namespaces.")
> Signed-off-by: Matthias Maennich <maennich@google.com>
According to https://lore.kernel.org/patchwork/patch/1135222/
was this problem reported by Stefan?
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
BTW, I initially suggested this way of fixing.
Suggested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> @@ -74,9 +72,8 @@ struct kernel_symbol {
> int namespace_offset;
> };
> #else
> -#define __KSYMTAB_ENTRY_NS(sym, sec, ns) \
> - static const struct kernel_symbol __ksymtab_##sym##__##ns \
> - asm("__ksymtab_" #ns NS_SEPARATOR #sym) \
For consistency, you could also delete asm("__ksymtab_" #sym)
by this patch instead of by 4/4.
Not a big deal, though.
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2019-10-12 3:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 15:14 [PATCH 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces Matthias Maennich
2019-10-10 15:14 ` [PATCH 1/4] modpost: delegate updating namespaces to separate function Matthias Maennich
2019-10-11 14:24 ` Will Deacon
2019-10-11 15:32 ` Greg Kroah-Hartman
2019-10-12 3:19 ` Masahiro Yamada
2019-10-10 15:14 ` [PATCH 2/4] modpost: make updating the symbol namespace explict Matthias Maennich
2019-10-11 14:24 ` Will Deacon
2019-10-11 15:33 ` Greg Kroah-Hartman
2019-10-12 3:22 ` Masahiro Yamada
2019-10-10 15:14 ` [PATCH 3/4] symbol namespaces: revert to previous __ksymtab name scheme Matthias Maennich
2019-10-11 14:24 ` Will Deacon
2019-10-11 15:33 ` Greg Kroah-Hartman
2019-10-12 3:35 ` Masahiro Yamada [this message]
2019-10-10 15:14 ` [PATCH 4/4] export: avoid code duplication in include/linux/export.h Matthias Maennich
2019-10-11 15:31 ` Greg Kroah-Hartman
2019-10-11 15:43 ` Matthias Maennich
2019-10-12 4:25 ` Masahiro Yamada
2019-10-18 9:31 ` [PATCH v2 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces Matthias Maennich
2019-10-18 9:31 ` [PATCH v2 1/4] modpost: delegate updating namespaces to separate function Matthias Maennich
2019-10-18 9:31 ` [PATCH v2 2/4] modpost: make updating the symbol namespace explicit Matthias Maennich
2019-10-18 9:31 ` [PATCH v2 3/4] symbol namespaces: revert to previous __ksymtab name scheme Matthias Maennich
2019-10-18 9:31 ` [PATCH v2 4/4] export: avoid code duplication in include/linux/export.h Matthias Maennich
2019-10-21 13:31 ` [PATCH v2 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces Jessica Yu
2019-10-23 12:22 ` Luis Chamberlain
2019-10-24 9:35 ` Matthias Maennich
2019-10-24 10:24 ` Luis Chamberlain
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=CAK7LNASMn9GY2dzVvouDW5MfqR3M1pEkWM73quh1HKb_XW1L4g@mail.gmail.com \
--to=yamada.masahiro@socionext.com \
--cc=gregkh@linuxfoundation.org \
--cc=jeyu@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=maco@android.com \
--cc=maennich@google.com \
--cc=sruffell@sruffell.net \
--cc=will@kernel.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 NNTP newsgroup(s).