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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to