lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V4 part 4 15/24] x86/db: Split out dr6/7 handling
On Fri, May 08, 2020 at 01:58:30PM +0200, Thomas Gleixner wrote:
> Peter Zijlstra <peterz@infradead.org> 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.

I don't think the selftests try and set hardware breakpoints in the
kernel.

\
 
 \ /
  Last update: 2020-05-08 14:47    [W:0.127 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site