* [Patch] Kprobes: bugfix of kprobe-booster: reenable kprobe-booster
@ 2006-05-19 20:13 Satoshi Oshima
0 siblings, 0 replies; only message in thread
From: Satoshi Oshima @ 2006-05-19 20:13 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, systemtap, Ananth N Mavinakayanahalli,
Jim Keniston, Prasanna S Panchamukhi, Keshavamurthy, Anil S,
Hideo AOKI@redhat, sugita, Masami Hiramatsu
Hi Andrew,
I found a bug of kprobes in i386.
Kprobe-booster doesn't work if CONFIG_PREEMPT is not set.
Because pre_preempt_count is always 0.
Boostability have been disabled when removing '#ifdef
CONFIG_PREEMPT' I think.
This bug doesn't cause a kernel panic.
Regards,
Satoshi Oshima
Signed-off-by: Satoshi Oshima <soshima@redhat.com>
diff -Narup linux-2.6.17-rc3-mm1.orig/arch/i386/kernel/kprobes.c kprobes-i386-bugfix/arch/i386/kernel/kprobes.c
--- linux-2.6.17-rc3-mm1.orig/arch/i386/kernel/kprobes.c 2006-05-04 12:34:46.000000000 -0400
+++ kprobes-i386-bugfix/arch/i386/kernel/kprobes.c 2006-05-12 15:41:23.000000000 -0400
@@ -257,7 +257,11 @@ static int __kprobes kprobe_handler(stru
int ret = 0;
kprobe_opcode_t *addr;
struct kprobe_ctlblk *kcb;
+#ifdef CONFIG_PREEMPT
unsigned pre_preempt_count = preempt_count();
+#else
+ unsigned pre_preempt_count = 1;
+#endif
addr = (kprobe_opcode_t *)(regs->eip - sizeof(kprobe_opcode_t));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-19 20:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-19 20:13 [Patch] Kprobes: bugfix of kprobe-booster: reenable kprobe-booster Satoshi Oshima
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 read-only IMAP folder(s) and NNTP newsgroup(s).