diff options
author | bibo,mao <bibo.mao@intel.com> | 2006-03-26 01:38:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 08:57:04 -0800 |
commit | 2326c77017c79fd6d55c69d8a49a57a252921bcd (patch) | |
tree | 5a2cafc7452953a4d5c8a8e8eaa0ae34fe306f74 /arch/powerpc/kernel/kprobes.c | |
parent | c6fd91f0bdcd294a0ae0ba2b2a7f7456ef4b7144 (diff) | |
download | linux-stable-2326c77017c79fd6d55c69d8a49a57a252921bcd.tar.gz linux-stable-2326c77017c79fd6d55c69d8a49a57a252921bcd.tar.bz2 linux-stable-2326c77017c79fd6d55c69d8a49a57a252921bcd.zip |
[PATCH] kprobe handler: discard user space trap
Currently kprobe handler traps only happen in kernel space, so function
kprobe_exceptions_notify should skip traps which happen in user space.
This patch modifies this, and it is based on 2.6.16-rc4.
Signed-off-by: bibo mao <bibo.mao@intel.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
Cc: <hiramatu@sdl.hitachi.co.jp>
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index cb1fe5878e8b..aea25dd18dae 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -396,6 +396,9 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, struct die_args *args = (struct die_args *)data; int ret = NOTIFY_DONE; + if (args->regs && user_mode(args->regs)) + return ret; + switch (val) { case DIE_BPT: if (kprobe_handler(args->regs)) |