Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757983Ab0GNWhu (ORCPT ); Wed, 14 Jul 2010 18:37:50 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:47297 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757083Ab0GNWhs (ORCPT ); Wed, 14 Jul 2010 18:37:48 -0400 MIME-Version: 1.0 In-Reply-To: <20100714222115.GA30122@Krystal> References: <20100714154923.947138065@efficios.com> <20100714155804.049012415@efficios.com> <20100714170617.GB4955@Krystal> <20100714203940.GC22096@Krystal> <20100714222115.GA30122@Krystal> Date: Wed, 14 Jul 2010 15:37:38 -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: 1211 Lines: 25 On Wed, Jul 14, 2010 at 3:21 PM, Mathieu Desnoyers wrote: > > If we can find a clean way to handle this NMI vs iret problem outside of the > entry_*.S code, within NMI-specific code, I'm indeed all for it. entry_*.s is > already complicated enough as it is. I think checking the %rip at NMI entry > could work out. I think the %rip check should be pretty simple - exactly because there is only a single point where the race is open between that 'mov' and the 'iret'. So it's simpler than the (similar) thing we do for debug/nmi stack fixup for sysenter that has to check a range. The only worry is if that crazy paravirt code wants to paravirtualize the iretq. Afaik, paravirt does that exactly because they screw up iret handling themselves. Maybe we could stop doing that stupid iretq paravirtualization, and just tell the paravirt people to do the same thing I propose, and just allow nesting. 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/