Linux 6.9-rc1
[linux-2.6-microblaze.git] / arch / arm64 / mm / ptdump.c
index 5b87f8d..6986827 100644 (file)
@@ -322,7 +322,7 @@ static struct ptdump_info kernel_ptdump_info __ro_after_init = {
        .mm             = &init_mm,
 };
 
-void ptdump_check_wx(void)
+bool ptdump_check_wx(void)
 {
        struct pg_state st = {
                .seq = NULL,
@@ -343,11 +343,16 @@ void ptdump_check_wx(void)
 
        ptdump_walk_pgd(&st.ptdump, &init_mm, NULL);
 
-       if (st.wx_pages || st.uxn_pages)
+       if (st.wx_pages || st.uxn_pages) {
                pr_warn("Checked W+X mappings: FAILED, %lu W+X pages found, %lu non-UXN pages found\n",
                        st.wx_pages, st.uxn_pages);
-       else
+
+               return false;
+       } else {
                pr_info("Checked W+X mappings: passed, no W+X pages found\n");
+
+               return true;
+       }
 }
 
 static int __init ptdump_init(void)