]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix split_kallsyms_for_kcore() for trampoline symbols
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 9 Jan 2019 09:18:30 +0000 (11:18 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2019 13:00:40 +0000 (10:00 -0300)
commite010afe9be6ec94e5a2ba86ed7825568b2d4d868
tree89d7332b28cca641bf5d64f4bf39e858bfa95dfe
parentd3cef64b6db6c5d4b054fc789222c0b96153fea2
perf tools: Fix split_kallsyms_for_kcore() for trampoline symbols

Kallsyms symbols do not have a size, so the size becomes the distance to
the next symbol.

Consequently the recently added trampoline symbols end up with large
sizes because the trampolines are some distance from one another and the
main kernel map.

However, symbols that end outside their map can disrupt the symbol tree
because, after mapping, it can appear incorrectly that they overlap
other symbols.

Add logic to truncate symbol size to the end of the corresponding map.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: stable@vger.kernel.org
Fixes: 2bb11af55efe ("kallsyms, x86: Export addresses of PTI entry trampolines")
Link: http://lkml.kernel.org/r/20190109091835.5570-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c