All of lore.kernel.org
 help / color / mirror / Atom feed
From: Satoshi Oshima <soshima@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, systemtap@sources.redhat.com,
	Ananth N Mavinakayanahalli <mananth@in.ibm.com>,
	Jim Keniston <jkenisto@us.ibm.com>,
	Prasanna S Panchamukhi <prasanna@in.ibm.com>,
	"Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
	"Hideo AOKI@redhat" <haoki@redhat.com>,
	sugita <sugita@sdl.hitachi.co.jp>,
	Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>
Subject: [Patch] Kprobes: bugfix of kprobe-booster: reenable kprobe-booster
Date: Fri, 19 May 2006 16:13:02 -0400	[thread overview]
Message-ID: <446E26CE.6050409@redhat.com> (raw)

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));
 


                 reply	other threads:[~2006-05-19 20:13 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=446E26CE.6050409@redhat.com \
    --to=soshima@redhat.com \
    --cc=akpm@osdl.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=haoki@redhat.com \
    --cc=hiramatu@sdl.hitachi.co.jp \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mananth@in.ibm.com \
    --cc=prasanna@in.ibm.com \
    --cc=sugita@sdl.hitachi.co.jp \
    --cc=systemtap@sources.redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.