Skip to content

Commit

Permalink
[POWERPC] Fix kernel panic in arch_arm_kprobe
Browse files Browse the repository at this point in the history
The code in arch_arm_kprobe was trying to set a breakpoint which
resulted in a page fault because the kernel text pages were write
protected.  Disable the write protect when CONFIG_KPROBES is defined.

Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Ionut Nicu authored and Paul Mackerras committed Apr 7, 2008
1 parent 0119536 commit 221ac32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/asm-powerpc/pgtable-ppc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ extern int icache_44x_need_flush;
#define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED)
#define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC)

#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH)
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\
defined(CONFIG_KPROBES)
/* We want the debuggers to be able to set breakpoints anywhere, so
* don't write protect the kernel text */
#define _PAGE_RAM_TEXT _PAGE_RAM
Expand Down

0 comments on commit 221ac32

Please sign in to comment.