[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.0-testing] xen: only check for shared pages while any exist on teardown
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1344523639 -3600 # Node ID a51c86b407d732dd66343dea7a6249d2649740c6 # Parent 6d7ae840463c5d6d15c710199b3f4b2bb2a33000 xen: only check for shared pages while any exist on teardown Avoids worst case behavour when guest has a large p2m. This is XSA-11 / CVE-2012-3433 Signed-off-by: Tim Deegan <tim@xxxxxxx> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Tested-by: Olaf Hering <olaf@xxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r 6d7ae840463c -r a51c86b407d7 xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c Mon Jul 30 13:39:47 2012 +0100 +++ b/xen/arch/x86/mm/p2m.c Thu Aug 09 15:47:19 2012 +0100 @@ -1725,6 +1725,8 @@ void p2m_teardown(struct domain *d) #ifdef __x86_64__ for ( gfn=0; gfn < p2m->max_mapped_pfn; gfn++ ) { + if ( atomic_read(&d->shr_pages) == 0 ) + break; mfn = p2m->get_entry(d, gfn, &t, p2m_query); if ( mfn_valid(mfn) && (t == p2m_ram_shared) ) BUG_ON(mem_sharing_unshare_page(d, gfn, MEM_SHARING_DESTROY_GFN)); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |