linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "acme@kernel.org" <acme@kernel.org>
To: "平松雅巳 / HIRAMATU,MASAMI" <masami.hiramatsu.pt@hitachi.com>
Cc: "'Wang Nan'" <wangnan0@huawei.com>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	"lizefan@huawei.com" <lizefan@huawei.com>,
	"pi3orama@163.com" <pi3orama@163.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jolsa@kernel.org" <jolsa@kernel.org>
Subject: Re: [PATCH 2/2] perf tools: Fix find_perf_probe_point_from_map() which incorrectly returns success
Date: Thu, 5 Nov 2015 13:00:00 -0300	[thread overview]
Message-ID: <20151105160000.GX13236@kernel.org> (raw)
In-Reply-To: <50399556C9727B4D88A595C8584AAB3752604844@GSjpTKYDCembx32.service.hitachi.net>

Em Thu, Nov 05, 2015 at 02:08:48PM +0000, 平松雅巳 / HIRAMATU,MASAMI escreveu:
> From: Wang Nan [mailto:wangnan0@huawei.com]
> >
> >It is possible that find_perf_probe_point_from_map() fails to find
> >symbol but still returns 0 because of an small error when coding:
> >find_perf_probe_point_from_map() set 'ret' to error code at first,
> >but also use it to hold return value of
> >kernel_get_symbol_address_by_name().
> 
> OK, I didn't expect that there is a symbol which can be found by 
> kernel_get_symbol_address_by_name() but not by __find_kernel_function()...

> Would you have any example of the error?
> 
> >
> >This patch resets 'ret' to error even kernel_get_symbol_address_by_name()
> >success, so if !sym, the whole function returns error correctly.
> 
> Hmm, that sounds tricky. I'd rather like to add *psym to kernel_get_symbol_address_by_name() 
> to save symbol and don't use __find_kernel_function() instead.

Tricky? I don't think so, suboptimal? possibly, but it fixes an error,
so should be processed quickly, right? I'm applying his patch and then
whatever improvement can be done on top.

- Arnaldo

  reply	other threads:[~2015-11-05 16:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 13:19 [PATCH 0/2] perf tools: Two bugfixs related to perf probe Wang Nan
2015-11-05 13:19 ` [PATCH 1/2] perf probe: Only call probe_file__get_events() when fd is valid Wang Nan
2015-11-05 14:23   ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-05 14:57   ` Arnaldo Carvalho de Melo
2015-11-05 15:07     ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-05 15:58       ` 'Arnaldo Carvalho de Melo'
2015-11-06  9:50         ` [PATCH v2] perf probe: Verify parameters for two functions Wang Nan
2015-11-06 10:03           ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-11  7:00           ` Wangnan (F)
2015-11-12  6:43           ` [tip:perf/urgent] perf probe: Verify parameters in " tip-bot for Wang Nan
2015-11-05 13:19 ` [PATCH 2/2] perf tools: Fix find_perf_probe_point_from_map() which incorrectly returns success Wang Nan
2015-11-05 14:08   ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-05 16:00     ` acme [this message]
2015-11-06  6:28       ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-06  7:12         ` 平松雅巳 / HIRAMATU,MASAMI
2015-11-06  8:30           ` Wangnan (F)
2015-11-06  9:27             ` Wangnan (F)
2015-11-06 13:43               ` Arnaldo Carvalho de Melo
2015-11-08  7:31   ` [tip:perf/urgent] perf tools: Fix find_perf_probe_point_from_map( ) " tip-bot for Wang Nan

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=20151105160000.GX13236@kernel.org \
    --to=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=namhyung@kernel.org \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.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 NNTP newsgroup(s).