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] Crash during boot in Debian lenny default dom0 kernel (2

To: Jan Beulich <JBeulich@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "pasik@xxxxxx" <pasik@xxxxxx>
Subject: RE: [Xen-devel] Crash during boot in Debian lenny default dom0 kernel (2.6.26-2-xen-686)
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 25 Feb 2010 17:28:27 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 25 Feb 2010 01:30:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B864DE10200007800031393@xxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <de76405a1002241047w4d138abbjc872c371c0e742ed@xxxxxxxxxxxxxx> <25841307.20100224200810@xxxxxxxxxxxxxx> <20100224202009.GE2761@xxxxxxxxxxx> <de76405a1002241557y4449110v37b811fd36c60c4d@xxxxxxxxxxxxxx> <4B864DE10200007800031393@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acq1+zPtfmsuWBH4R+qI8fVZ+Hj7CQAARHwQ
Thread-topic: [Xen-devel] Crash during boot in Debian lenny default dom0 kernel (2.6.26-2-xen-686)
Seems the table_base is not initialized, otherwise, it should be 0x1, instead 
of 0x f5861e4a00000001.

I checked the libxc, and seems the parameter need be cleared in libxc. I didn't 
check kernel code now.
I suspect followed patch is needed (the patch is only compiled and not tested).

--jyh

diff -r 89dfe955f1c3 tools/libxc/xc_physdev.c
--- a/tools/libxc/xc_physdev.c  Thu Feb 25 17:17:02 2010 +0800
+++ b/tools/libxc/xc_physdev.c  Thu Feb 25 17:27:10 2010 +0800
@@ -31,6 +31,7 @@ int xc_physdev_map_pirq(int xc_handle,
     if ( !pirq )
         return -EINVAL;

+    memset(&map, 0, sizeof(struct physdev_map_pirq));
     map.domid = domid;
     map.type = MAP_PIRQ_TYPE_GSI;
     map.index = index;
@@ -59,6 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handl
     if ( !pirq )
         return -EINVAL;

+    memset(&map, 0, sizeof(struct physdev_map_pirq));
     map.domid = domid;
     map.type = MAP_PIRQ_TYPE_MSI;
     map.index = index;
@@ -83,6 +85,7 @@ int xc_physdev_unmap_pirq(int xc_handle,
     int rc;
     struct physdev_unmap_pirq unmap;

+    memset(&unmap, 0, sizeof(struct physdev_unmap_pirq));
     unmap.domid = domid;
     unmap.pirq = pirq;


>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Jan Beulich
>Sent: Thursday, February 25, 2010 5:16 PM
>To: George Dunlap; pasik@xxxxxx
>Cc: Sander Eikelenboom; xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [Xen-devel] Crash during boot in Debian lenny default dom0 kernel
>(2.6.26-2-xen-686)
>
>>>> George Dunlap <George.Dunlap@xxxxxxxxxxxxx> 25.02.10 00:57 >>>
>>I realize dom0 is a privileged guest, but it still seems like we
>>should try not to crash Xen as a result on guest input. :-)
>
>While generally I agree, I think in the given case this is unavoidable -
>Xen could apply some sanity check, but the passing of a machine
>address from Dom0 to Xen implies that Dom0 knows what it does,
>and Xen trusts it. Specifically, struct physdev_map_pirq has this
>contents according to the trace
>
>.domid = 00007ff0
>.type = 00000000
>.index = ffffffff
>.pirq = ffffffff
>.bus = 00000000
>.devfn = 00000008
>.entry_nr = 00000000
>.table_base = f5861e4a00000001
>
>table_base would seem like not having been initialized at all. I
>would guess that they use the structure definition from before
>c/s 18323 (which had, instead of a table_base member, an
>int field indicating MSI vs. MSI-X. The original definition was
>added with c/s 17534 and 17535, but all of those changes
>happened during 3.3 development, so no-one should be using
>the old definition in released code..
>
>Jan
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel

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