From: Jessica Yu <jeyu@kernel.org>
To: Martijn Coenen <maco@android.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <michal.lkml@markovi.net>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
the arch/x86 maintainers <x86@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Oliver Neukum <oneukum@suse.com>, Arnd Bergmann <arnd@arndb.de>,
Stephen Boyd <sboyd@codeaurora.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Sam Ravnborg <sam@ravnborg.org>,
linux-kbuild@vger.kernel.org,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
USB list <linux-usb@vger.kernel.org>,
USB Storage list <usb-storage@lists.one-eyed-alien.net>,
linux-scsi@vger.kernel.org,
Linux-Arch <linux-arch@vger.kernel.org>,
Martijn Coenen <maco@google.com>,
Sandeep Patil <sspatil@google.com>,
Iliyan Malchev <malchev@google.com>,
Joel Fernandes <joelaf@google.com>
Subject: [2/6] module: add support for symbol namespaces.
Date: Mon, 23 Jul 2018 13:12:51 +0200 [thread overview]
Message-ID: <20180723111251.x2cam6bcuglr4hhz@linux-8ccs> (raw)
+++ Martijn Coenen [20/07/18 17:42 +0200]:
>On Fri, Jul 20, 2018 at 4:49 PM, Jessica Yu <jeyu@kernel.org> wrote:
>> Thanks. Also, it looks like we're currently just warning (in both
>> modpost and on module load) if a module uses symbols from a namespace
>> it doesn't import. Are you also planning to eventually introduce
>> namespace enforcement?
>
>This is something I've definitely been thinking about, and was curious
>what others would think. My main concern with enforcement is that it
>will start failing to load out-of-tree modules that use newly
>namespaced symbols. On the other hand, I think those modules will need
>to be rebuilt anyway to be able to load, because the changes to struct
>kernel_symbol make them incompatible with the current kernel. That
>could be another reason for having these symbols in a special section
>(with its own struct namespaced_kernel_symbol); but on the other hand,
>it would make the module loader more complex just to facilitate
>out-of-tree drivers, and I'm not sure where the trade-off between
>those two falls.
IMO I don't think we should bend over backwards to accommodate
out-of-tree modules - modifying the module loader to recognize even
more special sections to accommodate these OOT modules would be where
we'd draw the line I think.
>> It'd be trivial to fail the module build in
>> modpost as well as reject the module on load if it uses an exported
>> symbol belonging to a namespace it doesn't import. Although, I'd go
>> with the warnings for a development cycle or two, to gently introduce
>> the change in API and let other subsystems as well as out-of-tree
>> module developers catch up.
>
>An approach like that makes sense to me. Another alternative would be
>to make it a CONFIG_ option, and let distros/etc. decide what they are
>comfortable with.
I think going forward I would prefer to have export namespaces to be a
normal and regular part of kernel API (as in, we shouldn't require a
new option for it), and that the warnings for 1-2 cycles are courteous
enough - but anyone with stronger opinions about this should speak up.
Thanks,
Jessica
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-07-23 11:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 11:12 Jessica Yu [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-26 7:44 [2/6] module: add support for symbol namespaces Martijn Coenen
2018-07-25 16:48 Lucas De Marchi
2018-07-25 15:55 Jessica Yu
2018-07-24 7:56 Martijn Coenen
2018-07-24 7:44 Martijn Coenen
2018-07-20 15:42 Martijn Coenen
2018-07-20 14:49 Jessica Yu
2018-07-20 7:54 Martijn Coenen
2018-07-19 16:32 Jessica Yu
2018-07-16 12:21 Martijn Coenen
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=20180723111251.x2cam6bcuglr4hhz@linux-8ccs \
--to=jeyu@kernel.org \
--cc=arnd@arndb.de \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=joelaf@google.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=maco@android.com \
--cc=maco@google.com \
--cc=malchev@google.com \
--cc=michal.lkml@markovi.net \
--cc=mingo@redhat.com \
--cc=oneukum@suse.com \
--cc=pombredanne@nexb.com \
--cc=sam@ravnborg.org \
--cc=sboyd@codeaurora.org \
--cc=sspatil@google.com \
--cc=stern@rowland.harvard.edu \
--cc=tglx@linutronix.de \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=x86@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
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