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
| ||
|
Date: Sun, 25 Mar 2012 19:36:12 +0400 From: Vasiliy Kulikov <segoon@...nwall.com> To: Arkadiusz Miśkiewicz <a.miskiewicz@...il.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 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@...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