From: "Daniel P. Berrange" <berrange@redhat.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com, aball@us.ibm.com
Subject: Re: Invalid length provided for SMBIOS data
Date: Tue, 3 Oct 2006 21:08:51 +0100 [thread overview]
Message-ID: <20061003200850.GC29356@redhat.com> (raw)
In-Reply-To: <C1470751.1F0F%Keir.Fraser@cl.cam.ac.uk>
[-- 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
next prev parent reply other threads:[~2006-10-03 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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
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=20061003200850.GC29356@redhat.com \
--to=berrange@redhat.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=aball@us.ibm.com \
--cc=xen-devel@lists.xensource.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 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.