2023-03-06 10:16:07

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 1/2] kallsyms: add kallsyms_seqs_of_names to list of special symbols

From: Arnd Bergmann <[email protected]>

My randconfig build setup ran into another kallsyms warning:

Inconsistent kallsyms data
Try make KALLSYMS_EXTRA_PASS=1 as a workaround

After adding some debugging code to kallsyms.c, I saw that the recently
added kallsyms_seqs_of_names symbol can sometimes cause the second stage
table to be slightly longer than the first stage, which makes the
build inconsistent.

Add it to the exception table that contains all other kallsyms-generated
symbols.

Fixes: 60443c88f3a8 ("kallsyms: Improve the performance of kallsyms_lookup_name()")
Signed-off-by: Arnd Bergmann <[email protected]>
---
scripts/kallsyms.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 8a68179a98a3..a239a87e7bec 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -119,6 +119,7 @@ static bool is_ignored_symbol(const char *name, char type)
"kallsyms_markers",
"kallsyms_token_table",
"kallsyms_token_index",
+ "kallsyms_seqs_of_names",
/* Exclude linker generated symbols which vary between passes */
"_SDA_BASE_", /* ppc */
"_SDA2_BASE_", /* ppc */
--
2.39.2



2023-03-06 13:39:06

by Zhen Lei

[permalink] [raw]
Subject: Re: [PATCH 1/2] kallsyms: add kallsyms_seqs_of_names to list of special symbols



On 2023/3/6 18:14, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> My randconfig build setup ran into another kallsyms warning:
>
> Inconsistent kallsyms data
> Try make KALLSYMS_EXTRA_PASS=1 as a workaround
>
> After adding some debugging code to kallsyms.c, I saw that the recently
> added kallsyms_seqs_of_names symbol can sometimes cause the second stage
> table to be slightly longer than the first stage, which makes the
> build inconsistent.
>
> Add it to the exception table that contains all other kallsyms-generated
> symbols.

Reviewed-by: Zhen Lei <[email protected]>

Maybe we can do a sanity check in output_label(). Or dynamically add the new
symbol into ignored_symbols[], in this way, manual maintenance is not required.


>
> Fixes: 60443c88f3a8 ("kallsyms: Improve the performance of kallsyms_lookup_name()")
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> scripts/kallsyms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 8a68179a98a3..a239a87e7bec 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -119,6 +119,7 @@ static bool is_ignored_symbol(const char *name, char type)
> "kallsyms_markers",
> "kallsyms_token_table",
> "kallsyms_token_index",
> + "kallsyms_seqs_of_names",
> /* Exclude linker generated symbols which vary between passes */
> "_SDA_BASE_", /* ppc */
> "_SDA2_BASE_", /* ppc */
>

--
Regards,
Zhen Lei

2023-03-07 01:35:55

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 1/2] kallsyms: add kallsyms_seqs_of_names to list of special symbols

On Mon, Mar 6, 2023 at 7:15 PM Arnd Bergmann <[email protected]> wrote:
>
> From: Arnd Bergmann <[email protected]>
>
> My randconfig build setup ran into another kallsyms warning:
>
> Inconsistent kallsyms data
> Try make KALLSYMS_EXTRA_PASS=1 as a workaround
>
> After adding some debugging code to kallsyms.c, I saw that the recently
> added kallsyms_seqs_of_names symbol can sometimes cause the second stage
> table to be slightly longer than the first stage, which makes the
> build inconsistent.
>
> Add it to the exception table that contains all other kallsyms-generated
> symbols.
>
> Fixes: 60443c88f3a8 ("kallsyms: Improve the performance of kallsyms_lookup_name()")
> Signed-off-by: Arnd Bergmann <[email protected]>
> ---
> scripts/kallsyms.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 8a68179a98a3..a239a87e7bec 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -119,6 +119,7 @@ static bool is_ignored_symbol(const char *name, char type)
> "kallsyms_markers",
> "kallsyms_token_table",
> "kallsyms_token_index",
> + "kallsyms_seqs_of_names",
> /* Exclude linker generated symbols which vary between passes */
> "_SDA_BASE_", /* ppc */
> "_SDA2_BASE_", /* ppc */
> --
> 2.39.2
>


Applied to linux-kbuild/fixes.
Thanks.


--
Best Regards
Masahiro Yamada