* [PATCH] scripts/kallsyms: filter arm64's __efistub_ symbols
@ 2018-03-01 17:19 Ard Biesheuvel
2018-03-05 12:43 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2018-03-01 17:19 UTC (permalink / raw)
To: linux-arm-kernel
On arm64, the EFI stub and the kernel proper are essentially the same
binary, although the EFI stub executes at a different virtual address
as the kernel. For this reason, the EFI stub is restricted in the
symbols it can link to, which is ensured by prefixing all EFI stub
symbols with __efistub_ (and emitting __efistub_ prefixed aliases for
routines that may be shared between the core kernel and the stub)
These symbols are leaking into kallsyms, polluting the namespace, so
let's filter them explicitly.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
scripts/kallsyms.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 9ee9bf7fd1a2..1dd24c5b9b47 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -221,6 +221,7 @@ static int symbol_valid(struct sym_entry *s)
static char *special_prefixes[] = {
"__crc_", /* modversions */
+ "__efistub_", /* arm64 EFI stub namespace */
NULL };
static char *special_suffixes[] = {
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] scripts/kallsyms: filter arm64's __efistub_ symbols
2018-03-01 17:19 [PATCH] scripts/kallsyms: filter arm64's __efistub_ symbols Ard Biesheuvel
@ 2018-03-05 12:43 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2018-03-05 12:43 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 01, 2018 at 05:19:01PM +0000, Ard Biesheuvel wrote:
> On arm64, the EFI stub and the kernel proper are essentially the same
> binary, although the EFI stub executes at a different virtual address
> as the kernel. For this reason, the EFI stub is restricted in the
> symbols it can link to, which is ensured by prefixing all EFI stub
> symbols with __efistub_ (and emitting __efistub_ prefixed aliases for
> routines that may be shared between the core kernel and the stub)
>
> These symbols are leaking into kallsyms, polluting the namespace, so
> let's filter them explicitly.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> scripts/kallsyms.c | 1 +
> 1 file changed, 1 insertion(+)
Thanks, I'll take this via arm64.
Will
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 9ee9bf7fd1a2..1dd24c5b9b47 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -221,6 +221,7 @@ static int symbol_valid(struct sym_entry *s)
>
> static char *special_prefixes[] = {
> "__crc_", /* modversions */
> + "__efistub_", /* arm64 EFI stub namespace */
> NULL };
>
> static char *special_suffixes[] = {
> --
> 2.11.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-05 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 17:19 [PATCH] scripts/kallsyms: filter arm64's __efistub_ symbols Ard Biesheuvel
2018-03-05 12:43 ` Will Deacon
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).