diff options
author | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-04-21 10:39:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-21 10:48:08 +0200 |
commit | 89388913f2c88a2cd15d24abab571b17a2596127 (patch) | |
tree | 2d3791f3fe4b844ba007371c2fe203b304e4c2cc /arch/x86/mm/init_64.c | |
parent | Merge branch 'linus' into x86/mm (diff) | |
download | linux-89388913f2c88a2cd15d24abab571b17a2596127.tar.xz linux-89388913f2c88a2cd15d24abab571b17a2596127.zip |
x86: unify noexec handling
This patch unifies noexec handling on 32-bit and 64-bit.
[ Impact: cleanup ]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
[ mingo@elte.hu: build fix ]
LKML-Reference: <1240303167.771.69.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 1753e8020df6..a4e7846efb1a 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -85,39 +85,6 @@ early_param("gbpages", parse_direct_gbpages_on); pteval_t __supported_pte_mask __read_mostly = ~_PAGE_IOMAP; EXPORT_SYMBOL_GPL(__supported_pte_mask); -static int disable_nx __cpuinitdata; - -/* - * noexec=on|off - * Control non-executable mappings for 64-bit processes. - * - * on Enable (default) - * off Disable - */ -static int __init nonx_setup(char *str) -{ - if (!str) - return -EINVAL; - if (!strncmp(str, "on", 2)) { - __supported_pte_mask |= _PAGE_NX; - disable_nx = 0; - } else if (!strncmp(str, "off", 3)) { - disable_nx = 1; - __supported_pte_mask &= ~_PAGE_NX; - } - return 0; -} -early_param("noexec", nonx_setup); - -void __cpuinit check_efer(void) -{ - unsigned long efer; - - rdmsrl(MSR_EFER, efer); - if (!(efer & EFER_NX) || disable_nx) - __supported_pte_mask &= ~_PAGE_NX; -} - int force_personality32; /* |