lkml.org 
[lkml]   [2012]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: PT_EXITKILL (Was: pdeath_signal)
    Hi Amnon,

    On 11/08, Amnon Shiloh wrote:
    >
    > Thanks for the patch, I tried it and it works nicely!

    OK, thanks. I'll wait for other comments a bit and then send
    the patch to Andrew.

    > Also, I just noticed that this new option (PTRACE_O_EXITKILL) is not
    > safe with ptrace(PTRACE_TRACEME)+execve, because the parent may die
    > before even having a chance to set PTRACE_O_EXITKILL!

    Not safe? I guess you meant that PTRACE_O_EXITKILL can't prevent
    this race? Yes sure. Or the parent can die before it does
    PTRACE_O_EXITKILL.

    > However, that's easy to fix by using PTRACE_ATTACH instead.

    Or the child can check getppid() == saved_parent_pid after PTRACE_TRACEME.

    But if you switch to PTRACE_ATTACH, I'd suggest to use PTRACE_SEIZE.
    Note that, in particular, this allows you to specify the options at
    attach.

    As for PF_NO_SIGSTOP, I'll write another email.

    Oleg.



    \
     
     \ /
      Last update: 2012-11-08 14:21    [W:2.503 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site