From: Zenghui Yu <yuzenghui@huawei.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rafael@kernel.org" <rafael@kernel.org>,
"bp@alien8.de" <bp@alien8.de>,
"guohanjun@huawei.com" <guohanjun@huawei.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"xueshuai@linux.alibaba.com" <xueshuai@linux.alibaba.com>,
"lenb@kernel.org" <lenb@kernel.org>,
"wangzhigang17@huawei.com" <wangzhigang17@huawei.com>
Subject: Re: [PATCH] ACPI: APEI: EINJ: Validate length of the Vendor Error Type Extension structure
Date: Fri, 13 Nov 2026 17:23:56 +0800 [thread overview]
Message-ID: <5630940f-e89d-2b6e-d36e-861357490ffd@huawei.com> (raw)
In-Reply-To: <CH8PR11MB40343305FD3C1BE0E18882B5CCFC7F2@CH8PR11MB403433.namprd11.prod.outlook.com>
Hi Tony,
On 2026/11/13 8:27, Luck, Tony wrote:
> > The BIOS on my machine is obviously buggy (non-zero Vendor Extension offset
> > pointing to zeroed memory, and bit 31 is not set in the error type either)
> > and needs fixing. I'm not sure if it is necessary to add such a sanity
> > check for EINJ at all.
>
> Production machine? Or just an internal development machine? I.e. is this broken
> BIOS out in the wild for others to hit this bug?
The bug was hit on one of my development machines. The BIOS is pretty old.
$ cat /sys/class/dmi/id/bios_vendor
Huawei Corp.
$ cat /sys/class/dmi/id/bios_date
09/18/2019
I'm afraid that I can't tell whether this exact BIOS version ever shipped
on production machines.
So this patch may effectively just be a workaround for my old machine. I'll
leave the decision on whether it's worth taking to maintainers. ;-)
> >
> > + if (v.length < sizeof(v) || v.length > PAGE_SIZE) {
> > + pr_warn(FW_BUG "Invalid vendor error extension length %u\n",
>
> The "FW_BUG" tag was created specifically to point blame at BIOS and thus
> encourage OEMs to fix their BIOS. So correct use of it here :-)
>
> > + v.length);
> > + acpi_os_unmap_iomem(p, sizeof(v));
> > + return;
> > + }
>
> The fix looks reasonable. If this has been seen on a production system, then
> seems a good idea to apply your patch.
>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
Thanks for your review!
Zenghui
next prev parent reply other threads:[~2026-11-13 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 11:57 [PATCH] ACPI: APEI: EINJ: Validate length of the Vendor Error Type Extension structure Zenghui Yu
2026-11-13 0:27 ` Luck, Tony
2026-11-13 9:23 ` Zenghui Yu [this message]
2026-11-13 9:37 ` Mauro Carvalho Chehab
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=5630940f-e89d-2b6e-d36e-861357490ffd@huawei.com \
--to=yuzenghui@huawei.com \
--cc=bp@alien8.de \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
--cc=wangzhigang17@huawei.com \
--cc=xueshuai@linux.alibaba.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.