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] [day] [month] [year] [list]
Message-ID: <20090914121513.GC3164@pengutronix.de>
Date:	Mon, 14 Sep 2009 14:15:13 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	linux-kernel@...r.kernel.org, Liam Girdwood <lrg@...mlogic.co.uk>
Subject: Re: regulator: adding constraints to regulator_desc?


> The checks at the regulator level should be checking more than can be
> specified in the constraints - they should also be checking that the
> regulator can actually deliver the requested voltage.  It is possible
> that a request could be within the constraints but in between two steps
> that the regulator can deliver and therefore not supportable.  Drivers
> that don't do the additional checks should really be doing them.

I thought about the core just doing the basic checks (inbetween min and max),
so the regulator-drivers could still add more checks if needed. Though...

> These checks could be factored out if we change the API for setting
> voltage to work in terms of voltage selectors and force the
> implementation of list_voltage() but it's never seemed worth the hassle

...if that works out and more checks could be done by the core, this would be
great, I think.

> > One thing which also raised my attention was the beginning of
> > regulator_check_voltage(). It starts with
> 
> > 	BUG_ON(*min_uV > *max_uV);
> 
> > Is it really necessary to halt the kernel? Wouldn't a big warning and -EINVAL
> > do like at the end of the function?
> 
> That should also be OK, yes.  The risk is that once you start loosing
> the plot on regulator stuff the system will often die anyway due to
> power problems but WARN_ON and an error would cover the diagnostics just
> as well.

Okay. Will try to prepare a patch this evening.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ