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


On Fri, 22 Sep 2000, Andi Kleen wrote:
>
> Also unless I'm missing another thing ptrace allows you to put any addresses
> including kernel address into the debug registers, so you could certainly
> get debug traps everywhere, making my original objection valid.

See:

if(addr < (long) &dummy->u_debugreg[4] &&
((unsigned long) data) >= TASK_SIZE-3) break;

> How does this patch look ?

Horrible. It WILL NOT WORK.

It does a access_ok() that uses the debugger address space to determine if
the debuggee is ok.

Also, debugreg6 is not a linear address at all. Only 0-3 are, so only they
should be tested.

Which is exactly what the test that already exists does.

No, it may not be obvious, but it's all there.

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:45    [W:0.060 / U:5.360 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site