Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()
From: Robert Richter
Date: Mon Jul 25 2022 - 07:30:53 EST
- Next message: syzbot: "Re: [syzbot] WARNING in p9_client_destroy"
- Previous message: kernel test robot: "drivers/iio/frequency/admv1013.c:93:8: warning: Excessive padding in 'struct admv1013_state' (48 padding bytes, where 16 is optimal). Optimal fields order: data, det_en, spi, clkin, reg, input_mode, quad_se_mode, lock, nb, consider reordering the fields o..."
- In reply to: Borislav Petkov: "Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()"
- Next in thread: Borislav Petkov: "Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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@xxxxxxx>
-Robert
- Next message: syzbot: "Re: [syzbot] WARNING in p9_client_destroy"
- Previous message: kernel test robot: "drivers/iio/frequency/admv1013.c:93:8: warning: Excessive padding in 'struct admv1013_state' (48 padding bytes, where 16 is optimal). Optimal fields order: data, det_en, spi, clkin, reg, input_mode, quad_se_mode, lock, nb, consider reordering the fields o..."
- In reply to: Borislav Petkov: "Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()"
- Next in thread: Borislav Petkov: "Re: [PATCH v2] EDAC/ghes: Fix buffer overflow in ghes_edac_register()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]