Messages in this thread | | | Date | Thu, 23 Jul 2015 14:59:56 -0700 | Subject | Re: Dealing with the NMI mess | From | Linus Torvalds <> |
| |
On Thu, Jul 23, 2015 at 2:50 PM, Andy Lutomirski <luto@amacapital.net> wrote: > > What if we relax it slightly: "if the breakpoint happened during that > interrupts-off region, I will clear all *kernel breakpoints* in %dr7 > to guarantee forward progress"? > > Watchpoints don't need RF to make forward progress, and, by leaving > watchpoints alone, we avoid breaking gdb.
Hmmm. I thought watchpoints were "before the instruction" too, but that's just because I haven't used them in ages, and I didn't remember the details. I just looked it up.
You're right - the memory watchpoints trigger after the instruction has executed, so RF isn't an issue. So yes, the only issue is instruction breakpoints, and those are the only ones we need to clear.
And that makes it really easy.
So yes, I agree. We only need to clear all kernel breakpoints.
So we don't even need that _TIF_USER_WORK_MASK thing, because user space isn't setting kernel code breakpoints, it's just kgdb.
Sounds good to me.
Linus
| |