[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.2] x86/shadow: fix off-by-one in MMIO permission check
commit 927fcee39803c4134d82d03d410bf90d76457d90 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu May 23 10:10:08 2013 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu May 23 10:10:08 2013 +0200 x86/shadow: fix off-by-one in MMIO permission check iomem_access_permitted() wants an inclusive range as input. Also use pfn_to_paddr() in nearby code instead of open coding it. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> master commit: afa65ddfd88184a894d9364bec587554c28c20e0 master date: 2013-05-15 14:34:05 +0200 --- xen/arch/x86/mm/shadow/multi.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index ca4a241..08a86a5 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -603,13 +603,13 @@ _sh_propagate(struct vcpu *v, else if ( d->arch.hvm_domain.is_in_uc_mode ) sflags |= pat_type_2_pte_flags(PAT_TYPE_UNCACHABLE); else - if ( iomem_access_permitted(d, mfn_x(target_mfn), mfn_x(target_mfn) + 1) ) + if ( iomem_access_permitted(d, mfn_x(target_mfn), mfn_x(target_mfn)) ) { if ( p2mt == p2m_mmio_direct ) sflags |= get_pat_flags(v, gflags, gfn_to_paddr(target_gfn), - ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT, + pfn_to_paddr(mfn_x(target_mfn)), MTRR_TYPE_UNCACHABLE); else if ( iommu_snoop ) sflags |= pat_type_2_pte_flags(PAT_TYPE_WRBACK); @@ -617,7 +617,7 @@ _sh_propagate(struct vcpu *v, sflags |= get_pat_flags(v, gflags, gfn_to_paddr(target_gfn), - ((paddr_t)mfn_x(target_mfn)) << PAGE_SHIFT, + pfn_to_paddr(mfn_x(target_mfn)), NO_HARDCODE_MEM_TYPE); } } -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.2 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |