From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, lkml<linux-kernel@vger.kernel.org>,
systemtap<systemtap@sources.redhat.com>,
DLE<dle-develop@lists.sourceforge.net>,
Dave Anderson <anderson@redhat.com>
Subject: Re: [PATCH -tip 2/2] [BUGFIX] kprobes/x86: Fix removed int3 checking order
Date: Wed, 28 Apr 2010 17:30:00 -0000 [thread overview]
Message-ID: <20100428030004.GA5541@in.ibm.com> (raw)
In-Reply-To: <20100427223348.2322.9112.stgit@localhost6.localdomain6>
On Tue, Apr 27, 2010 at 06:33:49PM -0400, Masami Hiramatsu wrote:
> Fix kprobe/x86 to check removed int3 when failing to get kprobe
> from hlist. Since we have a time window between checking int3
> exists on probed address and getting kprobe on that address,
> we can have following senario.
> -------
> CPU1 CPU2
> hit int3
> check int3 exists
> remove int3
> remove kprobe from hlist
> get kprobe from hlist
> no kprobe->OOPS!
> -------
Do you have a testcase for this issue?
> This patch moves int3 checking if there is no kprobe on that
> address for fixing this problem as follows;
> ------
> CPU1 CPU2
> hit int3
> remove int3
> remove kprobe from hlist
> get kprobe from hlist
> no kprobe->check int3 exists
> ->rollback&retry
> ------
You may also want to fix up the comment on top of kprobe_handler() about
the interrupt gate as its only true for x86_32 and not x86_64, right?
> Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Cc: Dave Anderson <anderson@redhat.com>
> Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
next prev parent reply other threads:[~2010-04-28 3:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 11:52 [PATCH -tip 1/2] [RESEND] kprobes: Move enable/disable_kprobe() out from debugfs code Masami Hiramatsu
2010-04-28 11:56 ` [PATCH -tip 2/2] [BUGFIX] kprobes/x86: Fix removed int3 checking order Masami Hiramatsu
2010-04-28 17:30 ` Ananth N Mavinakayanahalli [this message]
2010-04-28 17:54 ` Masami Hiramatsu
2010-04-30 19:45 ` Ananth N Mavinakayanahalli
2010-05-10 14:27 ` [tip:perf/urgent] " tip-bot for Masami Hiramatsu
2010-05-11 16:15 ` tip-bot for Masami Hiramatsu
2010-05-10 17:06 ` [PATCH -tip 1/2] [RESEND] kprobes: Move enable/disable_kprobe() out from debugfs code Masami Hiramatsu
2010-05-10 17:29 ` Ingo Molnar
2010-05-10 17:47 ` [tip:perf/core] " tip-bot for Masami Hiramatsu
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=20100428030004.GA5541@in.ibm.com \
--to=ananth@in.ibm.com \
--cc=anderson@redhat.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--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 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).