linux_dsm_epyc7002/tools/perf/arch/x86/util
Wang Nan 3b27d13940 perf dwarf: Fix potential array out of bounds access
There is a problem in the dwarf-regs.c files for sh, sparc and x86 where
it is possible to make an out-of-bounds array access when searching for
register names.

This patch fixes it by replacing '<=' to '<', so when register (number
== XXX_MAX_REGS), get_arch_regstr() will return NULL.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@huawei.com
Link: http://lkml.kernel.org/r/1441078184-105038-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-01 11:33:48 -03:00
..
auxtrace.c perf tools: Add Intel BTS support 2015-08-21 11:34:10 -03:00
Build perf/x86: Add list of register names 2015-08-31 17:56:37 -03:00
dwarf-regs.c perf dwarf: Fix potential array out of bounds access 2015-09-01 11:33:48 -03:00
header.c perf tools: Use scnprintf where applicable 2012-03-14 12:36:19 -03:00
intel-bts.c perf tools: Add Intel BTS support 2015-08-21 11:34:10 -03:00
intel-pt.c perf tools: Add Intel PT support for using CYC packets 2015-08-24 17:49:43 -03:00
kvm-stat.c perf kvm: Add skip_event() for --duration option 2014-07-16 17:57:32 -03:00
perf_regs.c perf/x86: Add list of register names 2015-08-31 17:56:37 -03:00
pmu.c perf tools: Add Intel BTS support 2015-08-21 11:34:10 -03:00
tsc.c perf tools: Move rdtsc() function 2014-07-23 11:48:11 -03:00
tsc.h perf tools: Allow TSC conversion on any arch 2014-07-17 12:59:00 -03:00
unwind-libdw.c perf tools: Add libdw DWARF post unwind support 2014-02-24 09:29:36 -03:00
unwind-libunwind.c perf tools: Move pr_* debug macros into debug object 2014-07-17 12:58:39 -03:00