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

[Xen-devel] [PATCH] X server crashes Xen on xeno-unstable.bk

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] X server crashes Xen on xeno-unstable.bk
From: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
Date: Thu, 06 Jan 2005 14:53:48 -0500
Cc: m+Ian.Pratt@xxxxxxxxxxxx
Delivery-date: Thu, 06 Jan 2005 20:29:41 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Organization: IBM T.J. Watson Research Center
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
[My platform is a VMX machine, but this is a generic problem in
xeno-unstable.bk. I use FC3 as a base and some onboard graphics
controller chipset]

Starting an X server on xeno-unstable.bk causes Xen to crash with
a page fault generated in Xen. It turns out that the fault is
generated by put_page_from_l1e().

The culprit is the following dereference:

     struct domain   *e = page->u.inuse.domain;

Where the value of page is undefined if the condition

     if ( !(l1v & _PAGE_PRESENT) || !pfn_is_ram(pfn) )

does hold. Unfortunately, this condition is checked after the dereference.

The fix is straightforward, move the dereference after the condition test.

        Leendert

--- xeno-unstable.bk/xen/arch/x86/memory.c.orig 2005-01-06 14:19:33.000000000 
-0500
+++ xeno-unstable.bk/xen/arch/x86/memory.c      2005-01-06 15:02:54.000000000 
-0500
@@ -467,11 +467,12 @@
     unsigned long    l1v  = l1_pgentry_val(l1e);
     unsigned long    pfn  = l1_pgentry_to_pagenr(l1e);
     struct pfn_info *page = &frame_table[pfn];
-    struct domain   *e = page->u.inuse.domain;
+    struct domain   *e;
 
     if ( !(l1v & _PAGE_PRESENT) || !pfn_is_ram(pfn) )
         return;
 
+    e = page->u.inuse.domain;
     if ( unlikely(e != d) )
     {
         /*


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] X server crashes Xen on xeno-unstable.bk, Leendert van Doorn <=