Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754018AbbGWVqE (ORCPT ); Thu, 23 Jul 2015 17:46:04 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:32858 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbbGWVqB (ORCPT ); Thu, 23 Jul 2015 17:46:01 -0400 MIME-Version: 1.0 In-Reply-To: References: <20150723212042.GN25159@twins.programming.kicks-ass.net> From: Andy Lutomirski Date: Thu, 23 Jul 2015 14:45:40 -0700 Message-ID: Subject: Re: Dealing with the NMI mess To: Linus Torvalds Cc: Peter Zijlstra , X86 ML , "linux-kernel@vger.kernel.org" , Willy Tarreau , Borislav Petkov , Thomas Gleixner , Steven Rostedt , Brian Gerst Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 31 On Thu, Jul 23, 2015 at 2:35 PM, Linus Torvalds wrote: > On Thu, Jul 23, 2015 at 2:20 PM, Peter Zijlstra wrote: >> >> So the NMI could trigger userspace debug register faults, and simply >> disabling them would make the whole debug register thing entirely >> unreliable. > > We could easily set something to re-enable them for when we actually > return to user space. I'd be ok with just setting the > _TIF_USER_WORK_MASK. > > But even that should not be a requirement for the basic stability and > core integrity of the kernel. Not like the current horrid mess with > NMI nesting and ESP fixing etc. > > And realistically, nobody will ever even notice. So the whole "ok, we > can use _TIF_USER_WORK_MASK to re-enable dr7" is a tiny tiny detail > that is more like cleaning up things, not a core issue. > Or we just re-enable them on the way out of NMI (i.e. the very last thing we do in the NMI handler). I don't want to break regular userspace gdb when perf is running. --Andy -- 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/