[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <678290fe-f171-4680-82bd-fa50e5fde7a4@suse.cz>
Date: Mon, 14 Jul 2025 09:09:40 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Daniel Gomez <da.gomez@...nel.org>
Cc: Matthias Maennich <maennich@...gle.com>, Jonathan Corbet
<corbet@....net>, Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>, Sami Tolvanen <samitolvanen@...gle.com>,
Daniel Gomez <da.gomez@...sung.com>, Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
Christoph Hellwig <hch@...radead.org>, Peter Zijlstra
<peterz@...radead.org>, David Hildenbrand <david@...hat.com>,
Shivank Garg <shivankg@....com>, "Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
Stephen Rothwell <sfr@...b.auug.org.au>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v2] module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to
EXPORT_SYMBOL_FOR_MODULES
On 7/13/25 10:31, Greg Kroah-Hartman wrote:
> On Sat, Jul 12, 2025 at 08:26:17PM +0200, Daniel Gomez wrote:
>> On 11/07/2025 16.05, Vlastimil Babka wrote:
>> > Changes in v2:
>> > - drop the patch to restrict module namespace export for in-tree modules
>> > - fix a pre-existing documentation typo (Nicolas Schier)
>> > - Link to v1: https://patch.msgid.link/20250708-export_modules-v1-0-fbf7a282d23f@suse.cz
>> > ---
>> > Documentation/core-api/symbol-namespaces.rst | 8 ++++----
>> > fs/anon_inodes.c | 2 +-
>> > include/linux/export.h | 2 +-
>> > 3 files changed, 6 insertions(+), 6 deletions(-)
>> >
>> > diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/core-api/symbol-namespaces.rst
>> > index 32fc73dc5529e8844c2ce2580987155bcd13cd09..6f7f4f47d43cdeb3b5008c795d254ca2661d39a6 100644
>> > --- a/Documentation/core-api/symbol-namespaces.rst
>> > +++ b/Documentation/core-api/symbol-namespaces.rst
>> > @@ -76,8 +76,8 @@ A second option to define the default namespace is directly in the compilation
>> > within the corresponding compilation unit before the #include for
>> > <linux/export.h>. Typically it's placed before the first #include statement.
>> >
>> > -Using the EXPORT_SYMBOL_GPL_FOR_MODULES() macro
>> > ------------------------------------------------
>> > +Using the EXPORT_SYMBOL_FOR_MODULES() macro
>> > +-------------------------------------------
>> >
>> > Symbols exported using this macro are put into a module namespace. This
>> > namespace cannot be imported.
>>
>> The new naming makes sense, but it breaks the pattern with _GPL suffix:
>>
>> * EXPORT_SYMBOL(sym)
>> * EXPORT_SYMBOL_GPL(sym)
>> * EXPORT_SYMBOL_NS(sym, ns)
>> * EXPORT_SYMBOL_NS_GPL(sym, ns)
>> * EXPORT_SYMBOL_FOR_MODULES(sym, mods)
>>
>> So I think when reading this one may forget about the _obvious_ reason. That's
>> why I think clarifying that in the documentation would be great. Something like:
>>
>> Symbols exported using this macro are put into a module namespace. This
>> namespace cannot be imported. And it's implicitly GPL-only as it's only intended
>> for in-tree modules.
>
> s/implicitly/explicitly/
>From the point of the macro name,
it was explicit with "EXPORT_SYMBOL_GPL_FOR_MODULES()"
it's implicit with "EXPORT_SYMBOL_FOR_MODULES()"
> thanks,
>
> greg k-h
Powered by blists - more mailing lists