* [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
@ 2024-12-04 4:04 kernel test robot
2024-12-10 18:47 ` Paul E. McKenney
0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2024-12-04 4:04 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: llvm, oe-kbuild-all
tree: https://github.com/paulmckrcu/linux dev
head: 48ca997e8632db65609dcc6a715207a1b6dded57
commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
>> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
2024-12-04 4:04 [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined! kernel test robot
@ 2024-12-10 18:47 ` Paul E. McKenney
2024-12-10 20:35 ` Nathan Chancellor
0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2024-12-10 18:47 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all
On Wed, Dec 04, 2024 at 12:04:15PM +0800, kernel test robot wrote:
> tree: https://github.com/paulmckrcu/linux dev
> head: 48ca997e8632db65609dcc6a715207a1b6dded57
> commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
> config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
> compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> >> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
This commit has EXPORT_SYMBOL_GPL() for both the Tree and Tiny definitions
of both of these functions. What am I missing here?
Thanx, Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
2024-12-10 18:47 ` Paul E. McKenney
@ 2024-12-10 20:35 ` Nathan Chancellor
2024-12-10 21:37 ` Paul E. McKenney
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2024-12-10 20:35 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kernel test robot, llvm, oe-kbuild-all
On Tue, Dec 10, 2024 at 10:47:22AM -0800, Paul E. McKenney wrote:
> On Wed, Dec 04, 2024 at 12:04:15PM +0800, kernel test robot wrote:
> > tree: https://github.com/paulmckrcu/linux dev
> > head: 48ca997e8632db65609dcc6a715207a1b6dded57
> > commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
> > config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
> > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>, old ones prefixed by <<):
> >
> > ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > >> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
>
> This commit has EXPORT_SYMBOL_GPL() for both the Tree and Tiny definitions
> of both of these functions. What am I missing here?
This configuration has CONFIG_RCU_TINY=y and CONFIG_RCU_TORTURE_TEST=m,
so the definition and export do not work correctly because the define is
CONFIG_RCU_TORTURE_TEST_MODULE in that case. I think you should be using
IS_ENABLED(), which will handle =y and =m. This resolves the error for
me.
Cheers,
Nathan
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
index f068bd9dc037..773944257e79 100644
--- a/kernel/rcu/tiny.c
+++ b/kernel/rcu/tiny.c
@@ -257,7 +257,7 @@ void kvfree_call_rcu(struct rcu_head *head, void *ptr)
EXPORT_SYMBOL_GPL(kvfree_call_rcu);
#endif
-#ifdef CONFIG_RCU_TORTURE_TEST
+#if IS_ENABLED(CONFIG_RCU_TORTURE_TEST)
unsigned long rcutorture_gather_gp_seqs(void)
{
return READ_ONCE(rcu_ctrlblk.gp_seq) & 0xff;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
2024-12-10 20:35 ` Nathan Chancellor
@ 2024-12-10 21:37 ` Paul E. McKenney
2024-12-11 5:24 ` Nathan Chancellor
0 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2024-12-10 21:37 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: kernel test robot, llvm, oe-kbuild-all
On Tue, Dec 10, 2024 at 01:35:52PM -0700, Nathan Chancellor wrote:
> On Tue, Dec 10, 2024 at 10:47:22AM -0800, Paul E. McKenney wrote:
> > On Wed, Dec 04, 2024 at 12:04:15PM +0800, kernel test robot wrote:
> > > tree: https://github.com/paulmckrcu/linux dev
> > > head: 48ca997e8632db65609dcc6a715207a1b6dded57
> > > commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
> > > config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
> > > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
> > >
> > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > >
> > > ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > > >> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> >
> > This commit has EXPORT_SYMBOL_GPL() for both the Tree and Tiny definitions
> > of both of these functions. What am I missing here?
>
> This configuration has CONFIG_RCU_TINY=y and CONFIG_RCU_TORTURE_TEST=m,
> so the definition and export do not work correctly because the define is
> CONFIG_RCU_TORTURE_TEST_MODULE in that case. I think you should be using
> IS_ENABLED(), which will handle =y and =m. This resolves the error for
> me.
Thank you for the analysis and the fix!
If this fixes things in the kernel test robot run, may I have your
Signed-off-by?
Thanx, Paul
> Cheers,
> Nathan
>
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index f068bd9dc037..773944257e79 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -257,7 +257,7 @@ void kvfree_call_rcu(struct rcu_head *head, void *ptr)
> EXPORT_SYMBOL_GPL(kvfree_call_rcu);
> #endif
>
> -#ifdef CONFIG_RCU_TORTURE_TEST
> +#if IS_ENABLED(CONFIG_RCU_TORTURE_TEST)
> unsigned long rcutorture_gather_gp_seqs(void)
> {
> return READ_ONCE(rcu_ctrlblk.gp_seq) & 0xff;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
2024-12-10 21:37 ` Paul E. McKenney
@ 2024-12-11 5:24 ` Nathan Chancellor
2024-12-11 20:47 ` Paul E. McKenney
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Chancellor @ 2024-12-11 5:24 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kernel test robot, llvm, oe-kbuild-all
On Tue, Dec 10, 2024 at 01:37:48PM -0800, Paul E. McKenney wrote:
> On Tue, Dec 10, 2024 at 01:35:52PM -0700, Nathan Chancellor wrote:
> > On Tue, Dec 10, 2024 at 10:47:22AM -0800, Paul E. McKenney wrote:
> > > On Wed, Dec 04, 2024 at 12:04:15PM +0800, kernel test robot wrote:
> > > > tree: https://github.com/paulmckrcu/linux dev
> > > > head: 48ca997e8632db65609dcc6a715207a1b6dded57
> > > > commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
> > > > config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
> > > > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
> > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
> > > >
> > > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > > >
> > > > ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > > > >> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > >
> > > This commit has EXPORT_SYMBOL_GPL() for both the Tree and Tiny definitions
> > > of both of these functions. What am I missing here?
> >
> > This configuration has CONFIG_RCU_TINY=y and CONFIG_RCU_TORTURE_TEST=m,
> > so the definition and export do not work correctly because the define is
> > CONFIG_RCU_TORTURE_TEST_MODULE in that case. I think you should be using
> > IS_ENABLED(), which will handle =y and =m. This resolves the error for
> > me.
>
> Thank you for the analysis and the fix!
>
> If this fixes things in the kernel test robot run, may I have your
> Signed-off-by?
Sure thing:
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Cheers,
Nathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
2024-12-11 5:24 ` Nathan Chancellor
@ 2024-12-11 20:47 ` Paul E. McKenney
0 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2024-12-11 20:47 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: kernel test robot, llvm, oe-kbuild-all
On Tue, Dec 10, 2024 at 10:24:39PM -0700, Nathan Chancellor wrote:
> On Tue, Dec 10, 2024 at 01:37:48PM -0800, Paul E. McKenney wrote:
> > On Tue, Dec 10, 2024 at 01:35:52PM -0700, Nathan Chancellor wrote:
> > > On Tue, Dec 10, 2024 at 10:47:22AM -0800, Paul E. McKenney wrote:
> > > > On Wed, Dec 04, 2024 at 12:04:15PM +0800, kernel test robot wrote:
> > > > > tree: https://github.com/paulmckrcu/linux dev
> > > > > head: 48ca997e8632db65609dcc6a715207a1b6dded57
> > > > > commit: 13e3224fa73ec6c7dfeda04b2741c95787196588 [47/49] rcutorture: Include grace-period sequence numbers in failure/close-call
> > > > > config: arm-randconfig-001-20241203 (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-lkp@intel.com/config)
> > > > > compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
> > > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041204.ys3dSglL-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/oe-kbuild-all/202412041204.ys3dSglL-lkp@intel.com/
> > > > >
> > > > > All errors (new ones prefixed by >>, old ones prefixed by <<):
> > > > >
> > > > > ERROR: modpost: "rcutorture_gather_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > > > > >> ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined!
> > > >
> > > > This commit has EXPORT_SYMBOL_GPL() for both the Tree and Tiny definitions
> > > > of both of these functions. What am I missing here?
> > >
> > > This configuration has CONFIG_RCU_TINY=y and CONFIG_RCU_TORTURE_TEST=m,
> > > so the definition and export do not work correctly because the define is
> > > CONFIG_RCU_TORTURE_TEST_MODULE in that case. I think you should be using
> > > IS_ENABLED(), which will handle =y and =m. This resolves the error for
> > > me.
> >
> > Thank you for the analysis and the fix!
> >
> > If this fixes things in the kernel test robot run, may I have your
> > Signed-off-by?
>
> Sure thing:
>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Thank you! The commit is below, so please let me know of any needed
changes.
Thanx, Paul
------------------------------------------------------------------------
commit c2cf9cf59e746aa60badcb07f58b09b7f604c19b
Author: Nathan Chancellor <nathan@kernel.org>
Date: Wed Dec 11 12:43:01 2024 -0800
rcu: Use IS_ENABLED() for Tiny RCU rcutorture definitions
The rcutorture_gather_gp_seqs() and rcutorture_format_gp_seqs() functions
are currently guarded by "#ifdef CONFIG_RCU_TORTURE_TEST". This fails
in kernels built with CONFIG_RCU_TINY=y and CONFIG_RCU_TORTURE_TEST=m
because in that case there is no CONFIG_RCU_TORTURE_TEST cpp macro.
There is instead a CONFIG_RCU_TORTURE_TEST_MODULE cpp macro.
This commit uses "#if IS_ENABLED(CONFIG_RCU_TORTURE_TEST)" to correctly
handle modular as well as built-in rcutorture for kernels using Tiny RCU.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
index 1971683f1a82d..b97c64e99a905 100644
--- a/kernel/rcu/tiny.c
+++ b/kernel/rcu/tiny.c
@@ -257,7 +257,7 @@ void kvfree_call_rcu(struct rcu_head *head, void *ptr)
EXPORT_SYMBOL_GPL(kvfree_call_rcu);
#endif
-#ifdef CONFIG_RCU_TORTURE_TEST
+#if IS_ENABLED(CONFIG_RCU_TORTURE_TEST)
unsigned long long rcutorture_gather_gp_seqs(void)
{
return READ_ONCE(rcu_ctrlblk.gp_seq) & 0xffffULL;
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-11 20:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 4:04 [paulmckrcu:dev 47/49] ERROR: modpost: "rcutorture_format_gp_seqs" [kernel/rcu/rcutorture.ko] undefined! kernel test robot
2024-12-10 18:47 ` Paul E. McKenney
2024-12-10 20:35 ` Nathan Chancellor
2024-12-10 21:37 ` Paul E. McKenney
2024-12-11 5:24 ` Nathan Chancellor
2024-12-11 20:47 ` Paul E. McKenney
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).