Re: [PATCHSET] ptrace,signal: Improve ptrace and job controlinteraction

From: Oleg Nesterov
Date: Wed Mar 23 2011 - 14:47:54 EST


On 03/23, Tejun Heo wrote:
>
> All patches have been reviewed and acked by Oleg and this will be the
> last repost of these patches. They're being committed to a stable git
> tree (will eventually be managed by Oleg) and will be pulled into
> linux-next once -rc1 is released.

Thanks Tejun. The whole series is fine imho.




But of course we need more changes. In particular, there is still the
small problem with the CLD_CONTINUED notification.

__ptrace_unlink() does signal_wake_up() if it adds SIGNAL_STOP_STOPPED.
This is correct, but it should also add TIF_SIGPENDING if
(signal->flags & SIGNAL_CLD_MASK) != 0.

Otherwise, if the stopped tracee was PTRACE_CONT'ed and then SIGCONT
ends the group-stop, the real_parent won't be notified after detach.

Unfortunately, this means that recalc_sigpending_tsk() has to check
SIGNAL_CLD_MASK as well. Do you see another solution?



There is another case. SIGCONT can hit the stopped-but-running-task,
but I don't think we should try to set TIF_SIGPENDING in this case,
you are going to add the trap later.
There is another case. SIGCONT can hit the stopped-but-running-task,
but I don't think we should try to set TIF_SIGPENDING in this case,
you are going to add the trap later.

Oleg.

--
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/