[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.