From: Krishna Chomal <krishna.chomal108@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Hans de Goede <hansg@kernel.org>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] platform/x86: hp-wmi: fix fan table parsing
Date: Wed, 1 Apr 2026 17:33:59 +0530 [thread overview]
Message-ID: <ac0FmFZYSWn6Cz98@archlinux> (raw)
In-Reply-To: <f2b397ea-cc1a-e27a-b5e6-20c18bcb95b3@linux.intel.com>
On Wed, Apr 01, 2026 at 02:23:31PM +0300, Ilpo Järvinen wrote:
>On Wed, 1 Apr 2026, Krishna Chomal wrote:
>
>> For Victus S devices, the BIOS fan table header was being incorrectly
>> parsed as:
>> struct {
>> u8 unknown;
>> u8 num_entries;
>> }
>>
>> The first field should be num_fans and the second should be unknown. It
>> is pure coincidence that interpreting an "unknown" field as "num_entries"
>
>So this coincidence is that both fields happened to contain the same
>value? Or (same or) smaller?
>
Yes, for my board (and for the several recent additions in Victus S list)
the second field in the fan table header happened to match the number of
entries in the table, making the previous implementation appear correct.
However on board 8D87 (and potentially others), the second field contains
a larger value which causes the following check to fail:
if (fan_table->header.num_entries == 0 ||
sizeof(struct victus_s_fan_table_header) +
sizeof(struct victus_s_fan_table_entry) * fan_table->header.num_entries > sizeof(fan_data))
After reverse engineering the Windows implementation, I found that the
official software ignores this second field entirely. Instead it uses
the "stop-at-null" approach implemented in this patch.
>--
> i.
next prev parent reply other threads:[~2026-04-01 12:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 11:17 [PATCH 0/4] platform/x86: hp-wmi: Improve support for some HP boards Krishna Chomal
2026-04-01 11:17 ` [PATCH 1/4] platform/x86: hp-wmi: fix fan table parsing Krishna Chomal
2026-04-01 11:23 ` Ilpo Järvinen
2026-04-01 12:03 ` Krishna Chomal [this message]
2026-04-01 11:17 ` [PATCH 2/4] platform/x86: hp-wmi: Add support for OMEN MAX 16-ak0xxx (8D87) Krishna Chomal
2026-04-01 11:17 ` [PATCH 3/4] platform/x86: hp-wmi: Add support for Omen 16-n0xxx (8A44) Krishna Chomal
2026-04-01 11:17 ` [PATCH 4/4] platform/x86: hp-wmi: Add support for Omen 16-wf1xxx (8C77) Krishna Chomal
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=ac0FmFZYSWn6Cz98@archlinux \
--to=krishna.chomal108@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox