linux/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 perf bench futex: Add lock_pi stresser 2015-07-20 17:49:51 -03:00
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 perf python: Make twatch.py use soft dummy event, freq=0 2015-07-29 10:51:45 -03:00
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 perf trace: Support 'strace' syscall event groups 2015-07-20 15:16:32 -03:00
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 perf trace: Support 'strace' syscall event groups 2015-07-20 15:16:32 -03:00
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 perf bench futex: Add lock_pi stresser 2015-07-20 17:49:51 -03:00
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 perf data: Support using -f to override perf.data file ownership for 'convert' 2015-04-02 13:18:52 -03:00
builtin-diff.c perf callchain: Allow disabling call graphs per event 2015-08-12 13:20:28 -03:00
builtin-evlist.c perf evlist: Support using -f to override perf.data file ownership 2015-04-02 13:18:45 -03:00
builtin-help.c perf tools: Add the bash completion for listing subsubcommands of perf help 2015-03-19 13:49:39 -03:00
builtin-inject.c perf tools: Add new PERF_RECORD_SWITCH event 2015-07-23 22:51:13 -03:00
builtin-kmem.c perf kmem: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-kvm.c perf kvm: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-list.c perf list: Extend raw-dump to certain kind of events 2015-02-27 15:52:24 -03:00
builtin-lock.c perf machine: Protect the machine->threads with a rwlock 2015-05-08 16:19:27 -03:00
builtin-mem.c perf mem: Fill in the missing session freeing after an error occurs 2015-07-01 17:53:49 -03:00
builtin-probe.c perf probe: Delete an unnecessary check before the function call "strfilter__delete" 2015-07-06 08:58:36 -03:00
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 perf sched: Add option to merge like comms to lat output 2015-05-27 12:21:45 -03:00
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 perf tools: Elliminate alignment holes 2015-05-18 10:17:33 -03:00
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 perf tools: Add new 'perf data' command 2015-02-25 12:42:25 -03:00
command-list.txt perf tools: Add new 'perf data' command 2015-02-25 12:42:25 -03:00
CREDITS
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
Makefile perf build: Fix single target build dependency check 2015-06-22 11:27:09 -03:00
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 tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
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