Commit 1a487252 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Ingo Molnar

x86: move misplaced rodata check call

It looks like a mismerge put the rodata self-check in the wrong spot; move
it to the right place after marking the .rodata section read only.
Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 4c61afcd
...@@ -573,7 +573,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end) ...@@ -573,7 +573,6 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
set_memory_rw(begin, (end - begin)/PAGE_SIZE); set_memory_rw(begin, (end - begin)/PAGE_SIZE);
set_memory_np(begin, (end - begin)/PAGE_SIZE); set_memory_np(begin, (end - begin)/PAGE_SIZE);
set_memory_nx(begin, (end - begin)/PAGE_SIZE); set_memory_nx(begin, (end - begin)/PAGE_SIZE);
rodata_test();
} }
#endif #endif
} }
...@@ -614,6 +613,8 @@ void mark_rodata_ro(void) ...@@ -614,6 +613,8 @@ void mark_rodata_ro(void)
printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n", printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
(end - start) >> 10); (end - start) >> 10);
rodata_test();
#ifdef CONFIG_CPA_DEBUG #ifdef CONFIG_CPA_DEBUG
printk("Testing CPA: undo %lx-%lx\n", start, end); printk("Testing CPA: undo %lx-%lx\n", start, end);
set_memory_rw(start, (end-start) >> PAGE_SHIFT); set_memory_rw(start, (end-start) >> PAGE_SHIFT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment