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

[Xen-changelog] Saner error handling in iret hypercall (x86/64).



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 71f74f569b261a4582088103d9d622cafceb84e3
# Parent  e568bfe66a521040c3868a8766dc523231612ab9
Saner error handling in iret hypercall (x86/64).

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r e568bfe66a52 -r 71f74f569b26 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Thu Apr  6 14:25:26 2006
+++ b/xen/arch/x86/x86_64/traps.c       Thu Apr  6 14:55:37 2006
@@ -186,13 +186,19 @@
 
     if ( unlikely(copy_from_user(&iret_saved, (void *)regs->rsp,
                                  sizeof(iret_saved))) )
+    {
+        DPRINTK("Fault while reading IRET context from guest stack\n");
         domain_crash_synchronous();
+    }
 
     /* Returning to user mode? */
     if ( (iret_saved.cs & 3) == 3 )
     {
         if ( unlikely(pagetable_get_paddr(v->arch.guest_table_user) == 0) )
-            return -EFAULT;
+        {
+            DPRINTK("Guest switching to user mode with no user page tables\n");
+            domain_crash_synchronous();
+        }
         toggle_guest_mode(v);
     }
 

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


 


Rackspace

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