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]
Message-Id: <20251219-hwmon-fixes-v1-0-21b29097ea3b@gmail.com>
Date: Fri, 19 Dec 2025 17:48:13 +0200
From: Kari Argillander <kari.argillander@...il.com>
To: Kari Argillander <kari.argillander@...il.com>, 
 Guenter Roeck <linux@...ck-us.net>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] hwmon: Minor errno and sysfs fixes

This series contains two small hwmon cleanups.

The first patch fixes an incorrect errno returned by sanitize_name()
when called with a NULL pointer. Returning ENOMEM in that case is
misleading. EINVAL better reflects the actual error.

The second patch switches sysfs show callbacks to sysfs_emit(), as
recommended by Documentation/filesystems/sysfs.rst. While the risk of
overflow with sprintf() is low in practice, using sysfs_emit() avoids
the issue entirely and aligns the code with current kernel guidance.
This also simplifies Rust bindings, where overflows cannot be ignored.

Signed-off-by: Kari Argillander <kari.argillander@...il.com>
---
Kari Argillander (2):
      hwmon: Fix wrong return errno in *sanitize_name()
      hwmon: Use sysfs_emit in show function callsbacks

 drivers/hwmon/hwmon.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
base-commit: cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
change-id: 20251219-hwmon-fixes-b8e205834d20

Best regards,
-- 
Kari Argillander <kari.argillander@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ