[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFwH8zQNj42LyqFTbXqU+nUbDgDhqMW+so_-OPpM5SRwuQ@mail.gmail.com>
Date: Mon, 21 Nov 2016 10:00:56 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Andy Lutomirski <luto@...capital.net>,
Brian Gerst <brgerst@...il.com>,
Andy Lutomirski <luto@...nel.org>, tedheadster@...il.com,
"H. Peter Anvin" <hpa@...or.com>,
George Spelvin <linux@...izon.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>
Subject: Re: What exactly do 32-bit x86 exceptions push on the stack in the CS slot?
On Sun, Nov 20, 2016 at 11:13 PM, Ingo Molnar <mingo@...nel.org> wrote:
>
> So I have applied your fix that addresses the worst fallout directly:
>
> fc0e81b2bea0 x86/traps: Ignore high word of regs->cs in early_fixup_exception()
>
> ... but otherwise we might be better off zeroing out the high bits of segment
> registers stored on the stack, in all entry code pathways
Ugh.
I'd much rather we go back to just making the "cs" entry explicitly
16-bit, and have a separate padding entry, the way we used to long
long ago.
Or just rename it to something that you're not supposed to access
directly, and a helper accessor function that masks off the high bits.
The entry code-paths are *much* more critical than any of the few user
codepaths. Let's not add complexity to entry. Make the structure
actually reflect reality instead.
Linus
Powered by blists - more mailing lists