From: Rosen Penev <rosenp@gmail.com>
To: "Pali Rohár" <pali@kernel.org>,
"Guenter Roeck" <linux@roeck-us.net>,
"Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] hwmon: (dell-smm) Validate pwm and fan_max values
Date: Fri, 13 Nov 2026 22:20:21 -0800 [thread overview]
Message-ID: <cover.1794633179.git.rosenp@gmail.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Rosen Penev <rosenp@gmail.com>
To: "Matthew Garrett" <mjg59@srcf.ucam.org>,
"Pali Rohár" <pali@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Darren Hart" <dvhart@linux.intel.com>,
"Gabriele Mazzotta" <gabriele.mzt@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] platform/x86: dell-laptop: Fix keyboard backlight and charge threshold handling
Date: Fri, 13 Nov 2026 22:29:24 -0800 [thread overview]
Message-ID: <cover.1794633179.git.rosenp@gmail.com> (raw)
Message-ID: <20261114062924.U1xfNKsGHFfGPsOYd4Tu6FhUdx7NwG7U3zHEnt1wBUQ@z> (raw)
Three fixes for dell-laptop: keyboard backlight timeouts that overflow
during unit conversion were silently accepted, an unread keyboard state
was used at init when the SMBIOS call failed, and the charge end
threshold was parsed as unsigned into an int.
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:
- writing 4424214d / 18989323d to stop_timeout set 4m / 2m before
patch 1 and is rejected with -EINVAL after it; 5m still works
- charge_control_end_threshold rejects -1 and 101, accepts 85
The kbd_get_state() failure path of patch 2 was not triggered.
Rosen Penev (3):
platform/x86: dell-laptop: Reject keyboard backlight timeouts that
overflow
platform/x86: dell-laptop: Don't use an unread keyboard state at init
platform/x86: dell-laptop: Parse the charge end threshold as an int
drivers/platform/x86/dell/dell-laptop.c | 30 ++++++++++++++++++-------
1 file changed, 22 insertions(+), 8 deletions(-)
base-commit: 2800868f63227c8237d70c41e70d441c919620d6
--
2.56.0
next reply other threads:[~2026-11-14 6:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 6:20 Rosen Penev [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1794633179.git.rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pali@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.