lkml.org 
[lkml]   [2005]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] private mounts
    Ram wrote:
    > > I've looked at the code. Look in fs/proc/base.c (Linux 2.6.10),
    > > proc_root_link().
    > >
    > > I don't see anything there to prevent you from traversing to the
    > > mounts in the other namespace.
    > >
    > > So why is it failing? Any idea?
    >
    > Since you are traversing a symlink, you will be traversing the symlink
    > in the context of traversing process's namespace.
    >
    > If process 'x' is traversing /proc/y/root , the lookup for the root
    > dentry will happen in the context of process x's namespace, and not
    > process y's namespace. Hence process 'x' wont really get into
    > the namespace of the process y.

    Lookups don't happen in the context of a namespace.

    They happen in the context of a vfsmnt. And the switch to a new
    vfsmnt is done by matching against (dentry,parent-vfsmnt) pairs.
    current->namespace is only checked for mount & unmount operations, not
    for path lookups.

    Which means proc_root_link, when it switches to the vfsmnt at the root
    of the other process, should traverse into the tree of vfsmnts which
    make up the other namespace.

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

    \
     
     \ /
      Last update: 2005-04-29 00:13    [W:8.667 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site