Re: [PATCH 04/11] ptrace: implement PTRACE_INTERRUPT

From: Tejun Heo
Date: Tue May 10 2011 - 05:50:31 EST


Hello,

On Mon, May 09, 2011 at 06:58:57PM +0200, Oleg Nesterov wrote:
> 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.

It eventually ends up with three trap flags - SEIZE, INTERRUPT and
NOTIFY. They all use PTRACE_EVENT_INTERRUPT trap but are different as
for when they're cleared. SEIZE is cleared after any trap. INTERRUPT
is cleared after an INTERRUPT trap and NOTIFY is cleared after
GETSIGINFO. We can add different pending flags and adjust INTERRUPT
flag according to different pending conditions but I think it's
cleaner to have multiple trap flags than multiplexing things over
single trap flag.

> At first glance, JOBCTL_TRAP_INTERRUPT has the same problem with the
> killed tracee. I think this is easy to fix.

Again, isn't this cleared during __ptrace_unlink()?

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/