Re: [patch 1/1] ptrace POKEUSR: add comment about the DR7 check.

From: Andi Kleen
Date: Tue Nov 02 2004 - 22:26:52 EST


On Wed, Nov 03, 2004 at 12:20:26AM +0100, blaisorblade_spam@xxxxxxxx wrote:
> But since the original ia32 emulation code has this comment:
>
> /* You are not expected to understand this ... I don't neither. */

That was a joke, I actually went through the bits.

>
> I am dubious that the code in ptrace32.c is wrong: does x86_64 supports
> 8byte-wide watchpoints in 32-bit emulation? I've checked the AMD manual Vol.
> 2 (no. 24593), which says that to set the length to 8 bits "long mode must be
> enabled". This means, actually, that the current code is safe, notwithstanding

Yes, it does AFAIK. "long mode" just refers to the state of the whole
system.

> ret = 0;
> break;
> case offsetof(struct user, u_debugreg[7]):
> + /* See arch/i386/kernel/ptrace.c for an explaination of
> + * this awkward check.*/

You have a typo there.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/