Messages in this thread | | | Date | Thu, 12 May 2011 19:06:17 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 04/11] ptrace: implement PTRACE_INTERRUPT |
| |
On 05/11, Tejun Heo wrote: > > On Tue, May 10, 2011 at 08:08:11PM +0200, Oleg Nesterov wrote: > > > > Hmm. Suddenly I got lost. Perhaps instead JOBCTL_TRAP_INTERRUPT should > > be cleared on any trap too, like SEIZE. > > I don't think that's a good idea especially because there are > functionality differences among different traps. ie. group stop and > interrupt traps support re-trapping on job control events while other > traps don't, so there will be cases where the debugger wants to put > tracee specifically into INTERRUPT trap. It's just cleaner to use and > say that if you ask for INTERRUPT, you get an INTERRUPT.
Hmm. This is not clear to me... OK, I'll read other emails first.
> > Another special (and nasty!) case is PTRACE_TRACEME. I do not know > > how often it is used, but probabaly it is important enough. At least, > > iirc, it is used by strace. Probably we need PTRACE_SEIZEME as well. > > I don't agree. PTRACE_TRACEME predates PTRACE_ATTACH and is > completely redundant. If you can make the child do PTRACE_TRACEME, > you might as well just make it do pause() and PTRACE_SEIZE yourself, > so unless there's something PTRACE_SEIZE can't do, I don't think I'll > be adding SEIZEME.
Heh. I think that you are very right technically and I thought the same. That is why I never mentioned PTRACE_TRACEME before. In fact I never understood why PTRACE_TRACEME exists.
However. Perhaps this is wrong from the practical pov. SEIZEME can simplify the conversion of the existing code. People are lazy, but we need the users of PTRACE_SEIZE.
Anyway. SEIZEME is absolutely trivial. We can add it at any moment, right now this is almost offtopic.
Oleg.
| |