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:	Thu, 24 Apr 2008 16:30:48 -0700
From:	Matthew Dharm <mdharm-kernel@...-eyed-alien.net>
To:	Greg KH <greg@...ah.com>
Cc:	Pekka J Enberg <penberg@...helsinki.fi>,
	Alan Stern <stern@...land.harvard.edu>,
	linux-kernel@...r.kernel.org, dsd@...too.org,
	linux-usb@...r.kernel.org, vegardno@....uio.no,
	James.Bottomley@...senPartnership.com, linux-scsi@...r.kernel.org
Subject: Re: [RFC/PATCH] usb-storage: wait for device scanning before mounting root

On Thu, Apr 24, 2008 at 03:56:04PM -0700, Greg KH wrote:
> On Fri, Apr 25, 2008 at 12:25:04AM +0300, Pekka J Enberg wrote:
> > On Thu, 24 Apr 2008, Pekka J Enberg wrote:
> > > > From: Pekka Enberg <penberg@...helsinki.fi>
> > > > 
> > > > Add a new kernel config option CONFIG_LATE_ROOT_MOUNT that makes the kernel
> > > > wait until background scanning of USB mass storage devices is complete before
> > > > attempting to mount the root filesystem.
> > > > 
> > > > The config option is an alternative to the root_delay= kernel parameter
> > > > solution people currently use to boot from USB mass storage devices.
> > 
> > On Thu, 24 Apr 2008, Alan Stern wrote:
> > > This doesn't take into account what happens when CONFIG_SCSI_SCAN_ASYNC
> > > is set.
> > 
> > Oh, right. Thanks! So something like the following should take care of it.
> > 
> > 		Pekka
> > 
> > Subject: [RFC/PATCH] usb-storage: wait for device scanning before mounting root V2
> > From: Pekka Enberg <penberg@...helsinki.fi>
> > 
> > Add a new kernel config option CONFIG_LATE_ROOT_MOUNT that makes the kernel
> > wait until background scanning of USB mass storage devices is complete before
> > attempting to mount the root filesystem.
> 
> What happens if there is no USB device present in the system?  Because
> of that, there is no way that this option could ever be enabled by any
> distro or anyone wanting their kernel to run on more than one machine :(
> 
> I don't like it.

This also has all sorts of races between do_mounts 'waiting' and the actual
USB device enumeration.  It's entirely possible that the kernel loads via
BIOS, the USB drivers are loaded, that forces devices to disconnect/reset,
and they take a while to re-enumerate.  During that delay, the kernel gets
to do_mount; now, no devices show in this "waiting for scan" count.

The right way to do this is via initrd and something like devlabel to wait
for a specific device to appear.  On some systems, you may want to wait for
several devices to appear.

I don't like this either.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@...-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

What, are you one of those Microsoft-bashing Linux freaks?
					-- Customer to Greg
User Friendly, 2/10/1999

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ