From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Timo Juhani Lindfors <timo.lindfors@iki.fi>,
yrl.pp-manager.tt@hitachi.com,
Steven Rostedt <rostedt@goodmis.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH -tip v2 2/2] [BUGFIX] kprobes/x86: Check Interrupt Flag modifier when registering probe
Date: Fri, 15 Mar 2013 10:10:41 +0530 [thread overview]
Message-ID: <20130315044041.GC31866@in.ibm.com> (raw)
In-Reply-To: <20130314115242.19690.33573.stgit@mhiramat-M0-7522>
On Thu, Mar 14, 2013 at 08:52:43PM +0900, Masami Hiramatsu wrote:
> Currently kprobes check whether the copied instruction modifies
> IF (interrupt flag) on each probe hit. This means not only
> introducing overhead but also involving inat_get_opcode_attribute
> into kprobes hot path, and it can cause an infinit recursive
> call (and kernel panic in the end).
>
> Actually, since the copied instruction itself never be modified
> on the buffer, it is needless to analyze the instruction every
> probe hit.
>
> To fix this issue, we checks it only once when registering probe
> and store the result on ainsn->if_modifier.
>
> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Reported-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
next prev parent reply other threads:[~2013-03-15 4:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 11:52 [PATCH -tip v2 1/2] [BUGFIX] kprobes: make hash_64() as always inlined Masami Hiramatsu
2013-03-14 11:52 ` [PATCH -tip v2 2/2] [BUGFIX] kprobes/x86: Check Interrupt Flag modifier when registering probe Masami Hiramatsu
2013-03-15 4:40 ` Ananth N Mavinakayanahalli [this message]
2013-03-18 11:11 ` [tip:perf/urgent] " tip-bot for Masami Hiramatsu
2013-03-15 4:40 ` [PATCH -tip v2 1/2] [BUGFIX] kprobes: make hash_64() as always inlined Ananth N Mavinakayanahalli
2013-03-18 11:10 ` [tip:perf/urgent] kprobes: Make " 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=20130315044041.GC31866@in.ibm.com \
--to=ananth@in.ibm.com \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=timo.lindfors@iki.fi \
--cc=torvalds@linux-foundation.org \
--cc=yrl.pp-manager.tt@hitachi.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.