aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/Kconfig.debug1
-rw-r--r--arch/x86_64/mm/init.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86_64/Kconfig.debug b/arch/x86_64/Kconfig.debug
index 8a8677518447..775d211a5cf9 100644
--- a/arch/x86_64/Kconfig.debug
+++ b/arch/x86_64/Kconfig.debug
@@ -9,7 +9,6 @@ source "lib/Kconfig.debug"
9config DEBUG_RODATA 9config DEBUG_RODATA
10 bool "Write protect kernel read-only data structures" 10 bool "Write protect kernel read-only data structures"
11 depends on DEBUG_KERNEL 11 depends on DEBUG_KERNEL
12 depends on !KPROBES # temporary for 2.6.22
13 help 12 help
14 Mark the kernel read-only data as write-protected in the pagetables, 13 Mark the kernel read-only data as write-protected in the pagetables,
15 in order to catch accidental (and incorrect) writes to such const data. 14 in order to catch accidental (and incorrect) writes to such const data.
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index efb6e845114e..9a0e98accf04 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -605,6 +605,11 @@ void mark_rodata_ro(void)
605 if (num_possible_cpus() > 1) 605 if (num_possible_cpus() > 1)
606 start = (unsigned long)_etext; 606 start = (unsigned long)_etext;
607#endif 607#endif
608
609#ifdef CONFIG_KPROBES
610 start = (unsigned long)__start_rodata;
611#endif
612
608 end = (unsigned long)__end_rodata; 613 end = (unsigned long)__end_rodata;
609 start = (start + PAGE_SIZE - 1) & PAGE_MASK; 614 start = (start + PAGE_SIZE - 1) & PAGE_MASK;
610 end &= PAGE_MASK; 615 end &= PAGE_MASK;