Re: [PATCH 03/10] ptrace: implement PTRACE_SEIZE

From: Tejun Heo
Date: Fri May 20 2011 - 05:13:08 EST


Hello,

On Fri, May 20, 2011 at 09:56:22AM +0100, Pedro Alves wrote:
> > Ptrace API never allowed poking of running tracees.
>
> Which is a bit lame.

Lame as it may be, it would be quite challenging to change that.

> > You need to stop it first.
>
> That was my point... I was just pointing out that GDB will end
> up PTRACE_INTERRUPTing the target anyway. Maybe we could extend
> GDB's "observer" mode to be even more observer-only, and delay
> reading the DSO list and whatever else GDB does on attach until
> the first stop, or to user request. Some archs need reading
> registers as soon as possible in order to actually know which
> arch variant we've attached to. Anyway, this is GDBs business.
> SEIZE not interrupting won't hurt GDB, and is obviously useful for
> some use cases and tracers, _provided the race with SETOPTS is fixed_.

Other than the to-be-removed SIGTRAP, I don't think the trace is
observable from userland. Do you have anything specific on mind?

Thanks.

--
tejun
--
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/