linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ionut Nicu <ionut.nicu@freescale.com>
To: linuxppc-dev@ozlabs.org
Cc: Ionut Nicu <ionut.nicu@freescale.com>
Subject: [PATCH] Fix kernel panic in arch_arm_kprobe
Date: Wed,  5 Mar 2008 18:12:54 +0200	[thread overview]
Message-ID: <1204733574-7445-1-git-send-email-ionut.nicu@freescale.com> (raw)

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>
---
 include/asm-powerpc/pgtable-ppc32.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index d1332bb..ce66f72 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -428,7 +428,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
-- 
1.5.4.2

                 reply	other threads:[~2008-03-05 16:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1204733574-7445-1-git-send-email-ionut.nicu@freescale.com \
    --to=ionut.nicu@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).