[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 03/10] ptrace: implement PTRACE_SEIZE
On 05/18, Tejun Heo wrote:
> I've been thinking about Jan's suggestion to make ATTACH and DETACH
> not require tracee to trap. We already have this for DETACH for cases
> where the tracer is killed

Yes, I still think that the new DETACH_XXX request which doesn't need
the stopped tracee makes sense. Yes, we have PTRACE_INTERRUPT. But please
recall the previous discussion, it is possible that the tracee can't
react to PTRACE_INTERRUPT and trap because it waits for other threads
we are tracing.

And. Currently there is no way to detach a zombie leader. Perhaps we
should change do_wait(), but it is not clear what should we do if the
tracer is the real parent (we already discussed this a bit).

> and it seems it wouldn't be too difficult
> to make that happen for ATTACH either

Yes, I think this is simple to do. Do we need this? I leave this up
to you and Jan.

To me personally attach-implies-trap looks more natural, but probably
gdb has another opinion.

Anyway. IIUC, gdb wants the auto-attach-on-clone without the trap,
this is more important but this opens a lot of problems.

> and for that to be truly useful
> I suppose PTRACE_SETOPTIONS shouldn't require trapped state either.

Hmm. Why? we could pass this options along with PTRACE_SEIZE?

> Jan, would that be enough for the use cases you have on mind?



 \ /
  Last update: 2011-05-23 14:47    [W:0.147 / U:2.692 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site