public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Ingo Molnar <mingo@elte.hu>, lkml <linux-kernel@vger.kernel.org>,
	systemtap <systemtap@sources.redhat.com>,
	DLE <dle-develop@lists.sourceforge.net>,
	Dieter Ries <mail@dieterries.net>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: Re: [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes
Date: Sat, 13 Mar 2010 21:05:30 -0500	[thread overview]
Message-ID: <4B9C446A.9020208@redhat.com> (raw)
In-Reply-To: <87k4tfyd08.fsf@devron.myhome.or.jp>

OGAWA Hirofumi wrote:
> Masami Hiramatsu <mhiramat@redhat.com> writes:
> 
>> Hide CONFIG_OPTPROBES and set if arch support optimized kprobes, since
>> this option doesn't change the behavior of kprobes, but just reduces
>> the overhead.
> 
> I don't so care whether this is configurable or not, but this confuses
> me now. The following seems to say it's changed, but now this comment
> says it wasn't changed. The following docs was obsoleted?
> 
> Thanks.
> 
> NOTE for geeks:
> The jump optimization changes the kprobe's pre_handler behavior.
> Without optimization, the pre_handler can change the kernel's execution
> path by changing regs->ip and returning 1.  However, when the probe
> is optimized, that modification is ignored.  Thus, if you want to
> tweak the kernel's execution path, you need to suppress optimization,
> using one of the following techniques:

Ah, good point. This is only one point of changing the behavior.
So if someone makes an out of tree module for changing the ip
address by using kprobes, e.g. live code patching or something
like that, it will be affected by this change.
However, I think using kprobes for this way is not obviously
documented, moreover, some workarounds for that are documented
as above. So I don't worried about it.

Anyway, indeed, the patch comment is wrong. I need to say "this option
doesn't change the major behavior of kprobes, and workarounds for minor
change are documented." :)

Thank you for pointing it out!


-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

      reply	other threads:[~2010-03-14  2:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 23:22 [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes Masami Hiramatsu
2010-03-12 23:22 ` [PATCH -tip 2/3] [BUGFIX] perf probe: Fix probe_point buffer overrun Masami Hiramatsu
2010-03-13 12:26   ` [tip:perf/urgent] " tip-bot for Masami Hiramatsu
2010-03-12 23:22 ` [PATCH -tip 3/3] [BUGFIX] perf probe: Set need_dwarf if lazy matching is used Masami Hiramatsu
2010-03-13 12:26   ` [tip:perf/urgent] perf probe: Fix need_dwarf flag " tip-bot for Masami Hiramatsu
2010-03-13  7:27 ` [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes Ingo Molnar
2010-03-15 17:00   ` [PATCH -tip v3] " Masami Hiramatsu
2010-03-16 14:47     ` [tip:perf/core] kprobes: Hide CONFIG_OPTPROBES and set if arch supports " tip-bot for Masami Hiramatsu
2010-03-14  0:15 ` [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support " OGAWA Hirofumi
2010-03-14  2:05   ` Masami Hiramatsu [this message]

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=4B9C446A.9020208@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=ananth@in.ibm.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@dieterries.net \
    --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