Commit c639246f authored by Linus Torvalds's avatar Linus Torvalds

Make sure no user level thing can trigger debug breakpoints

inside the kernel on x86 (TF is writable)
parent ff418464
......@@ -557,6 +557,8 @@ asmlinkage void do_debug(struct pt_regs * regs, long error_code)
* allowing programs to debug themselves without the ptrace()
* interface.
*/
if ((regs->xcs & 3) == 0)
goto clear_TF;
if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
goto clear_TF;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment