diff options
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r-- | arch/x86/mm/init_32.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index ec30d10154b6..f96eca21ad8f 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -710,6 +710,8 @@ void mark_rodata_ro(void) | |||
710 | unsigned long start = PFN_ALIGN(_text); | 710 | unsigned long start = PFN_ALIGN(_text); |
711 | unsigned long size = PFN_ALIGN(_etext) - start; | 711 | unsigned long size = PFN_ALIGN(_etext) - start; |
712 | 712 | ||
713 | #ifndef CONFIG_DYNAMIC_FTRACE | ||
714 | /* Dynamic tracing modifies the kernel text section */ | ||
713 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); | 715 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); |
714 | printk(KERN_INFO "Write protecting the kernel text: %luk\n", | 716 | printk(KERN_INFO "Write protecting the kernel text: %luk\n", |
715 | size >> 10); | 717 | size >> 10); |
@@ -722,6 +724,8 @@ void mark_rodata_ro(void) | |||
722 | printk(KERN_INFO "Testing CPA: write protecting again\n"); | 724 | printk(KERN_INFO "Testing CPA: write protecting again\n"); |
723 | set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT); | 725 | set_pages_ro(virt_to_page(start), size>>PAGE_SHIFT); |
724 | #endif | 726 | #endif |
727 | #endif /* CONFIG_DYNAMIC_FTRACE */ | ||
728 | |||
725 | start += size; | 729 | start += size; |
726 | size = (unsigned long)__end_rodata - start; | 730 | size = (unsigned long)__end_rodata - start; |
727 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); | 731 | set_pages_ro(virt_to_page(start), size >> PAGE_SHIFT); |