qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] hw/smbios: fix memory corruption for large guests due to


From: Michael S. Tsirkin
Subject: Re: [PATCH v2] hw/smbios: fix memory corruption for large guests due to handle overlap
Date: Fri, 4 Feb 2022 08:51:13 -0500

On Fri, Feb 04, 2022 at 10:34:23AM +0100, Igor Mammedov wrote:
> > @@ -982,7 +986,7 @@ void smbios_get_tables(MachineState *ms,
> >                         uint8_t **anchor, size_t *anchor_len,
> >                         Error **errp)
> >  {
> > -    unsigned i, dimm_cnt;
> > +    unsigned i, dimm_cnt, offset;
> >  
> >      if (smbios_legacy) {
> >          *tables = *anchor = NULL;
> > @@ -1012,6 +1016,19 @@ void smbios_get_tables(MachineState *ms,
> >  
> >          dimm_cnt = QEMU_ALIGN_UP(current_machine->ram_size, MAX_DIMM_SZ) / 
> > MAX_DIMM_SZ;
> 
> Michael, Gerd,
> 
> Another question is why we split memory on 16Gb chunks, to begin with.
> Maybe instead of doing so, we should just add 1 type17 entry describing
> whole system RAM size. In which case we don't need this dance around
> handle offsets anymore.

I'm not sure - could be some guests just get confused if a chunk
is too big ... we'd need a lot of testing if we change that ...

-- 
MST




reply via email to

[Prev in Thread] Current Thread [Next in Thread]