Re: More trouble with i386 EFLAGS and ptrace

From: Roland McGrath
Date: Mon Mar 07 2005 - 16:39:03 EST


> Is this semantically different from the patch I posted, i.e. is there
> any case which one of them covers and not the other?

Yes, the second case that I described when I said there were two cases!
(Sheesh.) To repeat, when the process was doing PTRACE_SINGLESTEP and then
stops on some other signal rather than because of the single-step trap
(e.g. single-stepping an instruction that faults), ptrace will show TF set
in its registers. With my patch, it will show TF clear.

> That is an inability to set breakpoints in the vsyscall page. Andrew
> told me (last May, wow) that he thought this worked in Fedora, but I
> haven't seen any signs of the code. It would certainly be a Good Thing
> if it is possible!

Fedora kernels use a normal mapping (with randomized location) for the
page, rather than the fixed high address in the vanilla kernel. The
FIXADDR_USER_START area is globally mapped in a special way not using
normal vma data structures, and is permanently read-only in all tasks.
COW via ptrace works normally for Fedora's flavor, but no writing is ever
possible to the fixmap page.


Thanks,
Roland
-
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/