linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES()
       [not found] <20250825-export_modules_fix-v1-1-5c331e949538@suse.cz>
@ 2025-08-25 15:33 ` Nicolas Schier
       [not found] ` <20250825170710.GC2719297@ax162>
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Schier @ 2025-08-25 15:33 UTC (permalink / raw)
  To: Vlastimil Babka
  Cc: Nathan Chancellor, Christian Brauner, Daniel Gomez,
	Masahiro Yamada, linux-kernel, linux-kbuild

On Mon, Aug 25, 2025 at 05:00:37PM +0200, Vlastimil Babka wrote:
> The module export checks are looking for EXPORT_SYMBOL_GPL_FOR_MODULES()
> which was renamed to EXPORT_SYMBOL_FOR_MODULES(). Update the checks.
> 
> Fixes: 6d3c3ca4c77e ("module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> I've missed these new checks when renaming the export macro due to my
> git grep being too narrow. My commit went through Christian's vfs tree
> but seems the script is part of kbuild (which is currently Odd fixes).
> ---
>  scripts/misc-check | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Good catch, thanks a lot!  We will gladly take the patch to kbuild-next.

Reviewed-by: Nicolas Schier <nsc@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES()
       [not found] ` <20250825170710.GC2719297@ax162>
@ 2025-08-25 20:20   ` Nicolas Schier
  2025-08-25 21:35     ` Vlastimil Babka
  2025-08-26 18:38     ` Nathan Chancellor
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Schier @ 2025-08-25 20:20 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Vlastimil Babka, Christian Brauner, Daniel Gomez, Masahiro Yamada,
	linux-kernel, linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

On Mon, Aug 25, 2025 at 10:07:10AM -0700, Nathan Chancellor wrote:
> On Mon, Aug 25, 2025 at 05:00:37PM +0200, Vlastimil Babka wrote:
> > The module export checks are looking for EXPORT_SYMBOL_GPL_FOR_MODULES()
> > which was renamed to EXPORT_SYMBOL_FOR_MODULES(). Update the checks.
> > 
> > Fixes: 6d3c3ca4c77e ("module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES")
> > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> > ---
> > I've missed these new checks when renaming the export macro due to my
> > git grep being too narrow. My commit went through Christian's vfs tree
> > but seems the script is part of kbuild (which is currently Odd fixes).
> 
> If this needs to reach Linus's tree to avoid warnings, it could go via
> another vfs fixes pull request with our ack or we could ask him to pick
> it up directly (as I am not sure we will have a fixes pull request this
> cycle). If it is not urgent, I can pick it up via kbuild-next for 6.18.
> I have no strong preference.

Hm, you're right, the check will issue false warnings (and misses to
warn when it should) without this update.  Therefore I think it would be
good to get the patch merged soon - even though the warnings are only
issued with W=2.

So, I second asking for the patch to go via vfs fixes or directly via
Linus.  If it helps:

Acked-by: Nicolas Schier <nsc@kernel.org>

Kind regards,
Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES()
  2025-08-25 20:20   ` Nicolas Schier
@ 2025-08-25 21:35     ` Vlastimil Babka
  2025-08-26 18:38     ` Nathan Chancellor
  1 sibling, 0 replies; 4+ messages in thread
From: Vlastimil Babka @ 2025-08-25 21:35 UTC (permalink / raw)
  To: Nicolas Schier, Nathan Chancellor
  Cc: Christian Brauner, Daniel Gomez, Masahiro Yamada, linux-kernel,
	linux-kbuild

On 8/25/25 22:20, Nicolas Schier wrote:
> On Mon, Aug 25, 2025 at 10:07:10AM -0700, Nathan Chancellor wrote:
>> On Mon, Aug 25, 2025 at 05:00:37PM +0200, Vlastimil Babka wrote:
>> > The module export checks are looking for EXPORT_SYMBOL_GPL_FOR_MODULES()
>> > which was renamed to EXPORT_SYMBOL_FOR_MODULES(). Update the checks.
>> > 
>> > Fixes: 6d3c3ca4c77e ("module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES")
>> > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
>> > ---
>> > I've missed these new checks when renaming the export macro due to my
>> > git grep being too narrow. My commit went through Christian's vfs tree
>> > but seems the script is part of kbuild (which is currently Odd fixes).
>> 
>> If this needs to reach Linus's tree to avoid warnings, it could go via
>> another vfs fixes pull request with our ack or we could ask him to pick
>> it up directly (as I am not sure we will have a fixes pull request this
>> cycle). If it is not urgent, I can pick it up via kbuild-next for 6.18.
>> I have no strong preference.
> 
> Hm, you're right, the check will issue false warnings (and misses to
> warn when it should) without this update.  Therefore I think it would be
> good to get the patch merged soon - even though the warnings are only
> issued with W=2.

Note only two files use EXPORT_SYMBOL_FOR_MODULES() in mainline:

fs/anon_inodes.c - contains also EXPORT_SYMBOL_GPL() so the checks will
cover it anyway (and IIUC since it includes module.h and not export.h it
should be causing a warning already?)

drivers/tty/serial/8250/8250_rsa.c: has no other variants of EXPORT, doesn't
include export.h (includes module.h) so this will not trigger unnecessary
export.h warning. It should be triggering missing export.h include warning,
but will not without this patch.

So IIUC missing this fix results in missing warnings, not adding spurious
ones. And there seem to be many existing warnings already. So it doesn't
seem that urgent fwiw.

> So, I second asking for the patch to go via vfs fixes or directly via
> Linus.  If it helps:

Let's see what Christian thinks then.

> Acked-by: Nicolas Schier <nsc@kernel.org>
> 
> Kind regards,
> Nicolas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES()
  2025-08-25 20:20   ` Nicolas Schier
  2025-08-25 21:35     ` Vlastimil Babka
@ 2025-08-26 18:38     ` Nathan Chancellor
  1 sibling, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2025-08-26 18:38 UTC (permalink / raw)
  To: Nicolas Schier
  Cc: Vlastimil Babka, Christian Brauner, Daniel Gomez, Masahiro Yamada,
	linux-kernel, linux-kbuild

On Mon, Aug 25, 2025 at 10:20:13PM +0200, Nicolas Schier wrote:
> On Mon, Aug 25, 2025 at 10:07:10AM -0700, Nathan Chancellor wrote:
> > On Mon, Aug 25, 2025 at 05:00:37PM +0200, Vlastimil Babka wrote:
> > > The module export checks are looking for EXPORT_SYMBOL_GPL_FOR_MODULES()
> > > which was renamed to EXPORT_SYMBOL_FOR_MODULES(). Update the checks.
> > > 
> > > Fixes: 6d3c3ca4c77e ("module: Rename EXPORT_SYMBOL_GPL_FOR_MODULES to EXPORT_SYMBOL_FOR_MODULES")
> > > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> > > ---
> > > I've missed these new checks when renaming the export macro due to my
> > > git grep being too narrow. My commit went through Christian's vfs tree
> > > but seems the script is part of kbuild (which is currently Odd fixes).
> > 
> > If this needs to reach Linus's tree to avoid warnings, it could go via
> > another vfs fixes pull request with our ack or we could ask him to pick
> > it up directly (as I am not sure we will have a fixes pull request this
> > cycle). If it is not urgent, I can pick it up via kbuild-next for 6.18.
> > I have no strong preference.
> 
> Hm, you're right, the check will issue false warnings (and misses to
> warn when it should) without this update.  Therefore I think it would be
> good to get the patch merged soon - even though the warnings are only
> issued with W=2.

Oh, I forgot that these warnings were downgraded to W=2 in commit
a6a7946bd691 ("kbuild: move warnings about linux/export.h from W=1 to
W=2")... I thought these were in W=1 still.

In that case, I do not think it is really imperative to fast track this
to mainline. We are not and probably never will be W=2 clean so the
presence of new or missing warnings is not a big bug to me. I will apply
this to kbuild-next later today but I can drop it if someone wants to
fast track it.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-26 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250825-export_modules_fix-v1-1-5c331e949538@suse.cz>
2025-08-25 15:33 ` [PATCH] scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES() Nicolas Schier
     [not found] ` <20250825170710.GC2719297@ax162>
2025-08-25 20:20   ` Nicolas Schier
2025-08-25 21:35     ` Vlastimil Babka
2025-08-26 18:38     ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).