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:	Sun, 29 Mar 2009 20:06:00 +0200
From:	Kay Sievers <kay.sievers@...y.org>
To:	Thomas Bächler <thomas@...hlinux.org>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: fastboot/async and initramfs: How am I supposed to know when 
	devices are finished initializing?

On Sun, Mar 29, 2009 at 19:52, Thomas Bächler <thomas@...hlinux.org> wrote:
> Kay Sievers schrieb:
>>
>> In initramfs, you have to wait until the device shows up, not for a
>> random module to initialize, or a bus to be scanned -- that can never
>> work correctly, it's pure luck, that your logic was always slower than
>> the kernel.
>>
>> You need a block device -- so you should just wait for the block
>> device, instead of making assumptions about initialization of drivers
>> or buses. :)
>
> I am planning to do that but there is one problem: Usually, the user
> specifies a root device, or a device that I want to open with cryptsetup, or
> anything similar and I can wait until it shows up.

Right, you have to run the tools until the have found all what they
need to give you your root device. Please ask the device mapper
developers to port their stuff to the year 2009. :)

> For lvm however, the user does not specify a specific block device that I
> can wait for, instead lvm scans all available block devices. Now, how do I
> know that the block device that contains my physical volume is already
> there? Maybe I have several hard drives, and several volume groups, so
> should I now call vgchange -ay again and again until the right volume group
> shows up?

Yeah, today, you just call the "broken" tools in a loop until they
give you the device you wait for. :(

Assembling meta devices, or multi-volume devices should be triggered
directly when the underlying devices show up. If auto-assembly (which
kind of works today with md's --incremental) is properly implemented,
you should still be able to just wait for the specified root device to
show up, but the dm/lvm guys need to get the stuff done they talk
about for years now. :)

Thanks,
Kay
--
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