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 Fri, Mar 23, 2012 at 16:15 -0700, Andrew Morton wrote:
    > I'm surprised. "mount -o remount,<options>" doesn't work on a mounted
    > procfs, and nobody noticed until now?
    >
    > The patch looks OK - has it been tested with both valid and invalid
    > mount options?
    >
    >
    > I redid the changelog:
    >
    >
    > From: Vasiliy Kulikov <segoon@openwall.com>
    > Subject: proc: fix mount -t proc -o AAA
    >
    > The proc_parse_options() call from proc_mount() runs only once at boot
    > time. So on any later mount attempt, any mount options are ignored
    > because ->s_root is already initialized.
    >
    > As a consequence, "mount -o remount,<options>" will ignore the options.

    No, remount works as it should. _mount_ doesn't work. Why it was not spotted:
    Live case is:

    1) upstart and systemd don't use /etc/fstab for /proc when mounting it at
    the boot time.
    2) dbus, etc. use /proc/ from the boot, so /proc cannot be umounted without
    dbus stop.

    So, to apply hidepid=X without system reboot procfs should be remounted
    instead of umount+mount.

    > To fix this, parse the mount options unconditionally.

    --
    Vasiliy Kulikov
    http://www.openwall.com - bringing security into open computing environments


    \
     
     \ /
      Last update: 2012-03-25 17:31    [W:2.385 / U:0.540 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site