From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751585AbbCJGZz (ORCPT ); Tue, 10 Mar 2015 02:25:55 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:39197 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbbCJGZw (ORCPT ); Tue, 10 Mar 2015 02:25:52 -0400 Date: Tue, 10 Mar 2015 07:25:46 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: Linus Torvalds , "H. Peter Anvin" , Denys Vlasenko , Steven Rostedt , Borislav Petkov , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: [PATCH] x86: entry_32.S: change ESPFIX test to not touch PT_OLDSS(%esp) Message-ID: <20150310062545.GA16065@gmail.com> References: <1425909943-14687-1-git-send-email-dvlasenk@redhat.com> <54FDDB90.9010706@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andy Lutomirski wrote: > On Mon, Mar 9, 2015 at 11:16 AM, Linus Torvalds > wrote: > > On Mon, Mar 9, 2015 at 11:04 AM, Andy Lutomirski wrote: > >> > >> One option would be to change the NMI entry code to move itself down 8 > >> bytes if this happens (came from kernel mode or sp == sp0 - 12, > >> perhaps). > > > > Hmm. That whole code currently depends on the stack setup being just a > > single instruction (the move to esp). And that simplifies things, I'd > > like to keep it that way. > > > > I'd *much* rather just keep the 8-byte padding. What was so > > problematic with that? It worked. It's been around forever. Removing > > it is the bug. > > Let's at least fix it, then. processor.h has: > > #define INIT_TSS { \ > .x86_tss = { \ > .sp0 = sizeof(init_stack) + (long)&init_stack, \ > > (moved in -tip) > > That's bogus, and this bogosity is why I broke 32-bit -next in the > first place: I assumed it was correct. > > I'll get it if no one beats me to it. Please do and please post patches ASAP so that I can move tip:x86/asm back into a correct state again. Thanks, Ingo