]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - arch/x86/mm/dump_pagetables.c
arm64, powerpc, riscv, s390, x86: ptdump: refactor CONFIG_DEBUG_WX
[thirdparty/linux.git] / arch / x86 / mm / dump_pagetables.c
index e1b599ecbbc26d02c2de09a589f899f0eebca01d..0008524eebe9af98552b1a2b4ee3f815bb4b1baf 100644 (file)
@@ -433,6 +433,9 @@ void ptdump_walk_user_pgd_level_checkwx(void)
 
 void ptdump_walk_pgd_level_checkwx(void)
 {
+       if (!(__supported_pte_mask & _PAGE_NX))
+               return;
+
        ptdump_walk_pgd_level_core(NULL, &init_mm, INIT_PGD, true, false);
 }