lkml.org 
[lkml]   [2019]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86/purgatory: Add $(DISABLE_STACKLEAK_PLUGIN)
On Mon, Sep 23, 2019 at 10:17 AM Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> Since commit b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than
> reset KBUILD_CFLAGS") kexec breaks is GCC_PLUGIN_STACKLEAK is enabled, as
> the purgatory contains undefined references to stackleak_track_stack.
> Attempting to load a kexec kernel results in:
> kexec: Undefined symbol: stackleak_track_stack
> kexec-bzImage64: Loading purgatory failed
>
> Fix this by disabling the stackleak plugin for purgatory.
>
> Fixes: b059f801a937 ("x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS")
> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
(Sorry for the fallout from b059f801a937, but this is giving us a
pretty good idea about what "runtime" requirements certain configs
have. It would be cool to eventually have some kind of kexec test
case that folks could run in QEMU).

> ---
> arch/x86/purgatory/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
> index 527749066d31..fb4ee5444379 100644
> --- a/arch/x86/purgatory/Makefile
> +++ b/arch/x86/purgatory/Makefile
> @@ -25,6 +25,7 @@ KCOV_INSTRUMENT := n
>
> PURGATORY_CFLAGS_REMOVE := -mcmodel=kernel
> PURGATORY_CFLAGS := -mcmodel=large -ffreestanding -fno-zero-initialized-in-bss
> +PURGATORY_CFLAGS += $(DISABLE_STACKLEAK_PLUGIN)
>
> # Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
> # in turn leaves some undefined symbols like __fentry__ in purgatory and not
> --
> 2.21.0
>


--
Thanks,
~Nick Desaulniers

\
 
 \ /
  Last update: 2019-09-23 19:26    [W:0.058 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site