[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200903161245.dp56m3p3oimgppcf@treble>
Date: Thu, 3 Sep 2020 11:12:45 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Kyle Huey <me@...ehuey.com>,
Alexandre Chartre <alexandre.chartre@...cle.com>,
Robert O'Callahan <rocallahan@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Joel Fernandes <joel@...lfernandes.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Brian Gerst <brgerst@...il.com>,
Andy Lutomirski <luto@...nel.org>,
Daniel Thompson <daniel.thompson@...aro.org>,
stable@...r.kernel.org
Subject: Re: [PATCH 02/13] x86/debug: Allow a single level of #DB recursion
On Wed, Sep 02, 2020 at 03:25:51PM +0200, Peter Zijlstra wrote:
> @@ -863,6 +849,18 @@ static void handle_debug(struct pt_regs
> static __always_inline void exc_debug_kernel(struct pt_regs *regs,
> unsigned long dr6)
> {
> + /*
> + * 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.
> + */
I know this comment was copy/pasted, but I had to stare at the last
paragraph like one of those 3D paintings they used to have at the mall.
Recommended rewording:
* HW_BREAKPOINT_X is disallowed for entry text; all breakpoints
* are disallowed for cpu_entry_area (which includes the entry
* stack).
--
Josh
Powered by blists - more mailing lists