[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d8f9875b-03be-465b-9715-addd8334a782@gmx.de>
Date: Wed, 30 Jul 2025 18:49:29 +0200
From: Armin Wolf <W_Armin@....de>
To: Ilya K <me@...ti.me>, rafael@...nel.org, lenb@...nel.org
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI: EC: Relax sanity check of the ECDT ID string
Am 29.07.25 um 09:00 schrieb Ilya K:
> On 2025-07-29 09:20, Armin Wolf wrote:
>> It turns out that the ECDT table inside the ThinkBook 14 G7 IML
>> contains a valid EC description but an invalid ID string
>> ("_SB.PC00.LPCB.EC0"). Ignoring this ECDT based on the invalid
>> ID string prevents the kernel from detecting the built-in touchpad,
>> so relax the sanity check of the ID string and only reject ECDTs
>> with empty ID strings.
>>
>> Compile-tested only.
>>
>> Reported-by: Ilya K <me@...ti.me>
>> Fixes: 7a0d59f6a913 ("ACPI: EC: Ignore ECDT tables with an invalid ID string")
>> Signed-off-by: Armin Wolf <W_Armin@....de>
>> ---
>> drivers/acpi/ec.c | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
> Thanks, this works!
>
> Tested-by: Ilya K <me@...ti.me>
>
>> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
>> index 75c7db8b156a..7855bbf752b1 100644
>> --- a/drivers/acpi/ec.c
>> +++ b/drivers/acpi/ec.c
>> @@ -2033,7 +2033,7 @@ void __init acpi_ec_ecdt_probe(void)
>> goto out;
>> }
>>
>> - if (!strstarts(ecdt_ptr->id, "\\")) {
>> + if (!strlen(ecdt_ptr->id)) {
>> /*
>> * The ECDT table on some MSI notebooks contains invalid data, together
>> * with an empty ID string ("").
>> @@ -2042,9 +2042,13 @@ void __init acpi_ec_ecdt_probe(void)
>> * a "fully qualified reference to the (...) embedded controller device",
>> * so this string always has to start with a backslash.
>> *
>> - * By verifying this we can avoid such faulty ECDT tables in a safe way.
>> + * However some ThinkBook machines have a ECDT table with a valid EC
>> + * description but an invalid ID string ("_SB.PC00.LPCB.EC0").
>> + *
>> + * Because of this we only check if the ID string is empty in order to
>> + * avoid the obvious cases.
>> */
>> - pr_err(FW_BUG "Ignoring ECDT due to invalid ID string \"%s\"\n", ecdt_ptr->id);
>> + pr_err(FW_BUG "Ignoring ECDT due to empty ID string\n");
>> goto out;
>> }
>>
> Would it maybe make sense to also log a warning for the old case? Maybe a vendor will notice it and fix the firmware...
> (yeah yeah fat chance)
The Linux kernel is not a verification kit, so i am against keeping the old check. Instead i suggest that we ensure that
the FWTS project (https://github.com/fwts/fwts) detects such invalid ECDT tables. Can you share the full output of
acpidump so that i can run the fwts tool on it?
Thanks,
Armin Wolf
Powered by blists - more mailing lists