[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200422192113.GG26846@zn.tnic>
Date: Wed, 22 Apr 2020 21:21:13 +0200
From: Borislav Petkov <bp@...en8.de>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Michael Matz <matz@...e.de>, Jakub Jelinek <jakub@...hat.com>,
Sergei Trofimovich <slyfox@...too.org>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH v2] x86: fix early boot crash on gcc-10
On Wed, Apr 22, 2020 at 11:55:50AM -0700, Nick Desaulniers wrote:
> Can you add by whom? It's not clear to me which function call in
> start_secondary modifies the stack protector guard.
How's that
/*
* Prevent tail call to cpu_startup_entry() because the stack protector
* guard has been changed a couple of functions up, in
* boot_init_stack_canary() and must not be checked before tail calling
* another function.
*/
asm ("");
?
> Another question. Do we not want a stack protector at all in this
> function? I'm not super familiar with how they work; do we not want
> them at all, or simply not to check the guard?
Not to check the guard. See the beginning of
arch/x86/include/asm/stackprotector.h about how they work.
> But if we're not going to check it, I think
> __attribute__((no_stack_protector)) applied to start_secondary might
> be a more precise fix.
No such attribute in gcc yet. But yes, this came up a bit upthread, you
can go back in time for details. :)
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists