From: Petr Pavlu <petr.pavlu@suse.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Gomez <da.gomez@samsung.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
Peter Zijlstra <peterz@infradead.org>,
Sami Tolvanen <samitolvanen@google.com>,
linux-modules@vger.kernel.org
Subject: Re: [PATCH 2/3] modpost: allow "make nsdeps" to skip module-specific symbol namespace
Date: Tue, 27 May 2025 09:55:45 +0200 [thread overview]
Message-ID: <e31cd61f-cd64-41ff-8111-95b871534b2b@suse.com> (raw)
In-Reply-To: <20250522071744.2362563-2-masahiroy@kernel.org>
On 5/22/25 09:17, Masahiro Yamada wrote:
> When MODULE_IMPORT_NS() is missing, "make nsdeps" runs the Coccinelle
> script to automatically add MODULE_IMPORT_NS() to each module.
>
> This should not occur for users of EXPORT_SYMBOL_GPL_FOR_MODULES(), which
> is intended to export a symbol to a specific module only. In such cases,
> explicitly adding MODULE_IMPORT_NS("module:...") is disallowed.
>
> This commit handles the latter case separately in order not to trigger
> the Coccinelle, and displays the error message:
>
> ERROR: modpost: module "foo" uses symbol "bar", which is exported only for module "baz"
>
> Apply the same logic for kernel space as well.
>
> Fixes: 092a4f5985f2 ("module: Add module specific symbol namespace support")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Looks ok to me.
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Does this patch make the following note about nsdeps in
Documentation/core-api/symbol-namespaces.rst (currently only in
linux-next) obsolete and can it now be removed?
"""
Note: it will happily generate an import statement for the module namespace;
which will not work and generates build and runtime failures.
"""
--
Thanks,
Petr
next prev parent reply other threads:[~2025-05-27 7:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 7:17 [PATCH 1/3] modpost: check forbidden MODULE_IMPORT_NS("module:") at compile time Masahiro Yamada
2025-05-22 7:17 ` [PATCH 2/3] modpost: allow "make nsdeps" to skip module-specific symbol namespace Masahiro Yamada
2025-05-27 7:55 ` Petr Pavlu [this message]
2025-05-22 7:17 ` [PATCH 3/3] docs/core-api/symbol-namespaces: drop table of contents and section numbering Masahiro Yamada
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=e31cd61f-cd64-41ff-8111-95b871534b2b@suse.com \
--to=petr.pavlu@suse.com \
--cc=da.gomez@samsung.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.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
all inboxes | Powered by JetHome®