* [PATCH] modpost: drop '*_probe' from section check whitelist
@ 2025-10-20 9:16 Johan Hovold
2025-10-21 0:20 ` kernel test robot
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Johan Hovold @ 2025-10-20 9:16 UTC (permalink / raw)
To: Nathan Chancellor, Nicolas Schier
Cc: Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel,
Johan Hovold
Several symbol patterns used to be whitelisted to allow drivers to refer
to functions annotated with __devinit and __devexit, which have since
been removed.
Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the
section check whitelist") removed most of these patterns but left
'*_probe' after a reported warning in an irqchip driver.
Turns out that was indeed an incorrect reference which has now been
fixed by commit 9b685058ca93 ("irqchip/qcom-irq-combiner: Fix section
mismatch").
A recently added clocksource driver also relies on this suffix to
suppress another valid warning, and that is being fixed separately. [1]
Note that drivers with valid reasons for suppressing the warnings can
use the __ref macros.
Link: https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/ [1]
Signed-off-by: Johan Hovold <johan@kernel.org>
---
As mentioned above there are still two drivers relying on the "_probe"
pattern to suppress valid warnings so perhaps it's best to hold off on
merging this until the corresponding fixes are in mainline (e.g. next
cycle or so unless Thomas can fast-track them).
Johan
scripts/mod/modpost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 47c8aa2a6939..5c499dace0bb 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -953,7 +953,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym,
/* symbols in data sections that may refer to any init/exit sections */
if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) &&
- match(fromsym, PATTERNS("*_ops", "*_probe", "*_console")))
+ match(fromsym, PATTERNS("*_ops", "*_console")))
return 0;
/* Check for pattern 3 */
--
2.49.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-10-20 9:16 [PATCH] modpost: drop '*_probe' from section check whitelist Johan Hovold @ 2025-10-21 0:20 ` kernel test robot 2025-10-22 20:39 ` Nathan Chancellor ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: kernel test robot @ 2025-10-21 0:20 UTC (permalink / raw) To: Johan Hovold, Nathan Chancellor, Nicolas Schier Cc: oe-kbuild-all, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel, Johan Hovold Hi Johan, kernel test robot noticed the following build warnings: [auto build test WARNING on linus/master] [also build test WARNING on v6.18-rc2 next-20251020] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Johan-Hovold/modpost-drop-_probe-from-section-check-whitelist/20251020-171732 base: linus/master patch link: https://lore.kernel.org/r/20251020091613.22562-1-johan%40kernel.org patch subject: [PATCH] modpost: drop '*_probe' from section check whitelist :::::: branch date: 7 hours ago :::::: commit date: 7 hours ago config: i386-buildonly-randconfig-001-20251020 (https://download.01.org/0day-ci/archive/20251020/202510202339.CiYSDt6j-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251020/202510202339.CiYSDt6j-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/r/202510202339.CiYSDt6j-lkp@intel.com/ All warnings (new ones prefixed by >>, old ones prefixed by <<): >> WARNING: modpost: vmlinux: section mismatch in reference: nxp_stm_probe+0x0 (section: .data) -> nxp_stm_timer_probe (section: .init.text) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-10-20 9:16 [PATCH] modpost: drop '*_probe' from section check whitelist Johan Hovold 2025-10-21 0:20 ` kernel test robot @ 2025-10-22 20:39 ` Nathan Chancellor 2025-11-12 16:48 ` Johan Hovold 2025-11-15 15:36 ` Thomas Gleixner 2025-12-16 13:13 ` Nathan Chancellor 3 siblings, 1 reply; 9+ messages in thread From: Nathan Chancellor @ 2025-10-22 20:39 UTC (permalink / raw) To: Johan Hovold Cc: Nicolas Schier, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel On Mon, Oct 20, 2025 at 11:16:13AM +0200, Johan Hovold wrote: > Several symbol patterns used to be whitelisted to allow drivers to refer > to functions annotated with __devinit and __devexit, which have since > been removed. > > Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the > section check whitelist") removed most of these patterns but left > '*_probe' after a reported warning in an irqchip driver. > > Turns out that was indeed an incorrect reference which has now been > fixed by commit 9b685058ca93 ("irqchip/qcom-irq-combiner: Fix section > mismatch"). > > A recently added clocksource driver also relies on this suffix to > suppress another valid warning, and that is being fixed separately. [1] > > Note that drivers with valid reasons for suppressing the warnings can > use the __ref macros. > > Link: https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/ [1] > Signed-off-by: Johan Hovold <johan@kernel.org> > --- > > As mentioned above there are still two drivers relying on the "_probe" > pattern to suppress valid warnings so perhaps it's best to hold off on > merging this until the corresponding fixes are in mainline (e.g. next > cycle or so unless Thomas can fast-track them). Yeah, if it were fast tracked as a fix for 6.18, we could either use that tag as the base for kbuild-next (as we have not take any patches for 6.19 yet) or if they are 6.19 material, Thomas could provide us with a signed tag or stable shared branch so that we could take this for 6.19 and have a clean tree. Whatever works. Reviewed-by: Nathan Chancellor <nathan@kernel.org> > scripts/mod/modpost.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 47c8aa2a6939..5c499dace0bb 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -953,7 +953,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, > /* symbols in data sections that may refer to any init/exit sections */ > if (match(fromsec, PATTERNS(DATA_SECTIONS)) && > match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) && > - match(fromsym, PATTERNS("*_ops", "*_probe", "*_console"))) > + match(fromsym, PATTERNS("*_ops", "*_console"))) > return 0; > > /* Check for pattern 3 */ > -- > 2.49.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-10-22 20:39 ` Nathan Chancellor @ 2025-11-12 16:48 ` Johan Hovold 2025-11-14 4:16 ` Nathan Chancellor 0 siblings, 1 reply; 9+ messages in thread From: Johan Hovold @ 2025-11-12 16:48 UTC (permalink / raw) To: Nathan Chancellor Cc: Nicolas Schier, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel, Daniel Lezcano Hi Nathan, On Wed, Oct 22, 2025 at 10:39:55PM +0200, Nathan Chancellor wrote: > On Mon, Oct 20, 2025 at 11:16:13AM +0200, Johan Hovold wrote: > > Several symbol patterns used to be whitelisted to allow drivers to refer > > to functions annotated with __devinit and __devexit, which have since > > been removed. > > > > Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the > > section check whitelist") removed most of these patterns but left > > '*_probe' after a reported warning in an irqchip driver. > > > > Turns out that was indeed an incorrect reference which has now been > > fixed by commit 9b685058ca93 ("irqchip/qcom-irq-combiner: Fix section > > mismatch"). > > > > A recently added clocksource driver also relies on this suffix to > > suppress another valid warning, and that is being fixed separately. [1] > > > > Note that drivers with valid reasons for suppressing the warnings can > > use the __ref macros. > > > > Link: https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/ [1] > > Signed-off-by: Johan Hovold <johan@kernel.org> > > --- > > > > As mentioned above there are still two drivers relying on the "_probe" > > pattern to suppress valid warnings so perhaps it's best to hold off on > > merging this until the corresponding fixes are in mainline (e.g. next > > cycle or so unless Thomas can fast-track them). > > Yeah, if it were fast tracked as a fix for 6.18, we could either use > that tag as the base for kbuild-next (as we have not take any patches > for 6.19 yet) or if they are 6.19 material, Thomas could provide us with > a signed tag or stable shared branch so that we could take this for 6.19 > and have a clean tree. Whatever works. Daniel has queued the clocksource fix for 6.19 now so I guess we can just wait until both fixes hit mainline and either send this one to Linus after that for -rc1 (or -rc2), or just wait until 6.20. I'll send a reminder when both are in Linus's tree. > Reviewed-by: Nathan Chancellor <nathan@kernel.org> Thanks for reviewing. > > scripts/mod/modpost.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > > index 47c8aa2a6939..5c499dace0bb 100644 > > --- a/scripts/mod/modpost.c > > +++ b/scripts/mod/modpost.c > > @@ -953,7 +953,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, > > /* symbols in data sections that may refer to any init/exit sections */ > > if (match(fromsec, PATTERNS(DATA_SECTIONS)) && > > match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) && > > - match(fromsym, PATTERNS("*_ops", "*_probe", "*_console"))) > > + match(fromsym, PATTERNS("*_ops", "*_console"))) > > return 0; > > > > /* Check for pattern 3 */ > > -- > > 2.49.1 > > Johan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-11-12 16:48 ` Johan Hovold @ 2025-11-14 4:16 ` Nathan Chancellor 2025-11-14 8:45 ` Johan Hovold 2025-12-16 1:11 ` Johan Hovold 0 siblings, 2 replies; 9+ messages in thread From: Nathan Chancellor @ 2025-11-14 4:16 UTC (permalink / raw) To: Johan Hovold Cc: Nicolas Schier, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel, Daniel Lezcano Hi Johan, On Wed, Nov 12, 2025 at 05:48:21PM +0100, Johan Hovold wrote: > Daniel has queued the clocksource fix for 6.19 now so I guess we can > just wait until both fixes hit mainline and either send this one to > Linus after that for -rc1 (or -rc2), or just wait until 6.20. > > I'll send a reminder when both are in Linus's tree. Thanks for the heads up! I think I would prefer having it bake in -next for a cycle so I will plan to apply it to kbuild-next once 6.19-rc1 is out. Then we should be able to catch any instances that crop up in new code from -next testing. Cheers, Nathan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-11-14 4:16 ` Nathan Chancellor @ 2025-11-14 8:45 ` Johan Hovold 2025-12-16 1:11 ` Johan Hovold 1 sibling, 0 replies; 9+ messages in thread From: Johan Hovold @ 2025-11-14 8:45 UTC (permalink / raw) To: Nathan Chancellor Cc: Nicolas Schier, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel, Daniel Lezcano On Thu, Nov 13, 2025 at 09:16:28PM -0700, Nathan Chancellor wrote: > On Wed, Nov 12, 2025 at 05:48:21PM +0100, Johan Hovold wrote: > > Daniel has queued the clocksource fix for 6.19 now so I guess we can > > just wait until both fixes hit mainline and either send this one to > > Linus after that for -rc1 (or -rc2), or just wait until 6.20. > > > > I'll send a reminder when both are in Linus's tree. > > Thanks for the heads up! I think I would prefer having it bake in -next > for a cycle so I will plan to apply it to kbuild-next once 6.19-rc1 is > out. Then we should be able to catch any instances that crop up in new > code from -next testing. Sounds good, thanks. Johan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-11-14 4:16 ` Nathan Chancellor 2025-11-14 8:45 ` Johan Hovold @ 2025-12-16 1:11 ` Johan Hovold 1 sibling, 0 replies; 9+ messages in thread From: Johan Hovold @ 2025-12-16 1:11 UTC (permalink / raw) To: Nathan Chancellor Cc: Nicolas Schier, Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel, Daniel Lezcano Hi Nathan, On Thu, Nov 13, 2025 at 09:16:28PM -0700, Nathan Chancellor wrote: > On Wed, Nov 12, 2025 at 05:48:21PM +0100, Johan Hovold wrote: > > Daniel has queued the clocksource fix for 6.19 now so I guess we can > > just wait until both fixes hit mainline and either send this one to > > Linus after that for -rc1 (or -rc2), or just wait until 6.20. > > > > I'll send a reminder when both are in Linus's tree. > > Thanks for the heads up! I think I would prefer having it bake in -next > for a cycle so I will plan to apply it to kbuild-next once 6.19-rc1 is > out. Then we should be able to catch any instances that crop up in new > code from -next testing. Both fixes are in rc1 so you should be able to apply this one now. Johan ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-10-20 9:16 [PATCH] modpost: drop '*_probe' from section check whitelist Johan Hovold 2025-10-21 0:20 ` kernel test robot 2025-10-22 20:39 ` Nathan Chancellor @ 2025-11-15 15:36 ` Thomas Gleixner 2025-12-16 13:13 ` Nathan Chancellor 3 siblings, 0 replies; 9+ messages in thread From: Thomas Gleixner @ 2025-11-15 15:36 UTC (permalink / raw) To: Johan Hovold, Nathan Chancellor, Nicolas Schier Cc: Masahiro Yamada, linux-kbuild, linux-kernel, Johan Hovold On Mon, Oct 20 2025 at 11:16, Johan Hovold wrote: > Several symbol patterns used to be whitelisted to allow drivers to refer > to functions annotated with __devinit and __devexit, which have since > been removed. > > Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the > section check whitelist") removed most of these patterns but left > '*_probe' after a reported warning in an irqchip driver. > > Turns out that was indeed an incorrect reference which has now been > fixed by commit 9b685058ca93 ("irqchip/qcom-irq-combiner: Fix section > mismatch"). > > A recently added clocksource driver also relies on this suffix to > suppress another valid warning, and that is being fixed separately. [1] > > Note that drivers with valid reasons for suppressing the warnings can > use the __ref macros. > > Link: https://lore.kernel.org/lkml/20251017054943.7195-1-johan@kernel.org/ [1] > Signed-off-by: Johan Hovold <johan@kernel.org> Thanks for cleaning this up! Reviewed-by: Thomas Gleixner <tglx@linutronix.de> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] modpost: drop '*_probe' from section check whitelist 2025-10-20 9:16 [PATCH] modpost: drop '*_probe' from section check whitelist Johan Hovold ` (2 preceding siblings ...) 2025-11-15 15:36 ` Thomas Gleixner @ 2025-12-16 13:13 ` Nathan Chancellor 3 siblings, 0 replies; 9+ messages in thread From: Nathan Chancellor @ 2025-12-16 13:13 UTC (permalink / raw) To: Nathan Chancellor, Nicolas Schier, Johan Hovold Cc: Masahiro Yamada, Thomas Gleixner, linux-kbuild, linux-kernel On Mon, 20 Oct 2025 11:16:13 +0200, Johan Hovold wrote: > Several symbol patterns used to be whitelisted to allow drivers to refer > to functions annotated with __devinit and __devexit, which have since > been removed. > > Commit e1dc1bfe5b27 ("modpost: remove more symbol patterns from the > section check whitelist") removed most of these patterns but left > '*_probe' after a reported warning in an irqchip driver. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next Thanks! [1/1] modpost: drop '*_probe' from section check whitelist https://git.kernel.org/kbuild/c/a4df2071f1a2b Please look out for regression or issue reports or other follow up comments, as they may result in the patch/series getting dropped or reverted. Best regards, -- Nathan Chancellor <nathan@kernel.org> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-12-16 13:13 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-20 9:16 [PATCH] modpost: drop '*_probe' from section check whitelist Johan Hovold 2025-10-21 0:20 ` kernel test robot 2025-10-22 20:39 ` Nathan Chancellor 2025-11-12 16:48 ` Johan Hovold 2025-11-14 4:16 ` Nathan Chancellor 2025-11-14 8:45 ` Johan Hovold 2025-12-16 1:11 ` Johan Hovold 2025-11-15 15:36 ` Thomas Gleixner 2025-12-16 13:13 ` 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).