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] [PATCH] linux: fix grant table bug

To: Michael Abd-El-Malek <mabdelmalek@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] linux: fix grant table bug
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 31 Mar 2008 10:53:04 +0100
Delivery-date: Mon, 31 Mar 2008 03:12:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47F05DB1.5090606@xxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AciTFQNbQcN8Nv8IEdy9kgAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] linux: fix grant table bug
User-agent: Microsoft-Entourage/11.4.0.080122
On 31/3/08 04:42, "Michael Abd-El-Malek" <mabdelmalek@xxxxxxx> wrote:

> A PV OS has two grant table data structures: the grant table itself and a free
> list.  The free list is composed of an array of pages, which grow dynamically
> as 
> the guest OS requires more grants.  While the grant table contains 8-byte
> entries, the free list contains 4-byte entries.  So we have half as many pages
> in the free list than in the grant table.
> 
> There was a bug in the free list allocation code. The free list was indexed as
> if it was the same size as the grant table.  But it's only half as large.  So
> memory got corrupted, and I was seeing crashes in the slab allocator later on.

Nice catch. That code is a bit confusing!

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>