aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2010-11-22 08:03:28 -0500
committerThomas Gleixner <tglx@linutronix.de>2010-11-22 08:38:52 -0500
commit691513f70d3957939a318da970987b876c720861 (patch)
treecdaf1826d5895d058e6606eb37a6322892d1d977 /arch
parent84e1c6bb38eb318e456558b610396d9f1afaabf0 (diff)
x86: Resume trampoline must be executable
commit 5bd5a452(x86: Add NX protection for kernel data) marked the trampoline area NX - which unsurprisingly breaks resume and cpu hotplug. Revert the portion of that commit, which touches the trampoline. Originally-from: Lin Ming <ming.m.lin@intel.com> LKML-Reference: <1290410581.2405.24.camel@minggr.sh.intel.com> Cc: Matthieu Castet <castet.matthieu@free.fr> Cc: Siarhei Liakh <sliakh.lkml@gmail.com> Cc: Xuxian Jiang <jiang@cs.ncsu.edu> Cc: Ingo Molnar <mingo@elte.hu> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Andi Kleen <andi@firstfloor.org> Tested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/init_64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ce59c05cae12..71a59296af80 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -788,7 +788,6 @@ void mark_rodata_ro(void)
788 unsigned long rodata_start = 788 unsigned long rodata_start =
789 ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK; 789 ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
790 unsigned long end = (unsigned long) &__end_rodata_hpage_align; 790 unsigned long end = (unsigned long) &__end_rodata_hpage_align;
791 unsigned long kernel_end = (((unsigned long)&__init_end + HPAGE_SIZE) & HPAGE_MASK);
792 unsigned long text_end = PAGE_ALIGN((unsigned long) &__stop___ex_table); 791 unsigned long text_end = PAGE_ALIGN((unsigned long) &__stop___ex_table);
793 unsigned long rodata_end = PAGE_ALIGN((unsigned long) &__end_rodata); 792 unsigned long rodata_end = PAGE_ALIGN((unsigned long) &__end_rodata);
794 unsigned long data_start = (unsigned long) &_sdata; 793 unsigned long data_start = (unsigned long) &_sdata;
@@ -803,7 +802,7 @@ void mark_rodata_ro(void)
803 * The rodata section (but not the kernel text!) should also be 802 * The rodata section (but not the kernel text!) should also be
804 * not-executable. 803 * not-executable.
805 */ 804 */
806 set_memory_nx(rodata_start, (kernel_end - rodata_start) >> PAGE_SHIFT); 805 set_memory_nx(rodata_start, (end - rodata_start) >> PAGE_SHIFT);
807 806
808 rodata_test(); 807 rodata_test();
809 808