Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
xen
19960-show-page-walk.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 19960-show-page-walk.patch of Package xen
# HG changeset patch # User Keir Fraser <keir.fraser@citrix.com> # Date 1248081015 -3600 # Node ID 62b7fc245d1f110dd04aad6523dedcd2c84178e4 # Parent 69cd50c86a798d3717476fb94065da33320cfaa9 x86: make show_page_walk() more robust Also add in a missing line in x86-64's do_page_walk(). Signed-off-by: Jan Beulich <jbeulich@novell.com> --- a/xen/arch/x86/x86_32/traps.c +++ b/xen/arch/x86/x86_32/traps.c @@ -164,7 +164,8 @@ void show_page_walk(unsigned long addr) printk(" L3[0x%03lx] = %"PRIpte" %08lx\n", l3_table_offset(addr), l3e_get_intpte(l3e), pfn); unmap_domain_page(l3t); - if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) ) + if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || + !mfn_valid(mfn) ) return; l2t = map_domain_page(mfn); @@ -176,7 +177,8 @@ void show_page_walk(unsigned long addr) (l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : ""); unmap_domain_page(l2t); if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) || - (l2e_get_flags(l2e) & _PAGE_PSE) ) + (l2e_get_flags(l2e) & _PAGE_PSE) || + !mfn_valid(mfn) ) return; l1t = map_domain_page(mfn); --- a/xen/arch/x86/x86_64/mm.c +++ b/xen/arch/x86/x86_64/mm.c @@ -124,6 +124,7 @@ void *do_page_walk(struct vcpu *v, unsig l3e = l3t[l3_table_offset(addr)]; mfn = l3e_get_pfn(l3e); if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || !mfn_valid(mfn) ) + return NULL; if ( (l3e_get_flags(l3e) & _PAGE_PSE) ) return mfn_to_virt(mfn) + (addr & ((1UL << L3_PAGETABLE_SHIFT) - 1)); --- a/xen/arch/x86/x86_64/traps.c +++ b/xen/arch/x86/x86_64/traps.c @@ -177,7 +177,8 @@ void show_page_walk(unsigned long addr) pfn = mfn_valid(mfn) ? get_gpfn_from_mfn(mfn) : INVALID_M2P_ENTRY; printk(" L4[0x%03lx] = %"PRIpte" %016lx\n", l4_table_offset(addr), l4e_get_intpte(l4e), pfn); - if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) ) + if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) || + !mfn_valid(mfn) ) return; l3t = mfn_to_virt(mfn); @@ -188,7 +189,8 @@ void show_page_walk(unsigned long addr) l3_table_offset(addr), l3e_get_intpte(l3e), pfn, (l3e_get_flags(l3e) & _PAGE_PSE) ? " (PSE)" : ""); if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || - (l3e_get_flags(l3e) & _PAGE_PSE) ) + (l3e_get_flags(l3e) & _PAGE_PSE) || + !mfn_valid(mfn) ) return; l2t = mfn_to_virt(mfn); @@ -199,7 +201,8 @@ void show_page_walk(unsigned long addr) l2_table_offset(addr), l2e_get_intpte(l2e), pfn, (l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : ""); if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) || - (l2e_get_flags(l2e) & _PAGE_PSE) ) + (l2e_get_flags(l2e) & _PAGE_PSE) || + !mfn_valid(mfn) ) return; l1t = mfn_to_virt(mfn);
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