Linux EDAC development
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Robert Richter <rric@kernel.org>, Toshi Kani <toshi.kani@hpe.com>
Cc: mchehab@kernel.org, elliott@hpe.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()
Date: Mon, 25 Jul 2022 13:23:26 +0200	[thread overview]
Message-ID: <Yt59LiHs3gWNpNW1@zn.tnic> (raw)
In-Reply-To: <Yt5510+uLKzv+Qvt@rric.localdomain>

On Mon, Jul 25, 2022 at 01:09:11PM +0200, Robert Richter wrote:
> I see now, what you mean here, may be change this:
> 
> 	snprintf(dimm->label, sizeof(dimm->label), "%s %s",
> 		 (bank && *bank) ? bank : "N/A",
> 		 (device && *device) ? device : "N/A");
> 
> to:
> 
> 	snprintf(dimm->label, sizeof(dimm->label), "%s%s%s",
> 		 (bank && *bank) ? bank : "",
> 		 (bank && device) ? " " : "",
> 		 (device && *device) ? device : "");
> 
> It keeps the default assignment from edac_mc_alloc_dimms() but changes
> we label if one of bank or device is given.

Yap, that should take care of all possible "configurations" BIOS throws
at us.

Toshi, could you pls add this to the fix and test it on your machine to
make sure it still works as expected?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2022-07-25 11:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 18:05 [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register() Toshi Kani
2022-07-22 13:20 ` Borislav Petkov
2022-07-22 15:24   ` Kani, Toshi
2022-07-25  9:53   ` Robert Richter
2022-07-25 10:14     ` Borislav Petkov
2022-07-25 10:45       ` Robert Richter
2022-07-25 11:09         ` Robert Richter
2022-07-25 11:23           ` Borislav Petkov [this message]
2022-07-25 11:30             ` Robert Richter
2022-07-25 12:54               ` Borislav Petkov
2022-07-25 16:41             ` 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=Yt59LiHs3gWNpNW1@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=rric@kernel.org \
    --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