Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934288Ab0GOStJ (ORCPT ); Thu, 15 Jul 2010 14:49:09 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:59390 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934217Ab0GOStD (ORCPT ); Thu, 15 Jul 2010 14:49:03 -0400 MIME-Version: 1.0 In-Reply-To: References: <20100714155804.049012415@efficios.com> <20100714170617.GB4955@Krystal> <20100714203940.GC22096@Krystal> <20100714222115.GA30122@Krystal> <20100715183153.GA9276@Krystal> Date: Thu, 15 Jul 2010 11:48:10 -0700 Message-ID: Subject: Re: [patch 1/2] x86_64 page fault NMI-safe From: Linus Torvalds To: Mathieu Desnoyers Cc: LKML , Andrew Morton , Ingo Molnar , Peter Zijlstra , Steven Rostedt , Steven Rostedt , Frederic Weisbecker , Thomas Gleixner , Christoph Hellwig , Li Zefan , Lai Jiangshan , Johannes Berg , Masami Hiramatsu , Arnaldo Carvalho de Melo , Tom Zanussi , KOSAKI Motohiro , Andi Kleen , "H. Peter Anvin" , Jeremy Fitzhardinge , "Frank Ch. Eigler" , Tejun Heo Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 25 On Thu, Jul 15, 2010 at 11:43 AM, Linus Torvalds wrote: > > But maybe I'm missing something. Hmm. Of course - one way of solving this might be to just make the 32-bit case switch stacks in software. That might be a good idea regardless, and would not be complicated. We already do that for sysenter, but the NMI case would be simpler because we don't need to worry about being re-entered by NMI/DEBUG during the stack switch. And since we have to play some games with moving the data on the stack around _anyway_, doing the whole "switch stacks entirely rather than just subtract a bit from the old stack" would be fairly logical. So I think you may end up being right: we don't need to save the original NMI stack pointer, because we can make sure that the replacement stack (that we need anyway) is always deterministic. Linus -- 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/