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-next>] [day] [month] [year] [list]
Date:	Mon, 14 Sep 2009 12:41:01 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	linux-kernel@...r.kernel.org
Cc:	Liam Girdwood <lrg@...mlogic.co.uk>,
	broonie@...nsource.wolfsonmicro.com
Subject: regulator: adding constraints to regulator_desc?

Hi,

I have a question regarding the constraints of the regulator-framework: If I
understood correctly, there is a struct in regulator_dev which is describing
the constraints on the power-domain-level. As we also have constraints on the
regulator-level, all the regulator drivers do sanity checks in their
set_voltage()-functions. These checks differ and it is not always clear to me
if additional checks other drivers have were forgotten or intentionally omitted
for a specific driver. I also wondered about code-duplication and if it was
maybe worthwhile to simply add 'min' and 'max' members to struct regulator_desc
and let the core do sanity checks (like it does for the constraints on the
power-domain-level). Has this been considered already?

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?

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