From 0c047a68a2527ba45a476582e85afd006ed7cc80 Mon Sep 17 00:00:00 2001 From: Sedat Dilek Date: Tue, 9 Apr 2013 14:27:18 +0200 Subject: [PATCH] [kdb] kgdb: x86: Unset DEBUG_RODATA when !KGDB From [1]: "If the architecture that you are using supports the kernel option CONFIG_DEBUG_RODATA, you should consider turning it off. This option will prevent the use of software breakpoints because it marks certain regions of the kernel's memory space as read-only. If kgdb supports it for the architecture you are using, you can use hardware breakpoints if you desire to run with the CONFIG_DEBUG_RODATA option turned on, else you need to turn off this option." [1] https://www.kernel.org/pub/linux/kernel/people/jwessel/kdb/CompilingAKernel.html Signed-off-by: Sedat Dilek --- arch/x86/Kconfig.debug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index dea0da5..40955b9 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -83,8 +83,9 @@ config X86_PTDUMP config DEBUG_RODATA bool "Write protect kernel read-only data structures" - default y depends on DEBUG_KERNEL + default n if KGDB + default y ---help--- Mark the kernel read-only data as write-protected in the pagetables, in order to catch accidental (and incorrect) writes to such const -- 1.8.2