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: Mon, 10 Jun 2024 15:00:25 +0300
From: George Stark <gnstark@...utedevices.com>
To: <broonie@...nel.org>, <lgirdwood@...il.com>
CC: <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<kernel@...utedevices.com>, George Stark <gnstark@...utedevices.com>
Subject: [PATCH 1/1] regulator: core: add warning for not-recoverable state

If regulator is always-on or boot-on then it's expected to be on while
being probed so add warning if such a regulator is in not-recoverable
state during initialization.

Signed-off-by: George Stark <gnstark@...utedevices.com>
---
 drivers/regulator/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index a968dabb48f5..133789eb3d71 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1251,6 +1251,10 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
 		int current_uV = regulator_get_voltage_rdev(rdev);

 		if (current_uV == -ENOTRECOVERABLE) {
+			if (rdev->constraints->always_on || rdev->constraints->boot_on)
+				rdev_warn(rdev,
+					  "boot-on / always-on regulator is in not-recoverable state\n");
+
 			/* This regulator can't be read and must be initialized */
 			rdev_info(rdev, "Setting %d-%duV\n",
 				  rdev->constraints->min_uV,
--
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ