mm: add Kernel Electric-Fence infrastructure
[linux-2.6-microblaze.git] / init / main.c
index e9933cb..2610510 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/security.h>
 #include <linux/smp.h>
 #include <linux/profile.h>
+#include <linux/kfence.h>
 #include <linux/rcupdate.h>
 #include <linux/moduleparam.h>
 #include <linux/kallsyms.h>
@@ -824,6 +825,7 @@ static void __init mm_init(void)
         */
        page_ext_init_flatmem();
        init_mem_debugging_and_hardening();
+       kfence_alloc_pool();
        report_meminit();
        mem_init();
        /* page_owner must be initialized after buddy is ready */
@@ -955,6 +957,7 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
        hrtimers_init();
        softirq_init();
        timekeeping_init();
+       kfence_init();
 
        /*
         * For best initial stack canary entropy, prepare it after: