lkml.org 
[lkml]   [2012]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] proc: fix mount -t proc -o AAA
    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).

    Thanks,

    --
    Vasiliy Kulikov
    http://www.openwall.com - bringing security into open computing environments
    --
    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 17:39    [W:0.029 / U:237.152 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site