Linux-Modules Archive on lore.kernel.org
 help / color / Atom feed
From: Matthias Maennich <maennich@google.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.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: Re: [PATCH v2 0/4] export/modpost: avoid renaming __ksymtab entries for symbol namespaces
Date: Thu, 24 Oct 2019 10:35:46 +0100
Message-ID: <20191024093546.GB199239@google.com> (raw)
In-Reply-To: <20191023122222.GA27861@42.do-not-panic.com>

On Wed, Oct 23, 2019 at 12:22:22PM +0000, Luis Chamberlain wrote:
>On Fri, Oct 18, 2019 at 10:31:39AM +0100, Matthias Maennich wrote:
>> 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.
>
>Why have this as a default feature? What about having an option to
>disable this feature? The benefit being that without a full swing of
>tests to avoid regressions its not clear what other issues may creep
>up. With this as optional, those wanting the mechanism can enable it
>and happilly find the issues for those more conservative.

The strongest argument against that is, that the 'conservative' people
would constantly break things for the more 'adventurous' ones. They
would introduce namespace requirements by just using symbols without
correctly adjusting the imports.

Second, vmlinux and modules would have to be compiled in the same
configuration. Otherwise they are incompatible and we would likely have
to maintain code in the module loader to catch issues caused by that.
In general, I think for the adoption of this feature and one of its
purposes - making unexpected use of symbols across the tree visible
already at review time - we should not make this an optional one.
Enforcing the imports at module load time is optional (there is an
option).

And finally, having that code configurable for both options introduces
quite some complexity in kernel/module.c, modpost and
include/linux/export.h that would make the code hard to maintain and
complex to test. Hence that would likely introduce more issues.

I know the feature came with some rough edges. Sorry about that. I
think, we got most of them worked out pretty well (big thanks to
Masahiro and Jessica and others helping with that). Now the actual
change to the surface exposed to userland tools is much smaller and the
feature itself less intrusive.

Cheers,
Matthias

>
>  Luis

  reply index

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:14 [PATCH " 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
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 [this message]
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=20191024093546.GB199239@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=mcgrof@kernel.org \
    --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