* [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board
@ 2026-08-27 23:51 Arda Doğu Ari
2026-08-29 7:39 ` Krishna Chomal
2026-08-31 16:36 ` Ilpo Järvinen
0 siblings, 2 replies; 5+ messages in thread
From: Arda Doğu Ari @ 2026-08-27 23:51 UTC (permalink / raw)
To: Hans de Goede, Ilpo Järvinen
Cc: Krishna Chomal, platform-driver-x86, Arda Doğu Ari, stable
When adding support for board 8DD6, &omen_v1_no_ec_thermal_params
was passed as driver_data instead of &omen_v1_no_ec_board_params.
Because active_board_params expects a pointer to struct
hp_wmi_board_params, dereferencing active_board_params->thermal_profile
results in a type confusion bug and invalid memory access. Update the entry
to point to omen_v1_no_ec_board_params.
Fixes: a7320d6eb9c42 ("platform/x86: hp-wmi: Add support for OMEN MAX 16-ak0xxx (8DD6)")
Cc: stable@vger.kernel.org
Signed-off-by: Arda Doğu Ari <arfeliousheres@gmail.com>
---
drivers/platform/x86/hp/hp-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index b2773fc1aca4..615b4cf6fc45 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -337,7 +337,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = {
},
{
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8DD6") },
- .driver_data = (void *)&omen_v1_no_ec_thermal_params,
+ .driver_data = (void *)&omen_v1_no_ec_board_params,
},
{
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8E35") },
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board 2026-08-27 23:51 [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board Arda Doğu Ari @ 2026-08-29 7:39 ` Krishna Chomal 2026-08-31 16:38 ` Ilpo Järvinen 2026-08-31 16:36 ` Ilpo Järvinen 1 sibling, 1 reply; 5+ messages in thread From: Krishna Chomal @ 2026-08-29 7:39 UTC (permalink / raw) To: Arda Doğu Ari Cc: Hans de Goede, Ilpo Järvinen, platform-driver-x86, stable On Fri, Aug 28, 2026 at 02:51:39AM +0300, Arda Doğu Ari wrote: >When adding support for board 8DD6, &omen_v1_no_ec_thermal_params >was passed as driver_data instead of &omen_v1_no_ec_board_params. Hi, When I added support for 8DD6 [1] &omen_v1_no_ec_thermal_params was indeed the correct quirk. But because Radhey Kalra's board-specific feature data patch [2] was accepted first, my patch probably lead to a merge conflict that had to be resolved manually, which is why this is subtle bug got introduced in the first place. >Because active_board_params expects a pointer to struct >hp_wmi_board_params, dereferencing active_board_params->thermal_profile >results in a type confusion bug and invalid memory access. Update the entry >to point to omen_v1_no_ec_board_params. Thank you very much for observing and sending a patch for the same. [1]: https://lore.kernel.org/platform-driver-x86/20260623141314.33947-1-krishna.chomal108@gmail.com [2]: https://lore.kernel.org/platform-driver-x86/20260615091034.987029-1-radheykalra901@gmail.com >Fixes: a7320d6eb9c42 ("platform/x86: hp-wmi: Add support for OMEN MAX 16-ak0xxx (8DD6)") >Cc: stable@vger.kernel.org >Signed-off-by: Arda Doğu Ari <arfeliousheres@gmail.com> >--- > drivers/platform/x86/hp/hp-wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c >index b2773fc1aca4..615b4cf6fc45 100644 >--- a/drivers/platform/x86/hp/hp-wmi.c >+++ b/drivers/platform/x86/hp/hp-wmi.c >@@ -337,7 +337,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = { > }, > { > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8DD6") }, >- .driver_data = (void *)&omen_v1_no_ec_thermal_params, >+ .driver_data = (void *)&omen_v1_no_ec_board_params, > }, > { > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8E35") }, >-- >2.55.0 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board 2026-08-29 7:39 ` Krishna Chomal @ 2026-08-31 16:38 ` Ilpo Järvinen 2026-08-31 17:58 ` Krishna Chomal 0 siblings, 1 reply; 5+ messages in thread From: Ilpo Järvinen @ 2026-08-31 16:38 UTC (permalink / raw) To: Krishna Chomal Cc: Arda Doğu Ari, Hans de Goede, platform-driver-x86, stable [-- Attachment #1: Type: text/plain, Size: 2540 bytes --] On Sat, 29 Aug 2026, Krishna Chomal wrote: > On Fri, Aug 28, 2026 at 02:51:39AM +0300, Arda Doğu Ari wrote: > > When adding support for board 8DD6, &omen_v1_no_ec_thermal_params > > was passed as driver_data instead of &omen_v1_no_ec_board_params. > > Hi, > > When I added support for 8DD6 [1] &omen_v1_no_ec_thermal_params was > indeed the correct quirk. But because Radhey Kalra's board-specific > feature data patch [2] was accepted first, my patch probably lead to a > merge conflict that had to be resolved manually, which is why this is > subtle bug got introduced in the first place. It's my fault for not catching it (though to my defence, I got sick around the time the merge window ends so I had less time for handling the patches in the first place and I only now realize compiler won't catch this problem for me because the old structs are still there). > > Because active_board_params expects a pointer to struct > > hp_wmi_board_params, dereferencing active_board_params->thermal_profile > > results in a type confusion bug and invalid memory access. Update the entry > > to point to omen_v1_no_ec_board_params. > > Thank you very much for observing and sending a patch for the same. I've queued the patch to the review-ilpo-fixes branch already. If Krishna wants to give a reviewed-by tag, I can still add that to the commit. -- i. > [1]: > https://lore.kernel.org/platform-driver-x86/20260623141314.33947-1-krishna.chomal108@gmail.com > [2]: > https://lore.kernel.org/platform-driver-x86/20260615091034.987029-1-radheykalra901@gmail.com > > > Fixes: a7320d6eb9c42 ("platform/x86: hp-wmi: Add support for OMEN MAX > > 16-ak0xxx (8DD6)") > > Cc: stable@vger.kernel.org > > Signed-off-by: Arda Doğu Ari <arfeliousheres@gmail.com> > > --- > > drivers/platform/x86/hp/hp-wmi.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/platform/x86/hp/hp-wmi.c > > b/drivers/platform/x86/hp/hp-wmi.c > > index b2773fc1aca4..615b4cf6fc45 100644 > > --- a/drivers/platform/x86/hp/hp-wmi.c > > +++ b/drivers/platform/x86/hp/hp-wmi.c > > @@ -337,7 +337,7 @@ static const struct dmi_system_id > > hp_wmi_feature_boards[] __initconst = { > > }, > > { > > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8DD6") }, > > - .driver_data = (void *)&omen_v1_no_ec_thermal_params, > > + .driver_data = (void *)&omen_v1_no_ec_board_params, > > }, > > { > > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8E35") }, > > -- > > 2.55.0 > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board 2026-08-31 16:38 ` Ilpo Järvinen @ 2026-08-31 17:58 ` Krishna Chomal 0 siblings, 0 replies; 5+ messages in thread From: Krishna Chomal @ 2026-08-31 17:58 UTC (permalink / raw) To: Ilpo Järvinen Cc: Arda Doğu Ari, Hans de Goede, platform-driver-x86, stable On Mon, Aug 31, 2026 at 07:38:40PM +0300, Ilpo Järvinen wrote: >On Sat, 29 Aug 2026, Krishna Chomal wrote: > >> On Fri, Aug 28, 2026 at 02:51:39AM +0300, Arda Doğu Ari wrote: >> > When adding support for board 8DD6, &omen_v1_no_ec_thermal_params >> > was passed as driver_data instead of &omen_v1_no_ec_board_params. >> >> Hi, >> >> When I added support for 8DD6 [1] &omen_v1_no_ec_thermal_params was >> indeed the correct quirk. But because Radhey Kalra's board-specific >> feature data patch [2] was accepted first, my patch probably lead to a >> merge conflict that had to be resolved manually, which is why this is >> subtle bug got introduced in the first place. > >It's my fault for not catching it (though to my defence, I got sick around >the time the merge window ends so I had less time for handling the patches >in the first place and I only now realize compiler won't catch this >problem for me because the old structs are still there). No problem, take care. >> > Because active_board_params expects a pointer to struct >> > hp_wmi_board_params, dereferencing active_board_params->thermal_profile >> > results in a type confusion bug and invalid memory access. Update the entry >> > to point to omen_v1_no_ec_board_params. >> >> Thank you very much for observing and sending a patch for the same. > >I've queued the patch to the review-ilpo-fixes branch already. If Krishna >wants to give a reviewed-by tag, I can still add that to the commit. Reviewed-by: Krishna Chomal <krishna.chomal108@gmail.com> >-- > i. > >> [1]: >> https://lore.kernel.org/platform-driver-x86/20260623141314.33947-1-krishna.chomal108@gmail.com >> [2]: >> https://lore.kernel.org/platform-driver-x86/20260615091034.987029-1-radheykalra901@gmail.com >> >> > Fixes: a7320d6eb9c42 ("platform/x86: hp-wmi: Add support for OMEN MAX >> > 16-ak0xxx (8DD6)") >> > Cc: stable@vger.kernel.org >> > Signed-off-by: Arda Doğu Ari <arfeliousheres@gmail.com> >> > --- >> > drivers/platform/x86/hp/hp-wmi.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/drivers/platform/x86/hp/hp-wmi.c >> > b/drivers/platform/x86/hp/hp-wmi.c >> > index b2773fc1aca4..615b4cf6fc45 100644 >> > --- a/drivers/platform/x86/hp/hp-wmi.c >> > +++ b/drivers/platform/x86/hp/hp-wmi.c >> > @@ -337,7 +337,7 @@ static const struct dmi_system_id >> > hp_wmi_feature_boards[] __initconst = { >> > }, >> > { >> > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8DD6") }, >> > - .driver_data = (void *)&omen_v1_no_ec_thermal_params, >> > + .driver_data = (void *)&omen_v1_no_ec_board_params, >> > }, >> > { >> > .matches = { DMI_MATCH(DMI_BOARD_NAME, "8E35") }, >> > -- >> > 2.55.0 >> > >> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board 2026-08-27 23:51 [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board Arda Doğu Ari 2026-08-29 7:39 ` Krishna Chomal @ 2026-08-31 16:36 ` Ilpo Järvinen 1 sibling, 0 replies; 5+ messages in thread From: Ilpo Järvinen @ 2026-08-31 16:36 UTC (permalink / raw) To: Hans de Goede, Arda Doğu Ari Cc: Krishna Chomal, platform-driver-x86, stable On Fri, 28 Aug 2026 02:51:39 +0300, Arda Doğu Ari wrote: > When adding support for board 8DD6, &omen_v1_no_ec_thermal_params > was passed as driver_data instead of &omen_v1_no_ec_board_params. > > Because active_board_params expects a pointer to struct > hp_wmi_board_params, dereferencing active_board_params->thermal_profile > results in a type confusion bug and invalid memory access. Update the entry > to point to omen_v1_no_ec_board_params. > > [...] Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/1] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board commit: 9a71037abc42203caa9041906fb6d012390642a8 -- i. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-31 17:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-08-27 23:51 [PATCH] platform/x86: hp-wmi: Fix board_params typo for 8DD6 board Arda Doğu Ari 2026-08-29 7:39 ` Krishna Chomal 2026-08-31 16:38 ` Ilpo Järvinen 2026-08-31 17:58 ` Krishna Chomal 2026-08-31 16:36 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox