linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>, Andi Kleen <ak@linux.intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 1/2] tools lib symbol: Use strtoul instead of hex2u64 in kallsyms__parse
Date: Fri, 26 Jan 2018 19:27:06 +0200	[thread overview]
Message-ID: <CAHp75VdQqEOK+RGJ7HRm+2k8RBzzfJbZeB-zVa4jNgj_YJywcw@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vd7A8JdTR_oiKrG5VOabkMKNRiD4c560DRqRzZn=oDPGA@mail.gmail.com>

On Fri, Jan 26, 2018 at 7:22 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Jan 19, 2018 at 6:11 PM, Jiri Olsa <jolsa@kernel.org> wrote:
>> Current kallsyms__parse uses hex2u64, which gives
>> no indication of error. Using strtoul to checkup
>> on failed attempt to parse the number and stop the
>> rest of the kallsyms__parse processing early.
>
>> +               start = strtoul(line, &endptr, 16);
>> +               if (line == endptr)
>> +                       continue;
>> +
>> +               len = endptr - line + 1;
>>
>> -               len++;
>>                 if (len + 2 >= line_len)
>>                         continue;
>
> https://patchwork.kernel.org/patch/4087681/

Even second attempt including recent ping left without consideration.

http://lkml.iu.edu/hypermail/linux/kernel/1407.0/02791.html

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2018-01-26 17:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 16:11 [PATCH 0/2] perf report: Fix kallsyms parsing Jiri Olsa
2018-01-19 16:11 ` [PATCH 1/2] tools lib symbol: Use strtoul instead of hex2u64 in kallsyms__parse Jiri Olsa
2018-01-26  6:36   ` Namhyung Kim
2018-01-26 17:22   ` Andy Shevchenko
2018-01-26 17:27     ` Andy Shevchenko [this message]
2018-01-29  7:18       ` Jiri Olsa
2018-01-29 13:05         ` Andy Shevchenko
2018-01-19 16:11 ` [PATCH 2/2] perf tools: Skip read of kernel maps once it failed Jiri Olsa
2018-01-26  6:48   ` Namhyung Kim
2018-01-30 11:21     ` Jiri Olsa

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=CAHp75VdQqEOK+RGJ7HRm+2k8RBzzfJbZeB-zVa4jNgj_YJywcw@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /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).