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]
Message-ID: <8dec9c47-d13d-4e59-b1ca-fcb9e3beccbd@roeck-us.net>
Date: Mon, 28 Apr 2025 00:33:44 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Eugene Shalygin <eugene.shalygin@...il.com>,
 Alexei Safin <a.safin@...a.ru>
Cc: Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
 linux-kernel@...r.kernel.org, lvc-project@...uxtesting.org
Subject: Re: [PATCH v2] hwmon: (asus-ec-sensors) add WARN_ONCE() on invalid
 sensor index

On 4/28/25 00:11, Eugene Shalygin wrote:
> On Fri, 25 Apr 2025 at 22:00, Alexei Safin <a.safin@...a.ru> wrote:
>>
>> Prevent undefined behavior by adding WARN_ONCE() when find_ec_sensor_index()
>> returns a negative value.
> 
> I'm not sure about WARN_ONCE, does it bring anything useful? Clients
> see the error in the return value, sensor reading is absent, do we
> need to duplicate that in the log? Guenter, may I leave it up to you,
> please?
> 

If this is seen, it is an implementation error which needs to be fixed.
Returning an error to userspace will leave users annoyed but will not
result in a fix. The warning backtrace is warranted in this situation.

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ