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]
Date:	Mon, 4 Feb 2013 22:19:53 -0600
From:	William Hubbs <w.d.hubbs@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Rob Landley <rob@...dley.net>, linux-kernel@...r.kernel.org,
	mpagano@...too.org
Subject: Re: [PATCH] init: fix name of root device in /proc/mounts

On Mon, Feb 04, 2013 at 06:54:32PM -0800, H. Peter Anvin wrote:
> The difference is that it used to be customary to have a /dev/root symlink; iirc udev created one.  Devtmpfs does not (for largely valid reasons, but it does break some userspaces.)

Correct. The /dev/root symlink is not created any longer. If you boot
with an initramfs this path does not show up in /proc/mounts. If you
boot without one, however, it does.

This patch just makes the /dev/root path not show up at all in
/proc/mounts, regardless of whether an initramfs is used.

Thanks,

William

> Rob Landley <rob@...dley.net> wrote:
> 
> >On 01/31/2013 05:22:09 PM, H. Peter Anvin wrote:
> >> On 01/31/2013 02:51 PM, William Hubbs wrote:
> >> > On a system that does not use an initramfs, /dev/root was always
> >> > listed in /proc/mounts. This breaks software which scans  
> >> /proc/mounts to
> >> > determine which file systems are mounted since /dev/root is not a  
> >> valid
> >> > device name.
> >> >
> >> > This changes that processing so that "/dev/root" is only added to
> >> > /proc/mounts if a root device is not specified with the root=  
> >> option on
> >> > the kernel command line.
> >> >
> >> > Signed-off-by: William Hubbs <w.d.hubbs@...il.com>
> >> 
> >> Let me also point out that most of the time, the kernel actually has
> >a
> >> udev device name for an actual device...
> >
> >So your software is broken by overmounts? /dev/root is just one example
> > 
> >of this. (And you can specify a root= on the kernel command line and  
> >have that be parsed by initramfs. I vaguely recall klibc does this...)
> >
> >For an example of how to parse this stuff, how about:
> >
> >   http://landley.net/hg/toybox/file/4ffb735aea59/toys/posix/df.c
> >
> >I.E. parse from the end of the list (most recent match is the  
> >overmount), and eliminate synthetic filesystems. Note that code is from
> > 
> >2006, other people have managed to cope all this time...
> >
> >Rob
> 
> -- 
> Sent from my mobile phone. Please excuse brevity and lack of formatting.

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ