Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757423Ab0GNTPt (ORCPT ); Wed, 14 Jul 2010 15:15:49 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:43260 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754365Ab0GNTPs convert rfc822-to-8bit (ORCPT ); Wed, 14 Jul 2010 15:15:48 -0400 MIME-Version: 1.0 In-Reply-To: <20100714184642.GA9728@elte.hu> References: <20100714154923.947138065@efficios.com> <20100714155804.049012415@efficios.com> <20100714170617.GB4955@Krystal> <20100714184642.GA9728@elte.hu> Date: Wed, 14 Jul 2010 12:14:01 -0700 Message-ID: Subject: Re: [patch 1/2] x86_64 page fault NMI-safe From: Linus Torvalds To: Ingo Molnar Cc: Mathieu Desnoyers , LKML , Andrew Morton , 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 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1042 Lines: 23 On Wed, Jul 14, 2010 at 11:46 AM, Ingo Molnar wrote: >> ?NMI entry: > > I think at this point [NMI re-entry] we've corrupted the top of the NMI kernel > stack already, due to entering via the IST stack mechanism, which is > non-nesting and which enters at the same point - right? Yeah, you're right, but we could easily fix that up. We know we don't need any stack for the nested case, so all we would need to do is to just subtract a small bit off %rsp, and copy the three words or so to create a "new" stack for the non-nested case. > We could solve that by copying that small stack frame off before entering the > 'generic' NMI routine - but it all feels a bit pulled in by the hair. Why? It's much cleaner than making the _real_ codepaths much worse. 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/