Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1344633 > unrolled thread

[PATCH] kallsyms: ignore ARM mode switching veneers

Started byArd Biesheuvel <ard.biesheuvel@linaro.org>
First post2016-02-26 21:00 +0100
Last post2016-02-26 21:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] kallsyms: ignore ARM mode switching veneers Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-02-26 21:00 +0100
    Re: [PATCH] kallsyms: ignore ARM mode switching veneers Arnd Bergmann <arnd@arndb.de> - 2016-02-26 21:30 +0100

#1344633 — [PATCH] kallsyms: ignore ARM mode switching veneers

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2016-02-26 21:00 +0100
Subject[PATCH] kallsyms: ignore ARM mode switching veneers
Message-ID<r6wIq-8ao-19@gated-at.bofh.it>
On ARM, the linker may emit veneers to deal with relative branch
instructions that appear too far away from their targets. Since the second
kallsyms pass results in an increase of the kernel size, it may result in
additional veneers to be emitted, potentially affecting the output of
kallsyms itself if these symbols are visible to it, and for that reason,
symbols whose names end in '_veneer' are ignored explicitly.

However, when building Thumb2 kernels, such veneers are named differently
if they also incur a mode switch, and since they are not filtered by
kallsyms, they may cause the build to fail. So filter symbols whose names
end in '_from_arm' or '_from_thumb' as well.

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 scripts/kallsyms.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 8fa81e84e295..e2379de76563 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -215,6 +215,8 @@ static int symbol_valid(struct sym_entry *s)
 
 	static char *special_suffixes[] = {
 		"_veneer",		/* arm */
+		"_from_arm",		/* arm */
+		"_from_thumb",		/* arm */
 		NULL };
 
 	int i;
-- 
2.5.0

[toc] | [next] | [standalone]


#1344651

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-26 21:30 +0100
Message-ID<r6xbr-aO-1@gated-at.bofh.it>
In reply to#1344633
On Friday 26 February 2016 20:50:54 Ard Biesheuvel wrote:
> On ARM, the linker may emit veneers to deal with relative branch
> instructions that appear too far away from their targets. Since the second
> kallsyms pass results in an increase of the kernel size, it may result in
> additional veneers to be emitted, potentially affecting the output of
> kallsyms itself if these symbols are visible to it, and for that reason,
> symbols whose names end in '_veneer' are ignored explicitly.
> 
> However, when building Thumb2 kernels, such veneers are named differently
> if they also incur a mode switch, and since they are not filtered by
> kallsyms, they may cause the build to fail. So filter symbols whose names
> end in '_from_arm' or '_from_thumb' as well.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>


Thanks again for debugging this!

I have two (randconfig) configurations that ran into this problem, and they
are both with your patch

Tested-by: Arnd Bergmann <arnd@arndb.de>

>  scripts/kallsyms.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 8fa81e84e295..e2379de76563 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -215,6 +215,8 @@ static int symbol_valid(struct sym_entry *s)
>  
>  	static char *special_suffixes[] = {
>  		"_veneer",		/* arm */
> +		"_from_arm",		/* arm */
> +		"_from_thumb",		/* arm */
>  		NULL };
>  
>  	int i;
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web