]> git.baikalelectronics.ru Git - kernel.git/commit
perf symbols: Robustify reading of build-id from sysfs
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 3 Jan 2017 18:19:21 +0000 (15:19 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 3 Jan 2017 19:11:13 +0000 (16:11 -0300)
commit78c45d8caebc0d5aef35db9d897560d41caefe4c
treeec22e578f2c48c53d41b1e0413cf7b21c6f66749
parentefbaed294d5fbd1e9244fe74bc112172171ee763
perf symbols: Robustify reading of build-id from sysfs

Markus reported that perf segfaults when reading /sys/kernel/notes from
a kernel linked with GNU gold, due to what looks like a gold bug, so do
some bounds checking to avoid crashing in that case.

Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Link: http://lkml.kernel.org/r/20161219161821.GA294@x4
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ryhgs6a6jxvz207j2636w31c@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c