From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754357AbcHSBA6 (ORCPT ); Thu, 18 Aug 2016 21:00:58 -0400 Received: from smtprelay0254.hostedemail.com ([216.40.44.254]:54429 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753431AbcHSBAz (ORCPT ); Thu, 18 Aug 2016 21:00:55 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:355:379:541:973:988:989:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:5007:6261:7875:7939:10004:10400:10848:11232:11658:11914:12517:12519:13069:13071:13311:13357:13439:14180:14659:21060:21080:21433:30041:30051:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: straw55_687b268e5ef16 X-Filterd-Recvd-Size: 1412 Date: Thu, 18 Aug 2016 11:21:55 -0400 From: Steven Rostedt To: Andy Lutomirski Cc: LKML , Jiri Olsa Subject: Question: Outer NMI can nest if from user mode? Message-ID: <20160818112155.634bebcb@gandalf.local.home> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, I was reading some of the comments in nmi.c and came across this: /* * NMIs can page fault or hit breakpoints which will cause it to lose * its NMI context with the CPU when the breakpoint or page fault does an IRET. * * As a result, NMIs can nest if NMIs get unmasked due an IRET during * NMI processing. On x86_64, the asm glue protects us from nested NMIs * if the outer NMI came from kernel mode, but we can still nest if the * outer NMI came from user mode. What confuses me is "but we can still nest if the outer NMI came from user mode". How can that happen? You mean do_nmi() can be called nested even on x86_64 if the first NMI happened in user mode? -- Steve