|
@@ -31,9 +31,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;
|
|
}
|
|
}
|
|
|
|
|