Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-06-03 Thread Brian Gerst
On Wed, Jun 3, 2020 at 11:18 AM Joerg Roedel wrote: > > On Tue, May 19, 2020 at 09:58:18AM -0400, Brian Gerst wrote: > > On Tue, Apr 28, 2020 at 11:28 AM Joerg Roedel wrote: > > > The proper fix would be to initialize MSR_GS_BASE earlier. > > That'll mean to initialize it two times during boot, a

Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-06-03 Thread Joerg Roedel
On Tue, May 19, 2020 at 11:15:26AM +0200, Borislav Petkov wrote: > On Tue, Apr 28, 2020 at 05:16:45PM +0200, Joerg Roedel wrote: > > From: Joerg Roedel > > > > The code inserted by the stack protector does not work in the early > > boot environment because it uses the GS segment, at least with me

Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-06-03 Thread Joerg Roedel
On Tue, May 19, 2020 at 09:58:18AM -0400, Brian Gerst wrote: > On Tue, Apr 28, 2020 at 11:28 AM Joerg Roedel wrote: > The proper fix would be to initialize MSR_GS_BASE earlier. That'll mean to initialize it two times during boot, as the first C function with stack-protection is called before the

Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-05-19 Thread Brian Gerst
On Tue, Apr 28, 2020 at 11:28 AM Joerg Roedel wrote: > > From: Joerg Roedel > > The code inserted by the stack protector does not work in the early > boot environment because it uses the GS segment, at least with memory > encryption enabled. Make sure the early code is compiled without this > fea

Re: [PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-05-19 Thread Borislav Petkov
On Tue, Apr 28, 2020 at 05:16:45PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The code inserted by the stack protector does not work in the early > boot environment because it uses the GS segment, at least with memory > encryption enabled. Can you elaborate on why is that a problem? Th

[PATCH v3 35/75] x86/head/64: Build k/head64.c with -fno-stack-protector

2020-04-28 Thread Joerg Roedel
From: Joerg Roedel The code inserted by the stack protector does not work in the early boot environment because it uses the GS segment, at least with memory encryption enabled. Make sure the early code is compiled without this feature enabled. Signed-off-by: Joerg Roedel --- arch/x86/kernel/Ma