On Thu, 21 Sep 2000, Linus Torvalds wrote:
>
> I would suggest an alternate patch, which would be something like
>
> if (SIGTRAP is pending in tsk)
> goto clear_dr7;
Actually, even simpler approach:
- always clear db7 after sending signal - don't test for pending or for
kernel mode at all at that point.
- re-load %db7 at the top of the for(;;) loop in do_signal().
That should mean that you will actually get a debug signal for ALL
triggers of the debug registers, except you'll only get one for kernel
mode.
(For extra credit, make the patch use "eip=-1" in the siginfo structure if
the trap happened in kernel mode, so that we don't leak kernel addresses
to user space. Not that it would be much of a security issue, but it's a
beauty wart that could easily be cleared up).
Send me that patch, tested, and I'll happily apply it.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/