[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yt5+4feA3Qux743w@rric.localdomain>
Date: Mon, 25 Jul 2022 13:30:41 +0200
From: Robert Richter <rric@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Toshi Kani <toshi.kani@....com>, mchehab@...nel.org,
elliott@....com, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()
On 25.07.22 13:23:26, Borislav Petkov wrote:
> 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?
If you like, you can add my:
Signed-off-by: Robert Richter <rrichter@....com>
-Robert
Powered by blists - more mailing lists