lkml.org 
[lkml]   [2009]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/9] exec_path 1/9: introduce ->exec_path and switch /proc/*/exe


    On Fri, 5 Jun 2009, Christoph Hellwig wrote:
    >
    > On Thu, Jun 04, 2009 at 03:04:22AM +0400, Alexey Dobriyan wrote:
    > > ->exec_path is copied on clone(2) and put at do_exit() time.
    > >
    > > ->exec_path is going to replace struct mm_struct::exe_file et al
    > > and allows to remove VM_EXECUTABLE flag while keeping readlink("/proc/*/exe")
    > > without loop over all VMAs.
    >
    > Why don't you leave it in mm_struct? That'll avoid having to mess with
    > it in clone, and given that exec always replaces the whole VM it's a
    > more natural fit anyway.

    Oh, I didn't even notice that, because I just assumed it was in mm_struct
    already due to the earlier discussion.

    So I concur with Christoph - that field should be in the mm_struct. The
    executable is a "mapping" issue, and goes along with task->mm, and should
    be there, not in task_struct.

    So it should be copied at fork() time when you do the dup_mm(), not
    anywhere else.

    Linus


    \
     
     \ /
      Last update: 2009-10-18 23:28    [W:3.587 / U:0.852 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site