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] [day] [month] [year] [list]
Message-ID: <20221118220711.GA685644@roeck-us.net>
Date:   Fri, 18 Nov 2022 14:07:11 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Naresh Solanki <naresh.solanki@...ements.com>
Cc:     linux-hwmon@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
        Patrick Rudolph <patrick.rudolph@...ements.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] hwmon: pm_bus: core: Implement regulator get_status

On Fri, Nov 18, 2022 at 08:32:26PM +0530, Naresh Solanki wrote:
> > > +
> > > +	mutex_lock(&data->update_lock);
> > > +	status = pmbus_get_status(client, page, PMBUS_STATUS_WORD);
> > > +	mutex_unlock(&data->update_lock);
> > 
> > I do not see the point of this lock here and elsewhere in this function.
> > If you want to ensure that the status is consistent, you would need to
> > hold the lock over the entire function, not repeatedly acquire and release
> > it. Even then there would be no guarantee that the status is consistent
> > because it can change anytime on the chip side.
> Will hold the lock till end of function. Agree that chip side, status may
> change any moment.
> 
> With this I got a question i.e., what should regulator status be reported if
> regulator had previously encountered some fault but currently while reading
> the status found that pgood bit indicate output power is good.
> Should we continue to still report historical fault or instead report
> current regulator output status based on pgood ?
> 
> IMHO, it should report regulator status as ON if pgood bit is clear(i.e.,
> output is good) & leave previously encountered error reporting to
> get_error_flag function.
> 
> I need your Suggestion here.
> 
That is really a question for the regulator subsystem. Personally I think
the current status should be reported, but that is just me.

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ