From: Borislav Petkov <bp@alien8.de>
To: "Kani, Toshi" <toshi.kani@hpe.com>
Cc: "rrichter@marvell.com" <rrichter@marvell.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"Elliott, Robert (Servers)" <elliott@hpe.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EDAC/ghes: Fix buffer overflow in ghes_edac_register()
Date: Wed, 20 Jul 2022 17:57:52 +0200 [thread overview]
Message-ID: <YtgmALzpaR9IHR/F@zn.tnic> (raw)
In-Reply-To: <PH7PR84MB1838CC03943D28806F7DCD8F828E9@PH7PR84MB1838.NAMPRD84.PROD.OUTLOOK.COM>
On Wed, Jul 20, 2022 at 03:41:20PM +0000, Kani, Toshi wrote:
> SMBIOS handle is correct.
>
> In dimm_setup_label(), *device is set but *bank is null (dmi_empty_string).
> *bank is set from SMBIOS type 17 Bank Locator, offset 11h. This value is
> set to 0x0 (null string) on this system, as shown below.
>
> Handle 0x0020, DMI type 17, 84 bytes
> Memory Device
> Array Handle: 0x0013
> Error Information Handle: Not Provided
> Total Width: 72 bits
> Data Width: 64 bits
> Size: 32 GB
> Form Factor: DIMM
> Set: None
> Locator: PROC 1 DIMM 1 <===== device
> Bank Locator: Not Specified <===== bank
I think it'll be more user-friendly to put
"PROC 1 DIMM 1" for device
and
"NA" or so for bank
instead of setting the label to the NULL string.
I.e., relax that
if (bank && *bank && device && *device)
check there.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2022-07-20 15:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 22:01 [PATCH] EDAC/ghes: Fix buffer overflow in ghes_edac_register() Toshi Kani
2022-07-20 11:51 ` Borislav Petkov
2022-07-20 15:41 ` Kani, Toshi
2022-07-20 15:57 ` Borislav Petkov [this message]
2022-07-20 16:17 ` Kani, Toshi
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=YtgmALzpaR9IHR/F@zn.tnic \
--to=bp@alien8.de \
--cc=elliott@hpe.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rrichter@marvell.com \
--cc=toshi.kani@hpe.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox