lkml.org 
[lkml]   [2000]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.4.0 i386 watchpoint problems


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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.051 / U:38.300 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site