Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1586360ybj; Fri, 8 May 2020 05:02:45 -0700 (PDT) X-Google-Smtp-Source: APiQypIAELj2T3O1Ywbzh8fuzZyA5Ofh5kNa7wvbmvhzfKle9e6fWMR3eJ97/c0rgxiWSDUF2ydZ X-Received: by 2002:aa7:de0b:: with SMTP id h11mr1844503edv.133.1588939365698; Fri, 08 May 2020 05:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588939365; cv=none; d=google.com; s=arc-20160816; b=z2ZMJ/Hlf5BFB4KcpLxuestiDRvasrKn92FMHFTrbnFqXb4KrwIeUbQyXty1snmiQW sdoCT+Q2sK4VKgDL7aH6GZ+FkOpj8s698hyxpjDciX0rpnlTLeqP6AzY9dq+M5RFGU6I RdC7cAopev+QtS1163QsNFYypYTC0pxEueQ6EUN9wYiWdaUVIGoEOix/9juwab6KinfL l4cnx7xjDwRhTineSFoAhWwfDxO6I3Q3tvUEi7LULSp4jDtyrA7tMRHTYrsi+AXrtPUA 4dEOxgNNblLZmVhHXfFjOy2Xkc5hQGrVzfdSWxHw5yW3ibdTNBKkpKzN2pB8eNaH1nvd 3xtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=2xXYUtls5cOdj1/PwGhOKGwhdJNeyJZvQECl4kLgDYg=; b=LW1RhWJEU5sPYUvKRG/wSjG+mfTcBhbBI+Ramvn2rCSClfdQmy20BfOE/x/l8ESBHU 7KX+wN2GPWLozxd/91d9uxPFI+r1yRXJVSemcU4yBbSZEnZyEgKX5r+kT5UO70s6D1BU 0Iqp8GmvUe7cN4lf5CeIyb/uF1SJP8RYKLG8eBGfLf824Nb1qipCSAL5eea1fzfQTFUk jHlyWSzZ2YouN/lquRr8xF4uR/v60apijY7HhfCyIlupH5hwgwtfG4y/VQMAMOpNmstz jqtUgrtpTrPRhEcRyCEY/v9hWSo6qfrZj2BT2NbWT0B75jAwnu/sD/FNHwmPLIpRQaBB zqWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch6si734891edb.412.2020.05.08.05.02.22; Fri, 08 May 2020 05:02:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726922AbgEHL7D (ORCPT + 99 others); Fri, 8 May 2020 07:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726636AbgEHL7C (ORCPT ); Fri, 8 May 2020 07:59:02 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62828C05BD43 for ; Fri, 8 May 2020 04:59:02 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jX1eD-0004Qe-4X; Fri, 08 May 2020 13:58:33 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 8CCE1101175; Fri, 8 May 2020 13:58:30 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra , Alexandre Chartre Cc: LKML , x86@kernel.org, "Paul E. McKenney" , Andy Lutomirski , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , Joel Fernandes , Boris Ostrovsky , Juergen Gross , Brian Gerst , Mathieu Desnoyers , Josh Poimboeuf , Will Deacon Subject: Re: [patch V4 part 4 15/24] x86/db: Split out dr6/7 handling In-Reply-To: <20200508085909.GU5298@hirez.programming.kicks-ass.net> References: <20200505134926.578885807@linutronix.de> <20200505135314.808628211@linutronix.de> <16c57a7e-8d39-d77e-915d-41b7f5e042fd@oracle.com> <20200508085909.GU5298@hirez.programming.kicks-ass.net> Date: Fri, 08 May 2020 13:58:30 +0200 Message-ID: <87wo5mk595.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Peter Zijlstra writes: >> > +static __always_inline void debug_enter(unsigned long *dr6, unsigned long *dr7) >> > +{ >> > + /* >> > + * Disable breakpoints during exception handling; recursive exceptions >> > + * are exceedingly 'fun'. >> > + * >> > + * Since this function is NOKPROBE, and that also applies to >> > + * HW_BREAKPOINT_X, we can't hit a breakpoint before this (XXX except a >> > + * HW_BREAKPOINT_W on our stack) >> > + * >> > + * Entry text is excluded for HW_BP_X and cpu_entry_area, which >> > + * includes the entry stack is excluded for everything. >> > + */ >> > + get_debugreg(*dr7, 6); >> >> Do you mean get_debugreg(*dr7, 7); ? > > Shees, I have to go buy a new stack of brown paper bags at this rate, > don't I :/ Not only you, but it's also amazing that the selftests didn't catch that.