Skip to content

Commit

Permalink
x86: mask NX from pte_pfn
Browse files Browse the repository at this point in the history
In 32-bit PAE, mask NX from pte_pfn, since it isn't part of the PFN.
This code is due for unification anyway, but this fixes a latent bug.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jeremy Fitzhardinge authored and Ingo Molnar committed Jan 30, 2008
1 parent 4614139 commit c3bcfb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-x86/pgtable-3level.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static inline int pte_none(pte_t pte)

static inline unsigned long pte_pfn(pte_t pte)
{
return pte_val(pte) >> PAGE_SHIFT;
return (pte_val(pte) & ~_PAGE_NX) >> PAGE_SHIFT;
}

extern unsigned long long __supported_pte_mask;
Expand Down

0 comments on commit c3bcfb5

Please sign in to comment.