projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branches 'x86/fpu', 'x86/mm' and 'x86/asm' into x86/pkeys
[cascardo/linux.git]
/
arch
/
x86
/
mm
/
setup_nx.c
diff --git
a/arch/x86/mm/setup_nx.c
b/arch/x86/mm/setup_nx.c
index
92e2eac
..
8bea847
100644
(file)
--- a/
arch/x86/mm/setup_nx.c
+++ b/
arch/x86/mm/setup_nx.c
@@
-4,6
+4,7
@@
#include <asm/pgtable.h>
#include <asm/proto.h>
#include <asm/pgtable.h>
#include <asm/proto.h>
+#include <asm/cpufeature.h>
static int disable_nx;
static int disable_nx;
@@
-31,9
+32,8
@@
early_param("noexec", noexec_setup);
void x86_configure_nx(void)
{
void x86_configure_nx(void)
{
- if (boot_cpu_has(X86_FEATURE_NX) && !disable_nx)
- __supported_pte_mask |= _PAGE_NX;
- else
+ /* If disable_nx is set, clear NX on all new mappings going forward. */
+ if (disable_nx)
__supported_pte_mask &= ~_PAGE_NX;
}
__supported_pte_mask &= ~_PAGE_NX;
}