mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 17:50:54 +07:00
perf probe: Adjust map->reloc offset when finding kernel symbol from map
Adjust map->reloc offset for the unmapped address when finding
alternative symbol address from map, because KASLR can relocate the
kernel symbol address.
The same adjustment has been done when finding appropriate kernel symbol
address from map which was introduced by commit f90acac757
("perf
probe: Find given address from offline dwarf")
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20160806192948.e366f3fbc4b194de600f8326@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
887fa86d6f
commit
8e34189b34
@ -385,7 +385,7 @@ static int find_alternative_probe_point(struct debuginfo *dinfo,
|
||||
if (uprobes)
|
||||
address = sym->start;
|
||||
else
|
||||
address = map->unmap_ip(map, sym->start);
|
||||
address = map->unmap_ip(map, sym->start) - map->reloc;
|
||||
break;
|
||||
}
|
||||
if (!address) {
|
||||
|
Loading…
Reference in New Issue
Block a user