Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934746Ab0HDU1I (ORCPT ); Wed, 4 Aug 2010 16:27:08 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47656 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758986Ab0HDU1A (ORCPT ); Wed, 4 Aug 2010 16:27:00 -0400 Message-ID: <4C59CC54.7080809@zytor.com> Date: Wed, 04 Aug 2010 13:23:48 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Peter Zijlstra CC: Avi Kivity , Mathieu Desnoyers , LKML , Linus Torvalds , Andrew Morton , Ingo Molnar , 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 , akpm@osdl.org, Jeremy Fitzhardinge , "Frank Ch. Eigler" , David Howells Subject: Re: [patch 2/2] x86 NMI-safe INT3 and Page Fault References: <20100714154923.947138065@efficios.com> <20100714155804.252253097@efficios.com> <4C405078.20707@redhat.com> <20100716144927.GA22516@Krystal> <4C408D0C.5050709@redhat.com> <20100716165855.GA3836@Krystal> <4C409CBA.1050709@redhat.com> <4C409F62.6030303@zytor.com> <1280915205.1923.882.camel@laptop> In-Reply-To: <1280915205.1923.882.camel@laptop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 22 On 08/04/2010 02:46 AM, Peter Zijlstra wrote: > On Fri, 2010-07-16 at 11:05 -0700, H. Peter Anvin wrote: >> >> I really hope noone ever gets the idea of touching user space from an >> NMI handler, though, and expecting it to work... > > Perf actually already does that to unwind user-space stacks... ;-) > > See arch/x86/kernel/cpu/perf_event.c:copy_from_user_nmi() and its users. > > What we do is a manual page table walk (using __get_user_pages_fast) and > simply bail when the page is not available. > That's not really "touching user space", though. -hpa -- 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/