All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hwmon: (dell-smm) Validate pwm and fan_max values
@ 2026-11-14  6:29 ` Rosen Penev
  0 siblings, 0 replies; 9+ messages in thread
From: Rosen Penev @ 2026-11-14  6:20 UTC (permalink / raw)
  To: Pali Rohár, Guenter Roeck, Arnd Bergmann, Greg Kroah-Hartman
  Cc: linux-hwmon, linux-kernel

Two input validation fixes for dell-smm-hwmon: a huge value written to
pwmN overflowed the scaling and turned the fan off, and an out-of-range
fan_max module parameter could wrap an allocation size to zero.

These patches were developed with the help of an AI coding assistant
(Claude Opus 5.5): it reviewed the drivers, found the issues and drafted
the fixes and changelogs. I reviewed every change and I am responsible
for them.

All patches build cleanly with W=1.

Tested on a Dell Precision M4800 running v7.2.15, using the equivalent
backports built as out-of-tree modules:
fan_max=256 and fan_max=4294967295 are rejected with the new message,
fan_max=3 and the default still load. The pwm clamp could not be
observed: this machine's BIOS ignores manual pwm writes.


Rosen Penev (2):
  hwmon: (dell-smm) Clamp the pwm value before scaling it
  hwmon: (dell-smm) Reject a fan_max that the BIOS cannot take

 drivers/hwmon/dell-smm-hwmon.c | 7 +++++++
 1 file changed, 7 insertions(+)


base-commit: 2800868f63227c8237d70c41e70d441c919620d6
-- 
2.56.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-14  6:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14  6:20 [PATCH 0/2] hwmon: (dell-smm) Validate pwm and fan_max values Rosen Penev
2026-11-14  6:29 ` [PATCH 0/3] platform/x86: dell-laptop: Fix keyboard backlight and charge threshold handling Rosen Penev
2026-11-14  6:20 ` [PATCH 1/2] hwmon: (dell-smm) Clamp the pwm value before scaling it Rosen Penev
2026-11-14  6:24   ` sashiko-bot
2026-11-14  6:20 ` [PATCH 2/2] hwmon: (dell-smm) Reject a fan_max that the BIOS cannot take Rosen Penev
2026-11-14  6:25   ` sashiko-bot
2026-11-14  6:29 ` [PATCH 1/3] platform/x86: dell-laptop: Reject keyboard backlight timeouts that overflow Rosen Penev
2026-11-14  6:29 ` [PATCH 2/3] platform/x86: dell-laptop: Don't use an unread keyboard state at init Rosen Penev
2026-11-14  6:29 ` [PATCH 3/3] platform/x86: dell-laptop: Parse the charge end threshold as an int Rosen Penev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.