lkml.org 
[lkml]   [2011]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-05-09 19:03    [W:0.363 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site