[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxQLfMcU4ty1_uJ=8fRO5n_DN_83Sek2XDC9vHeR2jJfg@mail.gmail.com>
Date: Mon, 22 Aug 2016 15:47:40 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
"the arch/x86 maintainers" <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>,
Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Byungchul Park <byungchul.park@....com>,
Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH 5/8] x86/head: remove useless zeroed word
On Mon, Aug 22, 2016 at 2:48 PM, Andi Kleen <andi@...stfloor.org> wrote:
>
> Seems dangerous. It wouldn't surprise me if some CPUs or x86 emulations
> load it anyways and trigger page faults if there is really nothing
> there.
Don't be silly, Andi and Peter.
We don't actually *use* lss any more. Not even on 32-bit. The zero is
never accessed. And on x86-64 we never did, obviously.
On 32-bit that zero doesn't even exist any more. On x86-64, it was
never even used at all. On x86-32, it was removed in commit
11d4c3f9b671 ("x86-32: Make sure the stack is set up before we use
it"), when the code stopped doing lss.
On x86-64, it has never made sense. It was added in commit
9cf4f298e29a ("x86: use stack_start in x86_64") to match x86-32 at the
time, but it didn't actually make sense even then, because x86-64
didn't use lss. 32-bit did, but 64-but just did a simple
movq stack_start(%rip),%rsp
like a good user should.
Linus
Powered by blists - more mailing lists