kernel-hacking-2024-linux-s.../tools/perf
Adrian Hunter b5cabbcbd1 perf tools: Fix copying of /proc/kcore
A copy of /proc/kcore containing the kernel text can be made to the
buildid cache. e.g.

	perf buildid-cache -v -k /proc/kcore

To workaround objdump limitations, a copy is also made when annotating
against /proc/kcore.

The copying process stops working from libelf about v1.62 onwards (the
problem was found with v1.63).

The cause is that a call to gelf_getphdr() in kcore__add_phdr() fails
because additional validation has been added to gelf_getphdr().

The use of gelf_getphdr() is a misguided attempt to get default
initialization of the Gelf_Phdr structure.  That should not be
necessary because every member of the Gelf_Phdr structure is
subsequently assigned.  So just remove the call to gelf_getphdr().

Similarly, a call to gelf_getehdr() in gelf_kcore__init() can be
removed also.

Committer notes:

Note to stable@kernel.org, from Adrian in the cover letter for this
patchkit:

The "Fix copying of /proc/kcore" problem goes back to v3.13 if you think
it is important enough for stable.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/1443089122-19082-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-09-25 10:45:50 -03:00
..
arch perf tools: Fix link time error with sample_reg_masks on non x86 2015-09-01 13:04:41 -03:00
bench
config tools build: Add test for presence of __get_cpuid() gcc builtin 2015-09-17 13:14:35 -03:00
Documentation perf intel-pt: Remove no_force_psb from documentation 2015-09-25 10:42:38 -03:00
python
scripts perf scripts python: Add new compaction-times script 2015-08-28 14:53:40 -03:00
tests perf tests: Fix software clock events test setting maps 2015-09-15 11:04:49 -03:00
trace/strace/groups
ui perf top: Fix segfault pressing -> with no hist entries 2015-09-14 15:10:41 -03:00
util perf tools: Fix copying of /proc/kcore 2015-09-25 10:45:50 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build
builtin-annotate.c perf annotate: Reset the dso find_symbol cache when removing symbols 2015-08-24 13:33:14 -03:00
builtin-bench.c
builtin-buildid-cache.c perf buildid: Introduce sysfs/filename__sprintf_build_id 2015-08-28 14:53:50 -03:00
builtin-buildid-list.c perf buildid: Introduce sysfs/filename__sprintf_build_id 2015-08-28 14:53:50 -03:00
builtin-data.c
builtin-diff.c perf callchain: Allow disabling call graphs per event 2015-08-12 13:20:28 -03:00
builtin-evlist.c
builtin-help.c
builtin-inject.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Add ability to name registers to record 2015-08-31 18:01:33 -03:00
builtin-report.c perf report: Show call graph from reference events 2015-08-12 13:20:28 -03:00
builtin-sched.c
builtin-script.c perf tools: Fix use of wrong event when processing exit events 2015-09-02 17:46:26 -03:00
builtin-stat.c Merge branch 'perf/urgent' into perf/core, to pick up fixes 2015-08-31 10:25:26 +02:00
builtin-timechart.c
builtin-top.c Merge branch 'perf/urgent' into perf/core, to pick up fixes before adding more changes 2015-08-20 11:48:56 +02:00
builtin-trace.c perf trace: Add header with copyright and background info 2015-08-28 14:53:48 -03:00
builtin.h
command-list.txt
CREDITS
design.txt
Makefile
Makefile.perf perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
MANIFEST perf tools: Remove export.h from MANIFEST 2015-08-26 10:34:57 -03:00
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf tools: Do not change lib/api/fs/debugfs directly 2015-08-28 14:53:53 -03:00
perf.h perf record: Add ability to name registers to record 2015-08-31 18:01:33 -03:00