[lkml]   [2020]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] arch: x86: power: cpu: init %gs before __restore_processor_state (clang)
On Tue, Sep 15, 2020 at 11:27 AM Borislav Petkov <> wrote:
> > I believe the kernel makes a questionable assumption on how clang
> > uses registers (gs will not be used if stack protection is disabled).
> > Both kernel and clang behaves unfortunate here.
> If the kernel is at fault here and this same thing happens with GCC,
> sure, but this is a clang-specific fix.

This is fair. Unfortunately I am not an x86 asm expert. I expect the proper
fix should land into arch/x86/kernel/acpi/wakeup_64.S to init %gs
(maybe some more registers) before "jmp restore_processor_state".


 \ /
  Last update: 2020-09-15 20:37    [W:0.064 / U:12.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site