diff options
-rw-r--r-- | arch/x86/mm/kaiser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c index bf6a915f60e7..b0b3a69f1c7f 100644 --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -414,7 +414,8 @@ pgd_t kaiser_set_shadow_pgd(pgd_t *pgdp, pgd_t pgd) * get out to userspace running on the kernel CR3, * userspace will crash instead of running. */ - pgd.pgd |= _PAGE_NX; + if (__supported_pte_mask & _PAGE_NX) + pgd.pgd |= _PAGE_NX; } } else if (!pgd.pgd) { /* |