* [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
@ 2026-07-07 9:15 goutongchen
2026-07-07 13:31 ` Mark Pearson
2026-07-07 15:16 ` Andy Shevchenko
0 siblings, 2 replies; 5+ messages in thread
From: goutongchen @ 2026-07-07 9:15 UTC (permalink / raw)
To: mpearson-lenovo
Cc: derekjohn.clark, hansg, ilpojarvinen, andriy.shevchenko,
platform-driver-x86, linux-kernel, raoxu, shaoyang, goutongchen
From: goutongchen <goutongchen@uniontech.com>
The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
exceeded the size assumed by the think_lmi driver's internal static
buffer, causing the driver to trigger a WARN_ON() during self-checks.
Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
Call Trace warnings.
Here is the kernel warning triggered by the bug:
kernel: WARNING: CPU: 4 PID: 665 at drivers/platform/x86/think-lmi.c:326
kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
kernel: Call Trace:
kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
...
Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
Signed-off-by: goutongchen <goutongchen@uniontech.com>
---
drivers/platform/x86/lenovo/think-lmi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/lenovo/think-lmi.h b/drivers/platform/x86/lenovo/think-lmi.h
index 017644323d46..d643cf3b81b0 100644
--- a/drivers/platform/x86/lenovo/think-lmi.h
+++ b/drivers/platform/x86/lenovo/think-lmi.h
@@ -8,7 +8,7 @@
#define TLMI_SETTINGS_COUNT 256
#define TLMI_SETTINGS_MAXLEN 512
-#define TLMI_PWD_BUFSIZE 129
+#define TLMI_PWD_BUFSIZE 256
#define TLMI_LANG_MAXLEN 4
#define TLMI_INDEX_MAX 32
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
2026-07-07 9:15 [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning goutongchen
@ 2026-07-07 13:31 ` Mark Pearson
2026-07-08 4:14 ` Gou Tongchen
2026-07-07 15:16 ` Andy Shevchenko
1 sibling, 1 reply; 5+ messages in thread
From: Mark Pearson @ 2026-07-07 13:31 UTC (permalink / raw)
To: goutongchen
Cc: Derek J . Clark, Hans de Goede, ilpojarvinen, Andy Shevchenko,
platform-driver-x86@vger.kernel.org, linux-kernel, raoxu,
shaoyang
Hi
On Tue, Jul 7, 2026, at 5:15 AM, goutongchen@uniontech.com wrote:
> From: goutongchen <goutongchen@uniontech.com>
>
> The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
> exceeded the size assumed by the think_lmi driver's internal static
> buffer, causing the driver to trigger a WARN_ON() during self-checks.
>
> Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
> Call Trace warnings.
>
> Here is the kernel warning triggered by the bug:
>
> kernel: WARNING: CPU: 4 PID: 665 at drivers/platform/x86/think-lmi.c:326
> kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
> kernel: Call Trace:
> kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
> ...
>
> Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
Minor - but I don't think this is really the culprit :)
> Signed-off-by: goutongchen <goutongchen@uniontech.com>
> ---
> drivers/platform/x86/lenovo/think-lmi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/lenovo/think-lmi.h
> b/drivers/platform/x86/lenovo/think-lmi.h
> index 017644323d46..d643cf3b81b0 100644
> --- a/drivers/platform/x86/lenovo/think-lmi.h
> +++ b/drivers/platform/x86/lenovo/think-lmi.h
> @@ -8,7 +8,7 @@
>
> #define TLMI_SETTINGS_COUNT 256
> #define TLMI_SETTINGS_MAXLEN 512
> -#define TLMI_PWD_BUFSIZE 129
> +#define TLMI_PWD_BUFSIZE 256
> #define TLMI_LANG_MAXLEN 4
> #define TLMI_INDEX_MAX 32
>
> --
> 2.20.1
Which platform are you seeing this on please? The maxlen for passwords from the BIOS is supposed to be 128 so I'm intrigued as to where you're seeing different. It maybe should be fixed in a platform BIOS?
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
2026-07-07 9:15 [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning goutongchen
2026-07-07 13:31 ` Mark Pearson
@ 2026-07-07 15:16 ` Andy Shevchenko
1 sibling, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-07-07 15:16 UTC (permalink / raw)
To: goutongchen
Cc: mpearson-lenovo, derekjohn.clark, hansg, ilpojarvinen,
platform-driver-x86, linux-kernel, raoxu, shaoyang
On Tue, Jul 07, 2026 at 05:15:55PM +0800, goutongchen@uniontech.com wrote:
> From: goutongchen <goutongchen@uniontech.com>
Use your real name and not an alias.
> The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
Which platform? We need more details about the BIOS/HW.
> exceeded the size assumed by the think_lmi driver's internal static
> buffer, causing the driver to trigger a WARN_ON() during self-checks.
>
> Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
> Call Trace warnings.
>
> Here is the kernel warning triggered by the bug:
>
> kernel: WARNING: CPU: 4 PID: 665 at drivers/platform/x86/think-lmi.c:326
> kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
> kernel: Call Trace:
> kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
> ...
> Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
> Signed-off-by: goutongchen <goutongchen@uniontech.com>
Ditto.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
2026-07-07 13:31 ` Mark Pearson
@ 2026-07-08 4:14 ` Gou Tongchen
2026-07-09 11:09 ` Ilpo Järvinen
0 siblings, 1 reply; 5+ messages in thread
From: Gou Tongchen @ 2026-07-08 4:14 UTC (permalink / raw)
To: Mark Pearson
Cc: Derek J . Clark, Hans de Goede, ilpojarvinen, Andy Shevchenko,
platform-driver-x86@vger.kernel.org, linux-kernel, raoxu,
shaoyang
On 7/7/26 21:31, Mark Pearson wrote:
Hi
> Hi
>
> On Tue, Jul 7, 2026, at 5:15 AM, goutongchen@uniontech.com wrote:
>> From: goutongchen <goutongchen@uniontech.com>
>>
>> The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
>> exceeded the size assumed by the think_lmi driver's internal static
>> buffer, causing the driver to trigger a WARN_ON() during self-checks.
>>
>> Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
>> Call Trace warnings.
>>
>> Here is the kernel warning triggered by the bug:
>>
>> kernel: WARNING: CPU: 4 PID: 665 at drivers/platform/x86/think-lmi.c:326
>> kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
>> kernel: Call Trace:
>> kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
>> ...
>>
>> Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
> Minor - but I don't think this is really the culprit :)
Gou Tongchen - Because it was initially discovered on an older kernel
version, the path hadn't been changed at that time.
>
>> Signed-off-by: goutongchen <goutongchen@uniontech.com>
>> ---
>> drivers/platform/x86/lenovo/think-lmi.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/lenovo/think-lmi.h
>> b/drivers/platform/x86/lenovo/think-lmi.h
>> index 017644323d46..d643cf3b81b0 100644
>> --- a/drivers/platform/x86/lenovo/think-lmi.h
>> +++ b/drivers/platform/x86/lenovo/think-lmi.h
>> @@ -8,7 +8,7 @@
>>
>> #define TLMI_SETTINGS_COUNT 256
>> #define TLMI_SETTINGS_MAXLEN 512
>> -#define TLMI_PWD_BUFSIZE 129
>> +#define TLMI_PWD_BUFSIZE 256
>> #define TLMI_LANG_MAXLEN 4
>> #define TLMI_INDEX_MAX 32
>>
>> --
>> 2.20.1
> Which platform are you seeing this on please? The maxlen for passwords from the BIOS is supposed to be 128 so I'm intrigued as to where you're seeing different. It maybe should be fixed in a platform BIOS?
>
> Mark
The hardware platform is a Lenovo X7h with a Hygon 4 CPU. The specific model and BIOS version are as follows:
kernel: DMI: KaiTian /LXKT-HG4M-X7, BIOS W0WKT1FA 11/18/2025
I found through kernel log printing that the BIOS returned a password length of 255, so I increased TLMI_PWD_BUFSIZE to 256.
Thanks.
Gou Tongchen
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
2026-07-08 4:14 ` Gou Tongchen
@ 2026-07-09 11:09 ` Ilpo Järvinen
0 siblings, 0 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2026-07-09 11:09 UTC (permalink / raw)
To: e314eebf-06ed-44e5-9cd1-35d60d02df8c
Cc: Mark Pearson, Derek J . Clark, Hans de Goede, Andy Shevchenko,
platform-driver-x86@vger.kernel.org, LKML, raoxu, shaoyang
[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]
On Wed, 8 Jul 2026, Gou Tongchen wrote:
> On 7/7/26 21:31, Mark Pearson wrote:
> > On Tue, Jul 7, 2026, at 5:15 AM, goutongchen@uniontech.com wrote:
> > > From: goutongchen <goutongchen@uniontech.com>
> > >
> > > The maximum BIOS password length returned by the Lenovo platform BIOS/WMI
> > > exceeded the size assumed by the think_lmi driver's internal static
> > > buffer, causing the driver to trigger a WARN_ON() during self-checks.
> > >
> > > Increase TLMI_PWD_BUFSIZE from 128 to 256 to eliminate the recurring
> > > Call Trace warnings.
> > >
> > > Here is the kernel warning triggered by the bug:
> > >
> > > kernel: WARNING: CPU: 4 PID: 665 at
> > > drivers/platform/x86/think-lmi.c:326
> > > kernel: tlmi_get_pwd_settings.constprop.0+0xe6/0x130 [think_lmi]
> > > kernel: Call Trace:
> > > kernel: tlmi_analyze+0x31c/0x640 [think_lmi]
> > > ...
> > >
> > > Fixes: 651b57dd4087 ("platform/x86: Move Lenovo files into lenovo subdir")
> > Minor - but I don't think this is really the culprit :)
>
> Gou Tongchen - Because it was initially discovered on an older kernel version,
> the path hadn't been changed at that time.
Please try to find the commit past that. You can use e.g.
git annotate 651b57dd4087^
to start annotating from right before that commit.
> > > Signed-off-by: goutongchen <goutongchen@uniontech.com>
> > > ---
> > > drivers/platform/x86/lenovo/think-lmi.h | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/platform/x86/lenovo/think-lmi.h
> > > b/drivers/platform/x86/lenovo/think-lmi.h
> > > index 017644323d46..d643cf3b81b0 100644
> > > --- a/drivers/platform/x86/lenovo/think-lmi.h
> > > +++ b/drivers/platform/x86/lenovo/think-lmi.h
> > > @@ -8,7 +8,7 @@
> > >
> > > #define TLMI_SETTINGS_COUNT 256
> > > #define TLMI_SETTINGS_MAXLEN 512
> > > -#define TLMI_PWD_BUFSIZE 129
> > > +#define TLMI_PWD_BUFSIZE 256
> > > #define TLMI_LANG_MAXLEN 4
> > > #define TLMI_INDEX_MAX 32
> > >
> > > --
> > > 2.20.1
> > Which platform are you seeing this on please? The maxlen for passwords from
> > the BIOS is supposed to be 128 so I'm intrigued as to where you're seeing
> > different. It maybe should be fixed in a platform BIOS?
> >
> > Mark
>
> The hardware platform is a Lenovo X7h with a Hygon 4 CPU. The specific
> model and BIOS version are as follows:
>
> kernel: DMI: KaiTian /LXKT-HG4M-X7, BIOS W0WKT1FA 11/18/2025
This kind of information should be in the changelog, but lets wait a bit
if Mark wants to check this internally.
We'll probably need to make this change anyway to avoid triggering
the WARN_ON() even if it would be fixed by some version of the BIOS.
> I found through kernel log printing that the BIOS returned a password
> length of 255, so I increased TLMI_PWD_BUFSIZE to 256.
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-09 11:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 9:15 [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning goutongchen
2026-07-07 13:31 ` Mark Pearson
2026-07-08 4:14 ` Gou Tongchen
2026-07-09 11:09 ` Ilpo Järvinen
2026-07-07 15:16 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox