From: Matt Fleming <matt@codeblueprint.co.uk>
To: Wang Nan <wangnan0@huawei.com>
Cc: acme@kernel.org, linux-kernel@vger.kernel.org,
lizefan@huawei.com, pi3orama@huawei.com,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
"David S. Miller" <davem@davemloft.net>,
Jiri Olsa <jolsa@kernel.org>
Subject: Re: [PATCH] perf tools: Fix potential array out of bounce accessing
Date: Tue, 1 Sep 2015 09:44:07 +0100 [thread overview]
Message-ID: <20150901084312.GA2823@codeblueprint.co.uk> (raw)
In-Reply-To: <1441078184-105038-1-git-send-email-wangnan0@huawei.com>
On Tue, 01 Sep, at 03:29:44AM, Wang Nan wrote:
> There is a problem in dwarf-regs.c of sh, sparc and x86 that it is
> possible to make an out-of-bound array accessing when searching
> register names. This patch fixes it by replacing '<=' to '<', so when
> register (number == XXX_MAX_REGS), get_arch_regstr() returns NULL.
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Matt Fleming <matt@console-pimps.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/perf/arch/sh/util/dwarf-regs.c | 2 +-
> tools/perf/arch/sparc/util/dwarf-regs.c | 2 +-
> tools/perf/arch/x86/util/dwarf-regs.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
Hmm, I wonder how that bug was introduced. I guess copy and paste is
probably to blame. Good catch.
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
--
Matt Fleming, Intel Open Source Technology Center
next prev parent reply other threads:[~2015-09-01 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 3:29 [PATCH] perf tools: Fix potential array out of bounce accessing Wang Nan
2015-09-01 8:44 ` Matt Fleming [this message]
2015-09-01 10:00 ` Jiri Olsa
2015-09-01 11:14 ` 平松雅巳 / HIRAMATU,MASAMI
2015-09-02 7:27 ` [tip:perf/urgent] perf dwarf: Fix potential array out of bounds access 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=20150901084312.GA2823@codeblueprint.co.uk \
--to=matt@codeblueprint.co.uk \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=pi3orama@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.