[SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

You-Sheng Yang
BugLink: https://bugs.launchpad.net/bugs/1860940

[Impact]
On Hewlett-Packard x360 310 G2 convertible laptop,
/sys/devices/platform/hp-wmi/tablet cannot report its current mode:

  # cat /sys/devices/platform/hp-wmi/tablet
  cat: /sys/devices/platform/hp-wmi/tablet: Invalid argument

[Fix]
Commit 133b2acee387 ("platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY
128 bytes") to be cherry-picked to kernels <= v5.4.6.

[Test Case]
Just run `cat /sys/devices/platform/hp-wmi/tablet`.

[Regression Potential]
Low. This affects only HP systems with such buffer length check that
should be fixed.

Hans de Goede (1):
  platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes

 drivers/platform/x86/hp-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 1/1] platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes

You-Sheng Yang
From: Hans de Goede <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1860940

At least on the HP Envy x360 15-cp0xxx model the WMI interface
for HPWMI_FEATURE2_QUERY requires an outsize of at least 128 bytes,
otherwise it fails with an error code 5 (HPWMI_RET_INVALID_PARAMETERS):

Dec 06 00:59:38 kernel: hp_wmi: query 0xd returned error 0x5

We do not care about the contents of the buffer, we just want to know
if the HPWMI_FEATURE2_QUERY command is supported.

This commits bumps the buffer size, fixing the error.

Fixes: 8a1513b4932 ("hp-wmi: limit hotkey enable")
Cc: [hidden email]
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede <[hidden email]>
Signed-off-by: Andy Shevchenko <[hidden email]>
(cherry picked from commit 133b2acee3871ae6bf123b8fe34be14464aa3d2c)
Signed-off-by: You-Sheng Yang <[hidden email]>
---
 drivers/platform/x86/hp-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index d0ffdd5d9199b..06a3c1ef8eeee 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -313,7 +313,7 @@ static int __init hp_wmi_bios_2008_later(void)
 
 static int __init hp_wmi_bios_2009_later(void)
 {
- int state = 0;
+ u8 state[128];
  int ret = hp_wmi_perform_query(HPWMI_FEATURE2_QUERY, HPWMI_READ, &state,
        sizeof(state), sizeof(state));
  if (!ret)
--
2.24.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

Marcelo Henrique Cerri
In reply to this post by You-Sheng Yang
Acked-by: Marcelo Henrique Cerri <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (673 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

Timo Aaltonen-6
In reply to this post by You-Sheng Yang
On 27.1.2020 10.11, You-Sheng Yang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1860940
>
> [Impact]
> On Hewlett-Packard x360 310 G2 convertible laptop,
> /sys/devices/platform/hp-wmi/tablet cannot report its current mode:
>
>   # cat /sys/devices/platform/hp-wmi/tablet
>   cat: /sys/devices/platform/hp-wmi/tablet: Invalid argument
>
> [Fix]
> Commit 133b2acee387 ("platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY
> 128 bytes") to be cherry-picked to kernels <= v5.4.6.
>
> [Test Case]
> Just run `cat /sys/devices/platform/hp-wmi/tablet`.
>
> [Regression Potential]
> Low. This affects only HP systems with such buffer length check that
> should be fixed.
>
> Hans de Goede (1):
>   platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
>
>  drivers/platform/x86/hp-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

this came in via stable, so is applied in osp1 already after rebase

--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

Kleber Souza
In reply to this post by You-Sheng Yang
On 2020-01-27 05:11, You-Sheng Yang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1860940
>
> [Impact]
> On Hewlett-Packard x360 310 G2 convertible laptop,
> /sys/devices/platform/hp-wmi/tablet cannot report its current mode:
>
>   # cat /sys/devices/platform/hp-wmi/tablet
>   cat: /sys/devices/platform/hp-wmi/tablet: Invalid argument
>
> [Fix]
> Commit 133b2acee387 ("platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY
> 128 bytes") to be cherry-picked to kernels <= v5.4.6.
>
> [Test Case]
> Just run `cat /sys/devices/platform/hp-wmi/tablet`.
>
> [Regression Potential]
> Low. This affects only HP systems with such buffer length check that
> should be fixed.
>
> Hans de Goede (1):
>   platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
>
>  drivers/platform/x86/hp-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

NAK[B/E]: [SRU][B/E/OEM-B/OEM-OSP1-B][PATCH 0/1] Fix hp_wmi HPWMI_FEATURE2_QUERY failure

Kleber Souza
In reply to this post by You-Sheng Yang
On 27.01.20 09:11, You-Sheng Yang wrote:

> BugLink: https://bugs.launchpad.net/bugs/1860940
>
> [Impact]
> On Hewlett-Packard x360 310 G2 convertible laptop,
> /sys/devices/platform/hp-wmi/tablet cannot report its current mode:
>
>   # cat /sys/devices/platform/hp-wmi/tablet
>   cat: /sys/devices/platform/hp-wmi/tablet: Invalid argument
>
> [Fix]
> Commit 133b2acee387 ("platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY
> 128 bytes") to be cherry-picked to kernels <= v5.4.6.
>
> [Test Case]
> Just run `cat /sys/devices/platform/hp-wmi/tablet`.
>
> [Regression Potential]
> Low. This affects only HP systems with such buffer length check that
> should be fixed.
>
> Hans de Goede (1):
>   platform/x86: hp-wmi: Make buffer for HPWMI_FEATURE2_QUERY 128 bytes
>
>  drivers/platform/x86/hp-wmi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Already applied to Eoan and Bionic as part of upstream stable updates,
so NAK'ing for these series.


Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team