Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754585AbbGXUv0 (ORCPT ); Fri, 24 Jul 2015 16:51:26 -0400 Received: from casper.infradead.org ([85.118.1.10]:51168 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbbGXUvZ (ORCPT ); Fri, 24 Jul 2015 16:51:25 -0400 Date: Fri, 24 Jul 2015 22:51:19 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Willy Tarreau , Steven Rostedt , Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Thomas Gleixner , Brian Gerst Subject: Re: Dealing with the NMI mess Message-ID: <20150724205119.GM19282@twins.programming.kicks-ass.net> References: <20150724090342.6d11e16d@gandalf.local.home> <20150724132128.GA3612@1wt.eu> <20150724103127.3c3f4693@gandalf.local.home> <20150724145901.GB3612@1wt.eu> <20150724111621.34713023@gandalf.local.home> <20150724152637.GC3612@1wt.eu> <20150724153054.GK19282@twins.programming.kicks-ass.net> <20150724195509.GM2859@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 1043 Lines: 28 On Fri, Jul 24, 2015 at 01:22:11PM -0700, Linus Torvalds wrote: > On Fri, Jul 24, 2015 at 12:55 PM, Peter Zijlstra wrote: > > > > I worry that we'll end up running the do_debug() handlers from effective > > NMI context. > > > > The NMI might have preempted locks which these handlers require etc.. > > If #DB takes any locks like that, then #DB is broken. > > Pretty much by definition, a data breakpoint can happen on pretty much > absolutely any code. This is in no way NMI-specific as far as I can > tell. > > Do we really take locks in the #DB handler? do_debug() send_sigtrap() force_sig_info() spin_lock_irqsave() Now, I don't pretend to understand the condition before send_sigtrap(), so it _might_ be ok, but it sure as heck could do with a comment. -- 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/