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:   Thu, 20 Oct 2022 00:03:45 +0200
From:   Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     linux-hwmon@...r.kernel.org, jdelvare@...e.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (jc42) Restore the min/max/critical temperatures
 on resume

Hi Guenter,

Thank you for the quick feedback!

On Wed, Oct 19, 2022 at 11:51 PM Guenter Roeck <linux@...ck-us.net> wrote:
[...]
> > +     if (data->valid || data->temp[t_min])
>
> This contradicts "with applying the previous values by only configuring
> them if they are known valid". It explicitly applies the values if they
> are marked as not valid, and it also applies the values if they are 0
> (I don't really see the value of doing that).
>
> Sorry, I don't understand the logic. Did you mean to use "&&" instead
> of "||" ?
My understanding is that that:
1) data->valid = true is only set in jc42_update_device() (which is
only called when reading back the values from the registers)
2) jc42_write() can write values without setting data->value = true
In other words: if jc42_read() is never called but jc42_write() is
then we still have some setting to apply while data->valid is false.
Whether that's possible in reality is something that I'm not sure
about.

If your suggestion is to simplify this to use data->valid only then I
can do that.
It would be great if you could also comment on whether
jc42_update_device() should be called from jc42_suspend() to give the
driver the chance to at least read the data once (and set data->valid)
if this has not happened before.


Best regards,
Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ