2023-04-06 04:44:59

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the rcu tree

Hi all,

After merging the rcu tree, today's linux-next build (htmldocs) produced
this warning:

kernel/rcu/tree.c:2808: warning: Function parameter or member 'head_free_gp_snap' not described in 'kfree_rcu_cpu_work'

Introduced by commit

07030d20c8ec ("rcu/kvfree: Add debug check for GP complete for kfree_rcu_cpu list")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-04-06 14:17:50

by Paul E. McKenney

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the rcu tree

On Thu, Apr 06, 2023 at 02:43:46PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rcu tree, today's linux-next build (htmldocs) produced
> this warning:
>
> kernel/rcu/tree.c:2808: warning: Function parameter or member 'head_free_gp_snap' not described in 'kfree_rcu_cpu_work'
>
> Introduced by commit
>
> 07030d20c8ec ("rcu/kvfree: Add debug check for GP complete for kfree_rcu_cpu list")

Will fix, thank you!

Thanx, Paul

2023-07-26 03:51:14

by Paul E. McKenney

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the rcu tree

On Wed, Jul 26, 2023 at 12:32:30PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rcu tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> WARNING: modpost: vmlinux: section mismatch in reference: cmdline_load_proc_show+0x22 (section: .text) -> boot_command_line (section: .init.data)
>
> Introduced by commit
>
> cf9eca90a339 ("fs/proc: Add /proc/cmdline_load for boot loader arguments")

That __initdata needs to be __ro_after_init, doesn't it? Will fix,
thank you!

Thanx, Paul

2023-07-26 04:04:33

by Paul E. McKenney

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the rcu tree

On Tue, Jul 25, 2023 at 08:33:06PM -0700, Paul E. McKenney wrote:
> On Wed, Jul 26, 2023 at 12:32:30PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the rcu tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > WARNING: modpost: vmlinux: section mismatch in reference: cmdline_load_proc_show+0x22 (section: .text) -> boot_command_line (section: .init.data)
> >
> > Introduced by commit
> >
> > cf9eca90a339 ("fs/proc: Add /proc/cmdline_load for boot loader arguments")
>
> That __initdata needs to be __ro_after_init, doesn't it? Will fix,
> thank you!

Sigh. Hit "send" too soon. :-/

Does the following incremental diff (to be squashed into the original) help?

Thanx, Paul

------------------------------------------------------------------------

diff --git a/init/main.c b/init/main.c
index c946ab87783a..981170da0b1c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
void (*__initdata late_time_init)(void);

/* Untouched command line saved by arch-specific code. */
-char __initdata boot_command_line[COMMAND_LINE_SIZE];
+char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
/* Untouched saved command line (eg. for /proc) */
char *saved_command_line __ro_after_init;
unsigned int saved_command_line_len __ro_after_init;

2023-07-26 06:53:22

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the rcu tree

Hi Paul,

On Tue, 25 Jul 2023 20:48:13 -0700 "Paul E. McKenney" <[email protected]> wrote:
>
> Does the following incremental diff (to be squashed into the original) help?
>
> Thanx, Paul
>
> ------------------------------------------------------------------------
>
> diff --git a/init/main.c b/init/main.c
> index c946ab87783a..981170da0b1c 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
> void (*__initdata late_time_init)(void);
>
> /* Untouched command line saved by arch-specific code. */
> -char __initdata boot_command_line[COMMAND_LINE_SIZE];
> +char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
> /* Untouched saved command line (eg. for /proc) */
> char *saved_command_line __ro_after_init;
> unsigned int saved_command_line_len __ro_after_init;

I needed the following (only tested x86_64 allmodconfig build):

diff --git a/include/linux/init.h b/include/linux/init.h
index 9a5973324072..e3ce68988e1b 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -112,6 +112,9 @@
#define __REFCONST .section ".ref.rodata", "a"

#ifndef __ASSEMBLY__
+
+#include <linux/cache.h>
+
/*
* Used for initialization calls..
*/
@@ -143,7 +146,7 @@ struct file_system_type;

/* Defined in init/main.c */
extern int do_one_initcall(initcall_t fn);
-extern char __initdata boot_command_line[];
+extern char boot_command_line[] __ro_after_init;
extern char *saved_command_line;
extern unsigned int saved_command_line_len;
extern unsigned int reset_devices;
diff --git a/init/main.c b/init/main.c
index c946ab87783a..981170da0b1c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(system_state);
void (*__initdata late_time_init)(void);

/* Untouched command line saved by arch-specific code. */
-char __initdata boot_command_line[COMMAND_LINE_SIZE];
+char boot_command_line[COMMAND_LINE_SIZE] __ro_after_init;
/* Untouched saved command line (eg. for /proc) */
char *saved_command_line __ro_after_init;
unsigned int saved_command_line_len __ro_after_init;

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature