[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOGAQepHV=7Xk4Xw4vw4+56NhDDvEQ+sYrRr-rHYLUbH_oRUmw@mail.gmail.com>
Date: Tue, 15 Sep 2020 11:55:22 -0700
From: Roman Kiryanov <rkir@...gle.com>
To: Borislav Petkov <bp@...en8.de>
Cc: rjw@...ysocki.net, pavel@....cz,
Thomas Gleixner <tglx@...utronix.de>, mingo@...hat.com,
x86@...nel.org, linux-pm@...r.kernel.org,
Greg KH <gregkh@...uxfoundation.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Alistair Delva <adelva@...gle.com>,
Haitao Shan <hshan@...gle.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arch: x86: power: cpu: init %gs before
__restore_processor_state (clang)
On Tue, Sep 15, 2020 at 11:52 AM Borislav Petkov <bp@...en8.de> wrote:
>
> On Tue, Sep 15, 2020 at 11:36:13AM -0700, Roman Kiryanov wrote:
> > 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".
>
> ... because "LLVM appears to be inlining functions with stack protectors
> into functions compiled with -fno-stack-protector" and now the *kernel*
> needs to init %gs?
>
> How about LLVM stops doing those wrong inlining decisions?
This will remove the issue for a while until clang/gcc/other decides to use
%gs for other purposes before the kernel initializes it.
Regards,
Roman.
Powered by blists - more mailing lists