Re: Q: utrace_stop() notification

2009-07-21 Thread Roland McGrath
The usage of -ptrace in utrace-ptrace is racy [...] Sure. Replace it. I'm not sure what purpose -ptrace (or ctx-flags) serves for attach/detach. You need somewhere to store the PTRACE_SETOPTIONS state and so forth, sure. But you can probably just handle the attachedness at the utrace level.

Re: Q: utrace_stop() notification

2009-07-20 Thread Oleg Nesterov
On 07/16, Roland McGrath wrote: Looks like a horrible hack, imho. Utrace should know nothing about ptrace. Agreed! Can't we do something like [...] + // SPECIAL!!! must not block/etc + void (*notify_stopped)(...); Part of the point about utrace is to make it

Re: Q: utrace_stop() notification

2009-07-16 Thread Roland McGrath
If -report_xxx() returns UTRACE_STOP the tracee will do utrace_stop eventually. But how can the tracer know the tracee is already TASK_TRACED/-stopped? We don't really have a way. It is something we need to address better. This is the most essential thing that made the old