From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757229AbcGZQr4 (ORCPT ); Tue, 26 Jul 2016 12:47:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43112 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757012AbcGZQrz (ORCPT ); Tue, 26 Jul 2016 12:47:55 -0400 Date: Tue, 26 Jul 2016 11:47:51 -0500 From: Josh Poimboeuf To: Andy Lutomirski Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , "linux-kernel@vger.kernel.org" , Linus Torvalds , Steven Rostedt , Brian Gerst , Kees Cook , Peter Zijlstra , Frederic Weisbecker , Byungchul Park Subject: Re: [PATCH 10/19] x86/dumpstack: add get_stack_info() interface Message-ID: <20160726164751.44xcnegpw2x3v2o6@treble> References: <88568c51f1a253210897e368262d0f5fa1d7e97a.1469136008.git.jpoimboe@redhat.com> <20160722235459.xtikpj263hroloqo@treble> <20160723140439.36bhw5aslcxlkf3f@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 26 Jul 2016 16:47:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2016 at 05:09:44PM -0700, Andy Lutomirski wrote: > On Sat, Jul 23, 2016 at 7:04 AM, Josh Poimboeuf wrote: > > Am I correct in understanding that there can only be one level of NMI > > nesting at any given time? If so, could we make it easier on the > > unwinder by putting the nested NMI on a separate software stack, so the > > "next stack" pointers are always in the same place? Or am I just being > > naive? > > I think you're being naive :) Another dumb question: since NMIs are reentrant, have you considered removing the NMI IST entry, and instead just have NMIs keep using the current stack? The first NMI could then be switched to an NMI software stack, like IRQs (assuming there's a way to do that atomically!). And then determining the context of subsequent NMIs would be straightforward, and we'd no longer need to jump through all those horrible hoops in the entry code to deal with NMI nesting. Now you can tell me what else I'm missing... -- Josh