Linux-Modules Archive on lore.kernel.org
 help / color / Atom feed
From: Matthias Maennich <maennich@google.com>
To: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com, maennich@google.com,
	Jessica Yu <jeyu@kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	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@vger.kernel.org, linux-modules@vger.kernel.org
Subject: [PATCH 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces
Date: Thu, 10 Oct 2019 16:14:39 +0100
Message-ID: <20191010151443.7399-1-maennich@google.com> (raw)

The introduction of the symbol namespace patches changed the way symbols are
named in the ksymtab entries. That caused userland tools to fail (such as
kmod's depmod). As depmod is used as part of the kernel build it was worth
having another look whether this name change can be avoided.

The main purpose of this series is to restore the original ksymtab entry names.
For that to happen and to remove some rough edges around that, the relevant
parts in modpost got a small refactoring as to when and how namespaces are
evaluated and set in the symbol struct.

Eventually, the namespace values can be read from __kstrtabns_ entries and
their corresponding __ksymtab_strings values. That removes the need to carry
the namespace names within the (anyway unique) symbol name entries.

The last patch of this series is adopted from Masahiro [1]. By allowing 'no
namespace' to be represented as empty string, large chunks of
include/linux/export.h could be consolidated. Technically, this last patch is
not absolutely necessary to fix functionality. It addresses concerns about
maintainability and readability. While I strongly suggest sending all of the
patches for 5.4, the last one could possible deferred to the next merge window.

This patch applies to the modules-linus [2] branch.

[1] https://lore.kernel.org/lkml/20190927093603.9140-5-yamada.masahiro@socionext.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git/log/?h=modules-linus

Cc: Jessica Yu <jeyu@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Shaun Ruffell <sruffell@sruffell.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Will Deacon <will@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-modules@vger.kernel.org


Matthias Maennich (4):
  modpost: delegate updating namespaces to separate function
  modpost: make updating the symbol namespace explict
  symbol namespaces: revert to previous __ksymtab name scheme
  export: avoid code duplication in include/linux/export.h

 include/linux/export.h | 97 +++++++++++++-----------------------------
 kernel/module.c        |  2 +-
 scripts/mod/modpost.c  | 58 ++++++++++++++++---------
 scripts/mod/modpost.h  |  1 +
 4 files changed, 69 insertions(+), 89 deletions(-)

-- 
2.23.0.581.g78d2f28ef7-goog


             reply index

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:14 Matthias Maennich [this message]
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
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 publically 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=20191010151443.7399-1-maennich@google.com \
    --to=maennich@google.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=sruffell@sruffell.net \
    --cc=will@kernel.org \
    --cc=yamada.masahiro@socionext.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

Linux-Modules Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-modules/0 linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ https://lore.kernel.org/linux-modules \
		linux-modules@vger.kernel.org
	public-inbox-index linux-modules

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-modules


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git