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]
Message-ID: <CACxGe6tGF5RBzaHe6TF1dqVs5hY9p809v5r07kWcguyA2Z8Yzw@mail.gmail.com>
Date:	Tue, 5 Jul 2011 10:27:05 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Greg KH <gregkh@...e.de>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Kay Sievers <kay.sievers@...y.org>,
	linux-kernel@...r.kernel.org, "Rafael J. Wysocki" <rjw@...k.pl>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] drivercore: Add driver probe deferral mechanism

On Tue, Jul 5, 2011 at 10:05 AM, Arnd Bergmann <arnd@...db.de> wrote:
> On Tuesday 05 July 2011, Greg KH wrote:
>> > * go through all initcalls, record any devices that are not yet ready
>> > * retry all devices on the list as long as at least one of them has
>> >   succeeded.
>> > * when a new device gets matched from a module load, do that loop again
>>
>> You don't know when init calls are finished, or if a module is loaded,
>> the driver core isn't that smart at all.
>
> We know when most initcalls are finished (at late_initcall time), and
> after that we don't need to know when a module gets loaded, only
> when a device gets matched, and that's something we do know and
> that Grant's patch uses already.

Yes, I'm thinking about doing exactly that.

>> > late_initcall(retry_devices);
>>
>> I wonder if doing this all from a workqueue in the first place is going
>> to cause problems as probe isn't normally done this way at all.

Problems with drivers or problems with the driver core?  It shouldn't
be a problem for drivers since only drivers that have explicitly
requested deferral will end up with the device added to the deferral
list.

> True. It will definitely cause problems for any driver that calls
> flush_work() in its probe function. We would need a private
> singlethread_workqueue to avoid that.

Ah, good point.  That's easy enough to do.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
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