From: Jan Beulich Date: Mon, 7 Jan 2013 12:28:29 +0000 (+0100) Subject: x86: compat_show_guest_stack() should not truncate MFN X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7474 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1e86302d8c2ea279fee66ee7c2368258426ef876;p=xen.git x86: compat_show_guest_stack() should not truncate MFN Re-using "addr" here was a mistake, as it is a 32-bit quantity. Signed-off-by: Jan Beulich Acked-by: Ian Campbell Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c index 39c5656353..7add636a10 100644 --- 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 *v, struct cpu_user_regs *regs, 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 ) {