* Invalid length provided for SMBIOS data
@ 2006-09-27 18:03 Daniel P. Berrange
2006-10-02 14:10 ` Andrew D. Ball
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2006-09-27 18:03 UTC (permalink / raw)
To: xen-devel
I was running some tests of HVM guests on Fedora Core 6, test3 and came
across a potential issue with SMBIOS data. When running dmidecode in the
guest VMs it reports that the actual SMBIOS data size, does not match
the advertised size. eg
"Wrong DMI structures length: 439 bytes announced, structures occupy 363 bytes."
I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
the bit of code responsible for constructing the SMBIOS tables is identical
to that on the vanilla xen-unstable.hg repository. I'm not familiar
enough with SMBIOS specs / code to determine where the mistake in the
length calculation is though...
Is anyone else seeing this length mismatch in HVM guests ?
FYI, we're tracking this as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Invalid length provided for SMBIOS data
2006-09-27 18:03 Invalid length provided for SMBIOS data Daniel P. Berrange
@ 2006-10-02 14:10 ` Andrew D. Ball
2006-10-02 17:13 ` Keir Fraser
[not found] ` <1159802159.27206.15.camel@localhost>
2006-10-03 14:53 ` Andrew D. Ball
2 siblings, 1 reply; 8+ messages in thread
From: Andrew D. Ball @ 2006-10-02 14:10 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: xen-devel
This is seriously broken -- I'll write a patch as soon as I can, unless
somebody beats me to it :-)
Peace.
Andrew
On Wed, 2006-09-27 at 19:03 +0100, Daniel P. Berrange wrote:
> I was running some tests of HVM guests on Fedora Core 6, test3 and came
> across a potential issue with SMBIOS data. When running dmidecode in the
> guest VMs it reports that the actual SMBIOS data size, does not match
> the advertised size. eg
>
> "Wrong DMI structures length: 439 bytes announced, structures occupy 363 bytes."
>
> I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
> RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
> the bit of code responsible for constructing the SMBIOS tables is identical
> to that on the vanilla xen-unstable.hg repository. I'm not familiar
> enough with SMBIOS specs / code to determine where the mistake in the
> length calculation is though...
>
> Is anyone else seeing this length mismatch in HVM guests ?
>
> FYI, we're tracking this as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
>
> Regards,
> Dan.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Invalid length provided for SMBIOS data
2006-10-02 14:10 ` Andrew D. Ball
@ 2006-10-02 17:13 ` Keir Fraser
2006-10-02 17:52 ` Andrew D. Ball
2006-10-03 20:08 ` Daniel P. Berrange
0 siblings, 2 replies; 8+ messages in thread
From: Keir Fraser @ 2006-10-02 17:13 UTC (permalink / raw)
To: aball, Daniel P. Berrange; +Cc: xen-devel
I've checked in a simplification of the SMBIOS code as changeset 11686 in
xen-unstable. Since this entirely removes the code that computes the table
size 'ahead of time', it is very likely to fix this bug. We now *definitely*
write the number of bytes that we actually emitted when constructing the
tables. So unless the tables themselves are screwed, the length field must
now surely be correct.
-- Keir
On 2/10/06 15:10, "Andrew D. Ball" <aball@us.ibm.com> wrote:
> This is seriously broken -- I'll write a patch as soon as I can, unless
> somebody beats me to it :-)
>
> Peace.
> Andrew
>
> On Wed, 2006-09-27 at 19:03 +0100, Daniel P. Berrange wrote:
>> I was running some tests of HVM guests on Fedora Core 6, test3 and came
>> across a potential issue with SMBIOS data. When running dmidecode in the
>> guest VMs it reports that the actual SMBIOS data size, does not match
>> the advertised size. eg
>>
>> "Wrong DMI structures length: 439 bytes announced, structures occupy 363
>> bytes."
>>
>> I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
>> RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
>> the bit of code responsible for constructing the SMBIOS tables is identical
>> to that on the vanilla xen-unstable.hg repository. I'm not familiar
>> enough with SMBIOS specs / code to determine where the mistake in the
>> length calculation is though...
>>
>> Is anyone else seeing this length mismatch in HVM guests ?
>>
>> FYI, we're tracking this as
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
>>
>> Regards,
>> Dan.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Invalid length provided for SMBIOS data
2006-10-02 17:13 ` Keir Fraser
@ 2006-10-02 17:52 ` Andrew D. Ball
2006-10-03 6:47 ` Keir Fraser
2006-10-03 20:08 ` Daniel P. Berrange
1 sibling, 1 reply; 8+ messages in thread
From: Andrew D. Ball @ 2006-10-02 17:52 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, Daniel P. Berrange
Is this in some sort of staging tree? I don't see it in xen-unstable.hg
yet. If so, can I pull it from somewhere?
Peace.
Andrew
On Mon, 2006-10-02 at 18:13 +0100, Keir Fraser wrote:
> I've checked in a simplification of the SMBIOS code as changeset 11686 in
> xen-unstable. Since this entirely removes the code that computes the table
> size 'ahead of time', it is very likely to fix this bug. We now *definitely*
> write the number of bytes that we actually emitted when constructing the
> tables. So unless the tables themselves are screwed, the length field must
> now surely be correct.
>
> -- Keir
>
> On 2/10/06 15:10, "Andrew D. Ball" <aball@us.ibm.com> wrote:
>
> > This is seriously broken -- I'll write a patch as soon as I can, unless
> > somebody beats me to it :-)
> >
> > Peace.
> > Andrew
> >
> > On Wed, 2006-09-27 at 19:03 +0100, Daniel P. Berrange wrote:
> >> I was running some tests of HVM guests on Fedora Core 6, test3 and came
> >> across a potential issue with SMBIOS data. When running dmidecode in the
> >> guest VMs it reports that the actual SMBIOS data size, does not match
> >> the advertised size. eg
> >>
> >> "Wrong DMI structures length: 439 bytes announced, structures occupy 363
> >> bytes."
> >>
> >> I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
> >> RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
> >> the bit of code responsible for constructing the SMBIOS tables is identical
> >> to that on the vanilla xen-unstable.hg repository. I'm not familiar
> >> enough with SMBIOS specs / code to determine where the mistake in the
> >> length calculation is though...
> >>
> >> Is anyone else seeing this length mismatch in HVM guests ?
> >>
> >> FYI, we're tracking this as
> >> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
> >>
> >> Regards,
> >> Dan.
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Invalid length provided for SMBIOS data
2006-10-02 17:52 ` Andrew D. Ball
@ 2006-10-03 6:47 ` Keir Fraser
0 siblings, 0 replies; 8+ messages in thread
From: Keir Fraser @ 2006-10-03 6:47 UTC (permalink / raw)
To: aball; +Cc: xen-devel, Daniel P. Berrange
It's in the public tree now.
K.
On 2/10/06 6:52 pm, "Andrew D. Ball" <aball@us.ibm.com> wrote:
> Is this in some sort of staging tree? I don't see it in xen-unstable.hg
> yet. If so, can I pull it from somewhere?
>
> Peace.
> Andrew
>
> On Mon, 2006-10-02 at 18:13 +0100, Keir Fraser wrote:
>> I've checked in a simplification of the SMBIOS code as changeset 11686 in
>> xen-unstable. Since this entirely removes the code that computes the table
>> size 'ahead of time', it is very likely to fix this bug. We now *definitely*
>> write the number of bytes that we actually emitted when constructing the
>> tables. So unless the tables themselves are screwed, the length field must
>> now surely be correct.
>>
>> -- Keir
>>
>> On 2/10/06 15:10, "Andrew D. Ball" <aball@us.ibm.com> wrote:
>>
>>> This is seriously broken -- I'll write a patch as soon as I can, unless
>>> somebody beats me to it :-)
>>>
>>> Peace.
>>> Andrew
>>>
>>> On Wed, 2006-09-27 at 19:03 +0100, Daniel P. Berrange wrote:
>>>> I was running some tests of HVM guests on Fedora Core 6, test3 and came
>>>> across a potential issue with SMBIOS data. When running dmidecode in the
>>>> guest VMs it reports that the actual SMBIOS data size, does not match
>>>> the advertised size. eg
>>>>
>>>> "Wrong DMI structures length: 439 bytes announced, structures occupy 363
>>>> bytes."
>>>>
>>>> I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
>>>> RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
>>>> the bit of code responsible for constructing the SMBIOS tables is identical
>>>> to that on the vanilla xen-unstable.hg repository. I'm not familiar
>>>> enough with SMBIOS specs / code to determine where the mistake in the
>>>> length calculation is though...
>>>>
>>>> Is anyone else seeing this length mismatch in HVM guests ?
>>>>
>>>> FYI, we're tracking this as
>>>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
>>>>
>>>> Regards,
>>>> Dan.
>>>
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Invalid length provided for SMBIOS data
2006-10-02 17:13 ` Keir Fraser
2006-10-02 17:52 ` Andrew D. Ball
@ 2006-10-03 20:08 ` Daniel P. Berrange
1 sibling, 0 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2006-10-03 20:08 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel, aball
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
On Mon, Oct 02, 2006 at 06:13:37PM +0100, Keir Fraser wrote:
> I've checked in a simplification of the SMBIOS code as changeset 11686 in
> xen-unstable. Since this entirely removes the code that computes the table
> size 'ahead of time', it is very likely to fix this bug. We now *definitely*
> write the number of bytes that we actually emitted when constructing the
> tables. So unless the tables themselves are screwed, the length field must
> now surely be correct.
And indeed the one of the tables was screwed. There is a sneaky typo
in calculating how far to advance the pointer in the CPU table - its
doing strlen(buf) instead of strlen(cpu_manufactuerer) which on my
particular system offset things by 6 bytes. Attaching the trivial
patch to fix it - applies on top of your patch in 11686.
Signed-of-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
[-- Attachment #2: xen-smbios-length-2.patch --]
[-- Type: text/plain, Size: 568 bytes --]
diff -ru xen-3.0.3-testing-11633.smbios-orig/tools/firmware/hvmloader/smbios.c xen-3.0.3-testing-11633.smbios/tools/firmware/hvmloader/smbios.c
--- xen-3.0.3-testing-11633.smbios-orig/tools/firmware/hvmloader/smbios.c 2006-10-03 16:02:57.000000000 -0400
+++ xen-3.0.3-testing-11633.smbios/tools/firmware/hvmloader/smbios.c 2006-10-03 16:01:17.000000000 -0400
@@ -434,7 +434,7 @@
start += strlen(buf) + 1;
strcpy((char *)start, cpu_manufacturer);
- start += strlen(buf) + 1;
+ start += strlen(cpu_manufacturer) + 1;
*((uint8_t *)start) = 0;
return start+1;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1159802159.27206.15.camel@localhost>]
* Re: Invalid length provided for SMBIOS data
2006-09-27 18:03 Invalid length provided for SMBIOS data Daniel P. Berrange
2006-10-02 14:10 ` Andrew D. Ball
[not found] ` <1159802159.27206.15.camel@localhost>
@ 2006-10-03 14:53 ` Andrew D. Ball
2 siblings, 0 replies; 8+ messages in thread
From: Andrew D. Ball @ 2006-10-03 14:53 UTC (permalink / raw)
To: Daniel P. Berrange, xen-devel
Is this fixed now?
Peace.
Andrew
On Wed, 2006-09-27 at 19:03 +0100, Daniel P. Berrange wrote:
> I was running some tests of HVM guests on Fedora Core 6, test3 and came
> across a potential issue with SMBIOS data. When running dmidecode in the
> guest VMs it reports that the actual SMBIOS data size, does not match
> the advertised size. eg
>
> "Wrong DMI structures length: 439 bytes announced, structures occupy 363 bytes."
>
> I've tried this in a variety of guest OS (RHEL-3 32-bit, RHEL-3 64-bit,
> RHEL-4 64-bit) all the same results. The host is running FC6 test3, but
> the bit of code responsible for constructing the SMBIOS tables is identical
> to that on the vanilla xen-unstable.hg repository. I'm not familiar
> enough with SMBIOS specs / code to determine where the mistake in the
> length calculation is though...
>
> Is anyone else seeing this length mismatch in HVM guests ?
>
> FYI, we're tracking this as https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=207501
>
> Regards,
> Dan.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-10-03 20:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-27 18:03 Invalid length provided for SMBIOS data Daniel P. Berrange
2006-10-02 14:10 ` Andrew D. Ball
2006-10-02 17:13 ` Keir Fraser
2006-10-02 17:52 ` Andrew D. Ball
2006-10-03 6:47 ` Keir Fraser
2006-10-03 20:08 ` Daniel P. Berrange
[not found] ` <1159802159.27206.15.camel@localhost>
[not found] ` <20061002154857.GA1730@redhat.com>
2006-10-02 17:49 ` Andrew D. Ball
2006-10-03 14:53 ` Andrew D. Ball
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.