[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e59a27d-8393-48b4-9c44-800499498afb@amd.com>
Date: Tue, 8 Jul 2025 13:25:47 +0530
From: Shivank Garg <shivankg@....com>
To: Vlastimil Babka <vbabka@...e.cz>, 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>
Cc: Christoph Hellwig <hch@...radead.org>,
Peter Zijlstra <peterz@...radead.org>, David Hildenbrand <david@...hat.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 2/2] module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to
EXPORT_SYMBOL_FOR_MODULES
On 7/8/2025 12:58 PM, Vlastimil Babka wrote:
> With module namespace access restricted to in-tree modules, the GPL
> requirement becomes implied. Drop it from the name of the export helper.
>
> Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
> ---
> Documentation/core-api/symbol-namespaces.rst | 6 +++---
> fs/anon_inodes.c | 2 +-
> include/linux/export.h | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/core-api/symbol-namespaces.rst
> index dc228ac738a5cdc49cc736c29170ca96df6a28dc..aafbc0469cd6a4b76225e0e96a86025de512008e 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.
> @@ -88,7 +88,7 @@ Simple tail-globs are supported.
>
> For example::
>
> - EXPORT_SYMBOL_GPL_FOR_MODULES(preempt_notifier_inc, "kvm,kvm-*")
> + EXPORT_SYMBOL_FOR_MODULES(preempt_notifier_inc, "kvm,kvm-*")
>
> will limit usage of this symbol to in-tree modules whoes name matches the given
> patterns.
> diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
> index 1d847a939f29a41356af3f12e5f61372ec2fb550..180a458fc4f74249d674ec3c6e01277df1d9e743 100644
> --- a/fs/anon_inodes.c
> +++ b/fs/anon_inodes.c
> @@ -129,7 +129,7 @@ struct inode *anon_inode_make_secure_inode(struct super_block *sb, const char *n
> }
> return inode;
> }
> -EXPORT_SYMBOL_GPL_FOR_MODULES(anon_inode_make_secure_inode, "kvm");
> +EXPORT_SYMBOL_FOR_MODULES(anon_inode_make_secure_inode, "kvm");
>
> static struct file *__anon_inode_getfile(const char *name,
> const struct file_operations *fops,
> diff --git a/include/linux/export.h b/include/linux/export.h
> index f35d03b4113b19798036d2993d67eb932ad8ce6f..a686fd0ba406509da5f397e3a415d05c5a051c0d 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -91,6 +91,6 @@
> #define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", ns)
> #define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "GPL", ns)
>
> -#define EXPORT_SYMBOL_GPL_FOR_MODULES(sym, mods) __EXPORT_SYMBOL(sym, "GPL", "module:" mods)
> +#define EXPORT_SYMBOL_FOR_MODULES(sym, mods) __EXPORT_SYMBOL(sym, "GPL", "module:" mods)
>
> #endif /* _LINUX_EXPORT_H */
>
LGTM!
Reviewed-by: Shivank Garg <shivankg@....com>
Thanks,
Shivank
Powered by blists - more mailing lists