Skip to content

Commit

Permalink
[PATCH] x86-64: x86_64 add NX mask for PTE entry
Browse files Browse the repository at this point in the history
    If function change_page_attr_addr calls revert_page to revert
to original pte value, mk_pte_phys does not mask NX bit. If NX bit
is set on no NX hardware supported x86_64 machine, there is will
be RSVD type page fault and system will crash. This patch adds NX
mask bit for PTE entry.

Signed-off-by: bibo,mao <bibo.mao@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
bibo,mao authored and Andi Kleen committed Oct 21, 2006
1 parent 690a973 commit 7a71cef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/asm-x86_64/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
{
pte_t pte;
pte_val(pte) = physpage | pgprot_val(pgprot);
pte_val(pte) &= __supported_pte_mask;
return pte;
}

Expand Down

0 comments on commit 7a71cef

Please sign in to comment.