From: "bibo,mao" <bibo.mao@intel.com>
To: ak@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86_64 add NX mask for PTE entry
Date: Wed, 18 Oct 2006 17:15:16 +0800 [thread overview]
Message-ID: <4535F0A4.1090709@intel.com> (raw)
Hi,
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>
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h
index 6899e77..0555c1c 100644
--- a/include/asm-x86_64/pgtable.h
+++ b/include/asm-x86_64/pgtable.h
@@ -366,6 +366,7 @@ static inline pte_t mk_pte_phys(unsigned
{
pte_t pte;
pte_val(pte) = physpage | pgprot_val(pgprot);
+ pte_val(pte) &= __supported_pte_mask;
return pte;
}
next reply other threads:[~2006-10-18 9:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 9:15 bibo,mao [this message]
2006-10-18 10:58 ` [PATCH] x86_64 add NX mask for PTE entry Andi Kleen
2006-10-18 11:23 ` bibo,mao
2006-10-18 11:45 ` bibo,mao
2006-10-18 13:15 ` Andi Kleen
2006-10-19 1:35 ` bibo,mao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4535F0A4.1090709@intel.com \
--to=bibo.mao@intel.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox