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] [day] [month] [year] [list]
Date:	Fri, 14 Dec 2007 16:54:26 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Miklos Szeredi <miklos@...redi.hu>
Cc:	trond.myklebust@....uio.no, kay.sievers@...y.org,
	nickpiggin@...oo.com.au, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, jens.axboe@...cle.com,
	fengguang.wu@...il.com, greg@...ah.com, neilb@...e.de,
	linuxram@...ibm.com
Subject: Re: per BDI dirty limit (was Re: -mm merge plans for 2.6.24)


On Fri, 2007-12-14 at 16:14 +0100, Miklos Szeredi wrote:
> > Neil suggested using device numbers which would work, however I think
> > those might not be human friendly. While its easy to find the device
> > number of a given path (eg.: stat -c %d /), its rather hard to find the
> > path belonging to a given device number.
> 
> Ram Pai had a patch which added the device number (among other things)
> to /proc/mounts:
> 
> 
> 
> Subject: [RFC2 PATCH 1/1] VFS: Augment /proc/mount with subroot and
> 	shared-subtree
> From:	Ram Pai <linuxram@...ibm.com>
> To:	"H. Peter Anvin" <hpa@...or.com>
> Cc:	Al Viro <viro@....linux.org.uk>,
> 	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
> 	linux-fsdevel@...r.kernel.org, util-linux-ng@...r.kernel.org
> In-Reply-To: <20070625214640.GC29058@....us.ibm.com>
> Content-Type: text/plain
> Date:	Mon, 16 Jul 2007 11:46:48 -0700
> Content-Transfer-Encoding: 7bit
> Sender:	linux-fsdevel-owner@...r.kernel.org
> X-Mailing-List:	linux-fsdevel@...r.kernel.org
> 
> /proc/mounts in its current state fail to disambiguate bind mounts, especially 
> when the bind mount is subrooted. Also it does not capture propagation state of
> the mounts(shared-subtree). The following patch addresses the problem.
> 
> The following additional fields to /proc/mounts are added.
> 
> propagation-type in the form of <propagation_flag>[:<mntid>][,...]
> 	note: 'shared' flag is followed by the mntid of its peer mount
> 	      'slave' flag is followed by the mntid of its master mount
> 	      'private' flag stands by itself
> 	      'unbindable' flag stands by itself
>    
> mntid -- is a unique identifier of the mount
> major:minor -- is the major minor number of the device hosting the filesystem
> dir -- the subdir in the filesystem which forms the root of this mount
> parent -- the id of the parent mount
> 
> 
> Here is a sample cat /proc/mounts after execution the following commands:
> 
> mount --bind /mnt /mnt
> mount --make-shared /mnt
> mount --bind /mnt/1 /var
> mount --make-slave /var
> mount --make-shared /var
> mount --bind /var/abc /tmp
> mount --make-unbindable /proc
> 
> rootfs / rootfs rw 0 0 private 2 0:1 / 2 
> /dev/root / ext2 rw  0 0 private 16 98:0 / 2 
> /proc /proc proc rw 0 0 unbindable 17 0:3 / 16 
> devpts /dev/pts devpts rw 0 0 private 18 0:10 / 16 
> /dev/root /mnt ext2 rw  0 0 shared:19 19 98:0 /mnt 16 
> /dev/root /var ext2 rw  0 0 shared:21,slave:19 20 98:0 /mnt/1 16 
> /dev/root /tmp ext2 rw  0 0 shared:20,slave:19 21 98:0 /mnt/1/abc 16 
> 
> For example, the last line indicates that :
> 
> 1) The mount is a shared mount.
> 2) Its peer mount of mount with id 20
> 3) It is also a slave mount of the master-mount with the id  19
> 4) The filesystem on device with major/minor number 98:0 and subdirectory 
> 	mnt/1/abc makes the root directory of this mount.
> 5) And finally the mount with id 16 is its parent.
> 
> 
> Testing: symlinked /etc/mtab to /proc/mounts and did some mount and df commands. They worked normally.
> 
> 
> 
> Signed-off-by: Ram Pai <linuxram@...ibm.com>

OK, I guess that would work.

Ram Pai, what is the current status of that work?


--
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