lkml.org 
[lkml]   [2019]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86/purgatory: undefined symbol __stack_chk_fail

* Randy Dunlap <rdunlap@infradead.org> wrote:

> On 9/3/19 8:50 AM, Andreas Smas wrote:
> > Hi,
> >
> > For me, kernels built including this commit
> > b059f801a937 (x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS)
> >
> > results in kexec() failing to load the kernel:
> >
> > kexec: Undefined symbol: __stack_chk_fail
> > kexec-bzImage64: Loading purgatory failed
> >
> > Can be seen:
> >
> > $ readelf -a arch/x86/purgatory/purgatory.ro | grep UND
> > 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
> > 51: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail
> >
> > Using: gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
> >
> > Adding -ffreestanding or -fno-stack-protector to ccflags-y in
> > arch/x86/purgatory/Makefile
> > fixes the problem. Not sure which would be preferred.
> >
>
> Hi,
> Do you have a kernel .config file that causes this?
> I can't seem to reproduce it.

Does it go away with this fix in x86/urgent:

ca14c996afe7: ("x86/purgatory: Disable the stackleak GCC plugin for the purgatory")

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent

?

Thanks,

Ingo

\
 
 \ /
  Last update: 2019-09-28 14:43    [W:0.051 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site