Kprobes: bugfix of kprobe-booster: reenable kprobe-booster
PATCH 1/1 Kprobes: bugfix of kprobe-booster: reenable kprobe-booster
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 <[email protected]>
arch/i386/kernel/kprobes.c +4 -0
@@ -257,7 +257,11 @@ static int __kprobes kprobe_handler(struint 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));