WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Invalid length provided for SMBIOS data

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Invalid length provided for SMBIOS data
From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Date: Tue, 3 Oct 2006 21:08:51 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, aball@xxxxxxxxxx
Delivery-date: Tue, 03 Oct 2006 13:09:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C1470751.1F0F%Keir.Fraser@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1159798240.27206.13.camel@localhost> <C1470751.1F0F%Keir.Fraser@xxxxxxxxxxxx>
Reply-to: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
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@xxxxxxxxxx>

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: xen-smbios-length-2.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel