Ping: [PATCH] x86: compat_show_guest_stack() should not truncate MFN
Quoted 25 lines
Quoted 1 line
Quoted 1 line · Jan Beulich
Re-using "addr" here was a mistake, as it is a 32-bit quantity.
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/x86_64/compat/traps.c +3
-2@@ -20,11 +20,12 @@ void compat_show_guest_stack(struct vcpuif ( 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 ) {
Ian Campbell
Acked-byQuoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Jan Beulich
Re-using "addr" here was a mistake, as it is a 32-bit quantity.
Signed-off-by Jan Beulich <[email protected]>
Looks right to me
Quoted 29 lines
Quoted 11 lines
xen/arch/x86/x86_64/compat/traps.c +1
-0@@ -20,11 +20,12 @@ void compat_show_guest_stack(struct vcpuif ( v != current ) {struct vcpu *vcpu; +unsigned long mfn;xen/arch/x86/x86_64/compat/traps.c void compat_show_guest_stack(struct vcpu · line 31
Quoted 10 lines
xen/arch/x86/x86_64/compat/traps.c +2
-2ASSERT (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 ) {_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Keir Fraser
Acked-byQuoted 9 lines · Ian Campbell
Quoted 4 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · Jan Beulich
Re-using "addr" here was a mistake, as it is a 32-bit quantity.
Signed-off-by Jan Beulich <[email protected]>Looks right to me
Acked-by Ian Campbell <[email protected]>
Yes, I must have missed this patch first time round.
Quoted 36 lines
Quoted 25 lines
Quoted 11 lines
xen/arch/x86/x86_64/compat/traps.c +1
-0@@ -20,11 +20,12 @@ void compat_show_guest_stack(struct vcpuif ( v != current ) {struct vcpu *vcpu; +unsigned long mfn;xen/arch/x86/x86_64/compat/traps.c void compat_show_guest_stack(struct vcpu · line 31
Quoted 10 lines
xen/arch/x86/x86_64/compat/traps.c +2
-2ASSERT (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 ) {Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel