diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2012-03-23 10:35:05 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2012-03-29 18:41:25 -0400 |
commit | 3751d3e85cf693e10e2c47c03c8caa65e171099b (patch) | |
tree | 65d123dac17103f6862831bcb4271b263805fd9f /include | |
parent | 98b54aa1a2241b59372468bd1e9c2d207bdba54b (diff) |
x86,kgdb: Fix DEBUG_RODATA limitation using text_poke()
There has long been a limitation using software breakpoints with a
kernel compiled with CONFIG_DEBUG_RODATA going back to 2.6.26. For
this particular patch, it will apply cleanly and has been tested all
the way back to 2.6.36.
The kprobes code uses the text_poke() function which accommodates
writing a breakpoint into a read-only page. The x86 kgdb code can
solve the problem similarly by overriding the default breakpoint
set/remove routines and using text_poke() directly.
The x86 kgdb code will first attempt to use the traditional
probe_kernel_write(), and next try using a the text_poke() function.
The break point install method is tracked such that the correct break
point removal routine will get called later on.
Cc: x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: stable@vger.kernel.org # >= 2.6.36
Inspried-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kgdb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index e5d689c1d774..c4d2fc194ede 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -63,7 +63,8 @@ enum kgdb_bptype { | |||
63 | BP_HARDWARE_BREAKPOINT, | 63 | BP_HARDWARE_BREAKPOINT, |
64 | BP_WRITE_WATCHPOINT, | 64 | BP_WRITE_WATCHPOINT, |
65 | BP_READ_WATCHPOINT, | 65 | BP_READ_WATCHPOINT, |
66 | BP_ACCESS_WATCHPOINT | 66 | BP_ACCESS_WATCHPOINT, |
67 | BP_POKE_BREAKPOINT, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | enum kgdb_bpstate { | 70 | enum kgdb_bpstate { |