aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-05-12 15:21:01 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 15:53:07 -0400
commit72b59d67f80983f7bb587b086fb4cb1bc95263a4 (patch)
tree78160905e5c943a0a19fe7774c927a73d61638b7
parent25b0b44a1c732ccfc58095cdd8438955a0a19fff (diff)
x86_64: fix kernel rodata NX setting
Without CONFIG_DYNAMIC_FTRACE, mark_rodata_ro() would mark a wrong number of pages as no-execute. The bug was introduced in the patch "ftrace: dont write protect kernel text". The symptom was machine reboot after a CPU hotplug. Signed-off-by: Pekka Paalanen <pq@iki.fi> Acked-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/mm/init_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 41824e776b6c..295be1d07b82 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -782,7 +782,7 @@ void mark_rodata_ro(void)
782 * The rodata section (but not the kernel text!) should also be 782 * The rodata section (but not the kernel text!) should also be
783 * not-executable. 783 * not-executable.
784 */ 784 */
785 set_memory_nx(rodata_start, (end - start) >> PAGE_SHIFT); 785 set_memory_nx(rodata_start, (end - rodata_start) >> PAGE_SHIFT);
786 786
787 rodata_test(); 787 rodata_test();
788 788