From: Shivank Garg <shivankg@amd.com>
To: Vlastimil Babka <vbabka@suse.cz>,
Matthias Maennich <maennich@google.com>,
Jonathan Corbet <corbet@lwn.net>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Sami Tolvanen <samitolvanen@google.com>,
Daniel Gomez <da.gomez@samsung.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>,
Peter Zijlstra <peterz@infradead.org>,
David Hildenbrand <david@redhat.com>,
"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES
Date: Tue, 8 Jul 2025 13:25:47 +0530 [thread overview]
Message-ID: <7e59a27d-8393-48b4-9c44-800499498afb@amd.com> (raw)
In-Reply-To: <20250708-export_modules-v1-2-fbf7a282d23f@suse.cz>
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@suse.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@amd.com>
Thanks,
Shivank
next prev parent reply other threads:[~2025-07-08 7:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 7:28 [PATCH 0/2] Restrict module namespace to in-tree modules and rename macro Vlastimil Babka
2025-07-08 7:28 ` [PATCH 1/2] module: Restrict module namespace access to in-tree modules Vlastimil Babka
2025-07-08 7:54 ` Shivank Garg
2025-07-08 12:41 ` Masahiro Yamada
2025-07-08 15:08 ` Vlastimil Babka
2025-07-08 15:35 ` Masahiro Yamada
2025-07-08 13:03 ` Petr Pavlu
2025-07-08 19:22 ` Nicolas Schier
2025-07-08 7:28 ` [PATCH 2/2] module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES Vlastimil Babka
2025-07-08 7:55 ` Shivank Garg [this message]
2025-07-08 7:40 ` [PATCH 0/2] Restrict module namespace to in-tree modules and rename macro Christian Brauner
2025-07-08 7:43 ` David Hildenbrand
2025-07-11 17:16 ` David Laight
2025-07-08 7:49 ` Stephen Rothwell
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=7e59a27d-8393-48b4-9c44-800499498afb@amd.com \
--to=shivankg@amd.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=da.gomez@samsung.com \
--cc=david@redhat.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jirislaby@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=maennich@google.com \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
--cc=peterz@infradead.org \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=sfr@canb.auug.org.au \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
/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