Messages in this thread | | | Date | Mon, 9 May 2011 18:58:57 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 04/11] ptrace: implement PTRACE_INTERRUPT |
| |
On 05/08, Tejun Heo wrote: > > Currently, there's no way to trap a running ptracee short of sending a > signal which has various side effects. This patch implements > PTRACE_INTERRUPT which traps ptracee without any signal or job control > related side effect. > > The implementation is almost trivial. It uses the same trap site and > event as PTRACE_SEIZE. A new trap flag JOBCTL_TRAP_INTERRUPT is > added, which is set on PTRACE_INTERRUPT and cleared when tracee > commits to INTERRUPT trap. As INTERRUPT should be useable regardless > of the current state of tracee, task_is_traced() test in > ptrace_check_attach() is skipped for INTERRUPT.
Heh. As usual, I can never review the patches in time. Will continue tomorrow.
Right now I am a bit puzzled why do we have 2 bits, JOBCTL_TRAP_INTERRUPT and JOBCTL_TRAP_SEIZE... But I didn't read this + other patches yet.
At first glance, JOBCTL_TRAP_INTERRUPT has the same problem with the killed tracee. I think this is easy to fix.
Oleg.
| |