Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbbGXNdw (ORCPT ); Fri, 24 Jul 2015 09:33:52 -0400 Received: from casper.infradead.org ([85.118.1.10]:38227 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900AbbGXNdt (ORCPT ); Fri, 24 Jul 2015 09:33:49 -0400 Date: Fri, 24 Jul 2015 15:33:43 +0200 From: Peter Zijlstra To: Willy Tarreau Cc: Steven Rostedt , Linus Torvalds , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Thomas Gleixner , Brian Gerst Subject: Re: Dealing with the NMI mess Message-ID: <20150724133343.GM18673@twins.programming.kicks-ass.net> References: <20150723173105.6795c0dc@gandalf.local.home> <20150724081326.GO25159@twins.programming.kicks-ass.net> <20150724075841.40f209f4@gandalf.local.home> <20150724124304.GH19282@twins.programming.kicks-ass.net> <20150724090342.6d11e16d@gandalf.local.home> <20150724132128.GA3612@1wt.eu> <20150724133013.GI19282@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150724133013.GI19282@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 757 Lines: 20 On Fri, Jul 24, 2015 at 03:30:13PM +0200, Peter Zijlstra wrote: > > > But do we care if we do hit one? The return from the #DB handler can > > > use a RET. Right? > > Look at do_debug(), it has lovely bits like: > > preempt_conditional_sti(); > > in it, we do _NOT_ want to be re-enabling interrupts if we're called > from an !IF context, that'd be _bad_. Ah, I forgot the conditional thing was the STI depending on regs->flags & IF.. In any case, better safe than sorry and simply not do #DB ever if !IF. -- 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/