OSDN Git Service

platform/x86: dell-ddv: Warn if ePPID has a suspicious length
authorArmin Wolf <W_Armin@gmx.de>
Wed, 2 Nov 2022 21:23:36 +0000 (22:23 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Nov 2022 07:48:19 +0000 (08:48 +0100)
commitc7891884a55effcf3e54e25835ef9fac39ef48f3
treec94a733a6875e2d371f65be6a3cb98e91058b84c
parent84fa20c2a56a9d941fef68dd2c1d489a5f24daa7
platform/x86: dell-ddv: Warn if ePPID has a suspicious length

On some systems (like the Dell Inspiron 3505), the acpi operation
region holding the ePPID string is two bytes too short, causing
acpi functions like ToString() to omit the last two bytes.
This does not happen on Windows, supposedly due to their implementation
of ToString() ignoring buffer boundaries.
Inform users if the ePPID length differs from the Dell specification
so they can complain to Dell to fix their BIOS.

Tested on a Dell Inspiron 3505.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20221102212336.380257-2-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/dell/dell-wmi-ddv.c