提交 55181000 编写于 作者: A Andi Kleen 提交者: Linus Torvalds

x86: Disable KPROBES with DEBUG_RODATA for now

Right now Kprobes cannot write to the write protected kernel text when
DEBUG_RODATA is enabled. Disallow this in Kconfig for now.

Temporary fix for 2.6.22. In .23 add code to temporarily
unprotect it.
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 9f1f79e6
...@@ -49,6 +49,7 @@ config DEBUG_PAGEALLOC ...@@ -49,6 +49,7 @@ config DEBUG_PAGEALLOC
config DEBUG_RODATA config DEBUG_RODATA
bool "Write protect kernel read-only data structures" bool "Write protect kernel read-only data structures"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on !KPROBES # temporary for 2.6.22
help help
Mark the kernel read-only data as write-protected in the pagetables, Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const in order to catch accidental (and incorrect) writes to such const
......
...@@ -9,6 +9,7 @@ source "lib/Kconfig.debug" ...@@ -9,6 +9,7 @@ source "lib/Kconfig.debug"
config DEBUG_RODATA config DEBUG_RODATA
bool "Write protect kernel read-only data structures" bool "Write protect kernel read-only data structures"
depends on DEBUG_KERNEL depends on DEBUG_KERNEL
depends on !KPROBES # temporary for 2.6.22
help help
Mark the kernel read-only data as write-protected in the pagetables, Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const data. in order to catch accidental (and incorrect) writes to such const data.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册