| #include <linux/spinlock.h> |
| static int disable_nx __cpuinitdata; |
| * Control non-executable mappings for processes. |
| static int __init noexec_setup(char *str) |
| if (!strncmp(str, "on", 2)) { |
| } else if (!strncmp(str, "off", 3)) { |
| early_param("noexec", noexec_setup); |
| void __cpuinit x86_configure_nx(void) |
| if (cpu_has_nx && !disable_nx) |
| __supported_pte_mask |= _PAGE_NX; |
| __supported_pte_mask &= ~_PAGE_NX; |
| void __init x86_report_nx(void) |
| printk(KERN_NOTICE "Notice: NX (Execute Disable) protection " |
| #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) |
| printk(KERN_INFO "NX (Execute Disable) protection: " |
| "disabled by kernel command line option\n"); |
| printk(KERN_INFO "NX (Execute Disable) protection: " |
| /* 32bit non-PAE kernel, NX cannot be used */ |
| printk(KERN_NOTICE "Notice: NX (Execute Disable) protection " |
| "cannot be enabled: non-PAE kernel!\n"); |