]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - arch/x86/mm/dump_pagetables.c
x86/mm: Prevent bogus warnings with "noexec=off"
[thirdparty/linux.git] / arch / x86 / mm / dump_pagetables.c
index ee8f8ab469417c6eb0f06aa6d4390a0eec8162b1..c0309ea9abee4201b1f697e9e61e20296f359736 100644 (file)
@@ -259,7 +259,8 @@ static void note_wx(struct pg_state *st)
 #endif
        /* Account the WX pages */
        st->wx_pages += npages;
-       WARN_ONCE(1, "x86/mm: Found insecure W+X mapping at address %pS\n",
+       WARN_ONCE(__supported_pte_mask & _PAGE_NX,
+                 "x86/mm: Found insecure W+X mapping at address %pS\n",
                  (void *)st->start_address);
 }