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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Oct 2011 14:07:41 -0700
From:	David Daney <david.daney@...ium.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Grant Likely <grant.likely@...retlab.ca>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Greg Kroah-Hartman <greg@...ah.com>,
	Dilan Lee <dilee@...dia.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Manjunath GKondaiah <manjunath.gkondaiah@...aro.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [RFC PATCH v3] drivercore: Add driver probe deferral mechanism

On 10/11/2011 01:47 PM, Andrew Morton wrote:
> On Thu, 22 Sep 2011 12:51:23 -0600
> Grant Likely<grant.likely@...retlab.ca>  wrote:
>
>> Allow drivers to report at probe time that they cannot get all the resources
>> required by the device, and should be retried at a later time.
>>
>> This should completely solve the problem of getting devices
>> initialized in the right order.  Right now this is mostly handled by
>> mucking about with initcall ordering which is a complete hack, and
>> doesn't even remotely handle the case where device drivers are in
>> modules.  This approach completely sidesteps the issues by allowing
>> driver registration to occur in any order, and any driver can request
>> to be retried after a few more other drivers get probed.
>
> What happens is there is a circular dependency, or if a driver's
> preconditions are never met?  AFAICT the code keeps running the probe
> function for ever.
>

The deferred probe functions are only run once per (other) driver 
binding event.  So once you quit registering new drivers, no further 
probing is done.  There is no endless loop happening here.

If the preconditions are never met, the driver will just sit in the list 
waiting.


> If so: bad.  The kernel should detect such situations, should
> exhaustively report them and if possible, fix them up and struggle
> onwards.
>

I don't think we should actively report anything, but being able to 
inspect the deferred probe list from user space might be useful for 
diagnosing problems


David Daney

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