mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Steven Rostedt \(Red Hat\)" <rostedt@goodmis.org>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	"David A. Long" <dave.long@linaro.org>,
	yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH -tip ] [BUGFIX/URGENT] perf-probe: Do not add offset to uprobe address
Date: Thu, 06 Feb 2014 16:48:02 +0900	[thread overview]
Message-ID: <871tzg1y31.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140205051858.6519.27314.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp> (Masami Hiramatsu's message of "Wed, 05 Feb 2014 05:18:58 +0000")

Hi Masami,

On Wed, 05 Feb 2014 05:18:58 +0000, Masami Hiramatsu wrote:
> Fix perf-probe not to add offset value to uprobe probe
> address when post processing.
> tevs[i].point.address is the address of symbol+offset,
> but current perf-probe adjusts the point.address by
> adding the offset. As a result, the probe address becomes
> symbol+offset+offset. This may cause unexpected
> code corruption. Urgent fix is needed.
>
> Without this fix
>   ---
>   # ./perf probe -x ./perf dso__load_vmlinux+4
>   # ./perf probe -l
>     probe_perf:dso__load_vmlinux (on 0x000000000006d2b8)
>   # nm ./perf.orig | grep dso__load_vmlinux\$
>   000000000046d0a0 T dso__load_vmlinux

Shouldn't the original symbol address be

    000000000046d2b0

?

>   ---
> You can see the given offset is 3 but the actual probed

s/3/4/ ?

Thanks,
Namhyung


> address is dso__load_vmlinux+8.
>
> With this fix
>   ---
>   # ./perf probe -x ./perf dso__load_vmlinux+4
>   # ./perf probe -l
>     probe_perf:dso__load_vmlinux (on 0x000000000006d2b4)
>   ---
> Now the problem is fixed.

  reply	other threads:[~2014-02-06  7:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05  5:18 Masami Hiramatsu
2014-02-06  7:48 ` Namhyung Kim [this message]
2014-02-06  9:50   ` Masami Hiramatsu
2014-02-22 17:54 ` [tip:perf/core] perf probe: Do not add offset twice " 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=871tzg1y31.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=dave.long@linaro.org \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome