Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
xen
24318-x86-mm_Fix_checks_during_foreign_mapping_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 24318-x86-mm_Fix_checks_during_foreign_mapping_of_paged_pages.patch of Package xen
changeset: 24318:f25a004a6de8 user: Andres Lagar-Cavilla <andres@lagarcavilla.org> date: Thu Dec 01 17:21:24 2011 +0000 files: xen/arch/x86/mm.c description: x86/mm: Fix checks during foreign mapping of paged pages Check that the valid mfn is the one we are mapping, not the mfn of the page table of the foreign domain. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org> --- xen/arch/x86/mm.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) Index: xen-4.1.2-testing/xen/arch/x86/mm.c =================================================================== --- xen-4.1.2-testing.orig/xen/arch/x86/mm.c +++ xen-4.1.2-testing/xen/arch/x86/mm.c @@ -3492,8 +3492,9 @@ int do_mmu_update( { l1_pgentry_t l1e = l1e_from_intpte(req.val); p2m_type_t l1e_p2mt; + unsigned long l1emfn = mfn_x( gfn_to_mfn(p2m_get_hostp2m(pg_owner), - l1e_get_pfn(l1e), &l1e_p2mt); + l1e_get_pfn(l1e), &l1e_p2mt)); if ( p2m_is_paged(l1e_p2mt) ) { @@ -3502,7 +3503,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l1e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l1e_p2mt && + !mfn_valid(l1emfn) ) { rc = -ENOENT; break; @@ -3534,7 +3536,8 @@ int do_mmu_update( { l2_pgentry_t l2e = l2e_from_intpte(req.val); p2m_type_t l2e_p2mt; - gfn_to_mfn(p2m_get_hostp2m(pg_owner), l2e_get_pfn(l2e), &l2e_p2mt); + unsigned long l2emfn = mfn_x( + gfn_to_mfn(p2m_get_hostp2m(pg_owner), l2e_get_pfn(l2e), &l2e_p2mt)); if ( p2m_is_paged(l2e_p2mt) ) { @@ -3543,7 +3546,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l2e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l2e_p2mt && + !mfn_valid(l2emfn) ) { rc = -ENOENT; break; @@ -3563,7 +3567,8 @@ int do_mmu_update( { l3_pgentry_t l3e = l3e_from_intpte(req.val); p2m_type_t l3e_p2mt; - gfn_to_mfn(p2m_get_hostp2m(pg_owner), l3e_get_pfn(l3e), &l3e_p2mt); + unsigned long l3emfn = mfn_x( + gfn_to_mfn(p2m_get_hostp2m(pg_owner), l3e_get_pfn(l3e), &l3e_p2mt)); if ( p2m_is_paged(l3e_p2mt) ) { @@ -3572,7 +3577,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l3e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l3e_p2mt && + !mfn_valid(l3emfn) ) { rc = -ENOENT; break; @@ -3592,8 +3598,9 @@ int do_mmu_update( { l4_pgentry_t l4e = l4e_from_intpte(req.val); p2m_type_t l4e_p2mt; + unsigned long l4emfn = mfn_x( gfn_to_mfn(p2m_get_hostp2m(pg_owner), - l4e_get_pfn(l4e), &l4e_p2mt); + l4e_get_pfn(l4e), &l4e_p2mt)); if ( p2m_is_paged(l4e_p2mt) ) { @@ -3602,7 +3609,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l4e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l4e_p2mt && + !mfn_valid(l4emfn) ) { rc = -ENOENT; break;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor