All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: e314eebf-06ed-44e5-9cd1-35d60d02df8c@app.fastmail.com
Cc: Mark Pearson <mpearson-lenovo@squebb.ca>,
	 "Derek J . Clark" <derekjohn.clark@gmail.com>,
	 Hans de Goede <hansg@kernel.org>,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	 "platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	 LKML <linux-kernel@vger.kernel.org>,
	raoxu@uniontech.com,  shaoyang@uniontech.com
Subject: Re: [PATCH] platform/x86: think-lmi: Fix "Call Trace" error warning
Date: Thu, 9 Jul 2026 14:09:28 +0300 (EEST)	[thread overview]
Message-ID: <145261b0-e0d3-70dd-8cbb-ec1d32597fc7@linux.intel.com> (raw)
In-Reply-To: <9E24E598526FA2CD+f70e445c-e32c-4c1f-9001-1b19be021838@uniontech.com>

[-- 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.

  reply	other threads:[~2026-07-09 11:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-07-07 15:16 ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=145261b0-e0d3-70dd-8cbb-ec1d32597fc7@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=derekjohn.clark@gmail.com \
    --cc=e314eebf-06ed-44e5-9cd1-35d60d02df8c@app.fastmail.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=raoxu@uniontech.com \
    --cc=shaoyang@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.