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

[Xen-devel] [PATCH] x86: compat_show_guest_stack() should not truncate MFN


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Thu, 20 Dec 2012 16:54:17 +0000
  • Delivery-date: Thu, 20 Dec 2012 16:54:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Re-using "addr" here was a mistake, as it is a 32-bit quantity.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/x86_64/compat/traps.c
+++ b/xen/arch/x86/x86_64/compat/traps.c
@@ -20,11 +20,12 @@ void compat_show_guest_stack(struct vcpu
     if ( v != current )
     {
         struct vcpu *vcpu;
+        unsigned long mfn;
 
         ASSERT(guest_kernel_mode(v, regs));
-        addr = read_cr3() >> PAGE_SHIFT;
+        mfn = read_cr3() >> PAGE_SHIFT;
         for_each_vcpu( v->domain, vcpu )
-            if ( pagetable_get_pfn(vcpu->arch.guest_table) == addr )
+            if ( pagetable_get_pfn(vcpu->arch.guest_table) == mfn )
                 break;
         if ( !vcpu )
         {



Attachment: x86-compat-show-guest-stack-mfn.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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