Skip to content

Commit

Permalink
x86: honor _PAGE_PSE bit on page walks
Browse files Browse the repository at this point in the history
[ tglx: arch/x86 adaptation ]

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed Oct 19, 2007
1 parent 1f503e7 commit b1992df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arch/x86/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
* it's allocated already.
*/
if ((page >> PAGE_SHIFT) < max_low_pfn
&& (page & _PAGE_PRESENT)) {
&& (page & _PAGE_PRESENT)
&& !(page & _PAGE_PSE)) {
page &= PAGE_MASK;
page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT)
& (PTRS_PER_PTE - 1)];
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/mm/fault_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void dump_pagetable(unsigned long address)
pmd = pmd_offset(pud, address);
if (bad_address(pmd)) goto bad;
printk("PMD %lx ", pmd_val(*pmd));
if (!pmd_present(*pmd)) goto ret;
if (!pmd_present(*pmd) || pmd_large(*pmd)) goto ret;

pte = pte_offset_kernel(pmd, address);
if (bad_address(pte)) goto bad;
Expand Down

0 comments on commit b1992df

Please sign in to comment.