lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201203251940.58668.a.miskiewicz@gmail.com>
Date:	Sun, 25 Mar 2012 19:40:58 +0200
From:	Arkadiusz Miśkiewicz <a.miskiewicz@...il.com>
To:	Vasiliy Kulikov <segoon@...nwall.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH] proc: fix mount -t proc -o AAA

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ