Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754050AbbGWQrS (ORCPT ); Thu, 23 Jul 2015 12:47:18 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:35160 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753500AbbGWQrH (ORCPT ); Thu, 23 Jul 2015 12:47:07 -0400 MIME-Version: 1.0 In-Reply-To: <20150723121001.2d7d8812@gandalf.local.home> References: <1287f683e32f1bbe7fc545bff675f30dcda8d5c1.1437665045.git.luto@kernel.org> <20150723120125.7c6d74d3@gandalf.local.home> <20150723121001.2d7d8812@gandalf.local.home> From: Andy Lutomirski Date: Thu, 23 Jul 2015 09:46:45 -0700 Message-ID: Subject: Re: [PATCH 2/5] x86/entry/64, entry: Set up a valid sysenter stack and prepare for 32-bit merge To: Steven Rostedt Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Willy Tarreau , Borislav Petkov , Thomas Gleixner , Peter Zijlstra , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1763 Lines: 40 On Thu, Jul 23, 2015 at 9:10 AM, Steven Rostedt wrote: > On Thu, 23 Jul 2015 09:04:38 -0700 > Andy Lutomirski wrote: > >> On Thu, Jul 23, 2015 at 9:01 AM, Steven Rostedt wrote: >> > On Thu, 23 Jul 2015 08:31:40 -0700 >> > Andy Lutomirski wrote: >> > >> >> Oddly, 64-bit kernels already allocate a percpu sysenter stack, but >> >> they don't enable it. Enable the stack and tweak the rest of the >> >> sysenter setup code to be similar to the 32-bit version. >> > >> > I'm curious. Did you do any investigation into the 64bit code to why it >> > wasn't set? Do you know if that was just overlooked with some of the >> > merging between i386 and x86_64 systems? >> > >> > I'm not asking you to do it if you have not, but if you have, I think >> > it would be more comforting to know that it was just overlooked than >> > there being some other subtle reason. >> >> I think it's just that it was never necessary. #DB has always used >> IST on x86_64 (IIRC it was like that in the very first commit), so the >> sysenter stack was never actually referenced. >> > > Hmm, should this be commented? If it is never referenced, I could > imagine that would add some confusion to future reviewers of this code. > It is referenced by the SWAPGS_UNSAFE_STACK -> SWAPGS thing, and I'm planning on referencing it more by removing #DB from the debug stack soon (patches written but not tested), so the window of confusion should be short. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/