lkml.org 
[lkml]   [2012]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] proc: fix mount -t proc -o AAA
    Date
    On Sunday 25 of March 2012, Vasiliy Kulikov wrote:
    > On Sun, Mar 25, 2012 at 09:24 +0200, Arkadiusz Miśkiewicz wrote:
    > > but there is another problem - unmounting it and mounting without options
    > > causes old option to persist:
    > >
    > > # mount none /proc -t proc -o hidepid=2
    > > # umount /proc
    > > # mount none /proc -t proc
    > > # grep "/proc" /proc/mounts
    > > none /proc proc rw,relatime,hidepid=2 0 0
    > >
    > > There should be no hidepid=2 now.
    >
    > No, that's an expected behaviour.
    >
    > Procfs is a special filesystem. Mount options are not reset on each
    > mount(2) as you can mount procfs multiple times at different mount points
    > (/proc/, /aaa/proc/, etc.). Each time you add mount options they are
    > applied to _each_ mount point because there is no per-mount point sb, but
    > there is a per pid_ns superblock: pid_ns itself. All options are stored
    > at pid_ns.
    >
    > When you mount it another time without any option nothing should change
    > at the old mount points. When you umount the last mount point all mount
    > options are still stored. When you mount it again old options are used
    > (unless you override them).

    I wonder if it should support noxx options then (like nogid, nohidepid) ?

    --
    Arkadiusz Miśkiewicz PLD/Linux Team
    arekm / maven.pl http://ftp.pld-linux.org/
    --
    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: 2012-03-25 19:43    [W:0.021 / U:88.504 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site