From: Jiri Olsa <jolsa@redhat.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Uwe Kleine-Koenig <ukl@pengutronix.de>
Subject: Re: [PATCH] perf: symbols: dso__load(): remove check of file on uninitialized memory
Date: Thu, 21 Jul 2016 09:54:58 +0200 [thread overview]
Message-ID: <20160721075458.GB7651@krava> (raw)
In-Reply-To: <2064e6de-8535-d06a-4f0d-010377a42f5a@pengutronix.de>
On Thu, Jul 21, 2016 at 09:21:00AM +0200, Marc Kleine-Budde wrote:
SNIP
> >>>>> This patch fixes the problem by removing the check.
> >>>>>
> >>>>> Fixes: 403567217d3f perf symbols: Do not read symbols/data from device files
> >>>>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> >>>>> ---
> >>>>> tools/perf/util/symbol.c | 3 +--
> >>>>> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>>>>
> >>>>> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> >>>>> index 8a747dc6cf86..b4070daeb17f 100644
> >>>>> --- a/tools/perf/util/symbol.c
> >>>>> +++ b/tools/perf/util/symbol.c
> >>>>> @@ -1432,8 +1432,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
> >>>>> * Read the build id if possible. This is required for
> >>>>> * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work
> >>>>> */
> >>>>> - if (is_regular_file(name) &&
> >>>>> - filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0)
> >>>>> + if (filename__read_build_id(dso->long_name, build_id, BUILD_ID_SIZE) > 0)
> >>>>> dso__set_build_id(dso, build_id);
> >>>>
> >>>> ouch copy&paste error.. we better fix it properly,
> >>>> could you please check attached patch?
> >>>
> >>> The use of uninitialized memory is gone, but the "--symfs" option is
> >>> ignored:
> >>>
> >>>> stat("/lib/libpthread-2.20.so", 0x7ffe440c1270) = -1 ENOENT (No such file or directory)
> >>>
> >>> You'll look for the dso in the root file system not in the sysroot.
> >>
> >> that seems like unrelated to the 'use of uninitialized memory' issue, right?
> >> I can't see how the patch I sent could do that..
> >
> > Right. That's a different issue. You can add my:
> >
> > Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
>
> I don't see this patch on mainline nor on linux-next, or am I missing
> something?
sorry for delay, forgot about this one...
I asked Arnaldo to take this version instead:
http://marc.info/?l=linux-kernel&m=146908497508581&w=2
thanks,
jirka
prev parent reply other threads:[~2016-07-21 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 14:20 [PATCH] perf: symbols: dso__load(): remove check of file on uninitialized memory Marc Kleine-Budde
2016-06-24 6:43 ` Jiri Olsa
2016-06-24 7:54 ` Marc Kleine-Budde
2016-06-24 11:51 ` Jiri Olsa
2016-06-24 11:56 ` Marc Kleine-Budde
2016-07-21 7:21 ` Marc Kleine-Budde
2016-07-21 7:54 ` Jiri Olsa [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=20160721075458.GB7651@krava \
--to=jolsa@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mkl@pengutronix.de \
--cc=peterz@infradead.org \
--cc=ukl@pengutronix.de \
/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