lkml.org 
[lkml]   [2020]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [GIT PULL] Please pull proc and exec work for 5.7-rc1
    On Wed, Apr 29, 2020 at 11:33 AM Jann Horn <jannh@google.com> wrote:
    >
    > > That sequence count approach would be a much simpler change.
    >
    > In that model, what should happen if someone tries to attach to a
    > process that's in execve(), but after the point of no return in
    > de_thread()? "Abort" after the point of no return normally means
    > force_sigsegv(), right?

    It would by definition have to check the sequence number at the end of
    install_exec_creds() (where we currently release the
    cred_guard_mutex).

    And yes, that's after the point of no return, so it would cause the
    usual "kill the process".

    We could check earlier too (while still able to return errors) and
    return -EAGAIN or something, but that wouldn't obviate the need for
    that final check, iut would just shrink the window for the "fatal
    exec" case.

    Linus

    \
     
     \ /
      Last update: 2020-04-29 20:58    [W:5.281 / U:1.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site