linux-stable/tools/perf
Ian Rogers ab8ce15078 perf machine: Avoid out of bounds LBR memory read
Running perf top with address sanitizer and "--call-graph=lbr" fails
due to reading sample 0 when no samples exist. Add a guard to prevent
this.

Fixes: e2b23483eb ("perf machine: Factor out lbr_callchain_add_lbr_ip()")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Sandipan Das <sandipan.das@amd.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: James Clark <james.clark@arm.com>
Cc: Nick Terrell <terrelln@fb.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Changbin Du <changbin.du@huawei.com>
Cc: liuwenyu <liuwenyu7@huawei.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Song Liu <song@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Yanteng Si <siyanteng@loongson.cn>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lore.kernel.org/r/20231024222353.3024098-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-25 13:36:20 -07:00
..
arch tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix 2023-10-17 12:40:51 -07:00
bench perf bench sched pipe: Add -G/--cgroups option 2023-10-25 10:02:10 -07:00
dlfilters perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
Documentation perf bench sched pipe: Add -G/--cgroups option 2023-10-25 10:02:10 -07:00
include/perf perf dlfilter: Add al_cleanup() 2023-08-15 16:41:49 -03:00
jvmti
pmu-events perf vendor events: Update PMC used in PM_RUN_INST_CMPL event for power10 platform 2023-10-19 23:35:20 -07:00
python
scripts perf scripts python gecko: Launch the profiler UI on the default browser with the appropriate URL 2023-08-24 14:41:49 -03:00
tests perf test: Skip CoreSight tests if cs_etm// event is not available 2023-10-25 10:02:01 -07:00
trace perf tools changes for v6.6: 2023-09-09 20:06:17 -07:00
ui perf hists browser: Avoid potential NULL dereference 2023-10-12 10:01:56 -07:00
util perf machine: Avoid out of bounds LBR memory read 2023-10-25 13:36:20 -07:00
.gitignore
Build
builtin-annotate.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-bench.c perf tools changes for v6.6: 2023-09-09 20:06:17 -07:00
builtin-buildid-cache.c perf buildid-cache: Fix use of uninitialized value 2023-10-12 10:01:56 -07:00
builtin-buildid-list.c
builtin-c2c.c perf callchain: Use pthread keys for tls callchain_cursor 2023-06-12 15:57:54 -03:00
builtin-config.c perf path: Make mkpath thread safe, remove 16384 bytes from .bss 2023-05-28 10:24:14 -03:00
builtin-daemon.c perf tools: Add missing else to cmd_daemon subcommand condition 2023-06-27 12:09:44 -07:00
builtin-data.c
builtin-diff.c perf diff: Replaces some ',' as separator with the more usual ';' 2023-07-20 11:43:45 -03:00
builtin-evlist.c
builtin-ftrace.c perf tools fixes for v6.4: 2nd batch 2023-05-31 15:31:56 -03:00
builtin-help.c perf path: Make mkpath thread safe, remove 16384 bytes from .bss 2023-05-28 10:24:14 -03:00
builtin-inject.c perf inject: Lazily allocate guest_event event_buf 2023-06-12 18:18:14 -03:00
builtin-kallsyms.c perf symbol: Remove now unused symbol_conf.sort_by_name 2023-06-23 21:48:49 -07:00
builtin-kmem.c perf callchain: Use pthread keys for tls callchain_cursor 2023-06-12 15:57:54 -03:00
builtin-kvm.c perf evsel: Introduce evsel__name_is() method to check if the evsel name is equal to a given string 2023-04-24 14:28:11 -03:00
builtin-kwork.c perf kwork: Fix spelling mistake "Captuer" -> "Capture" 2023-09-26 21:47:11 -07:00
builtin-list.c perf list: Don't print Unit for "default_core" 2023-08-31 16:24:47 -03:00
builtin-lock.c perf lock: Fix a memory leak on an error path 2023-10-12 10:01:57 -07:00
builtin-mem.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-probe.c perf probe: Dynamically allocate params memory 2023-05-28 10:24:02 -03:00
builtin-record.c perf record: Track sideband events for all CPUs when tracing selected CPUs 2023-09-12 17:31:43 -03:00
builtin-report.c perf report: Fix hierarchy mode on pipe input 2023-10-25 10:04:19 -07:00
builtin-sched.c perf sched: Avoid large stack allocations 2023-06-12 18:18:14 -03:00
builtin-script.c perf: script: fix missing ',' for fields option 2023-10-17 12:40:51 -07:00
builtin-stat.c perf stat: Fix aggr mode initialization 2023-09-11 10:26:35 -03:00
builtin-timechart.c perf addr_location: Add init/exit/copy functions 2023-06-12 15:57:53 -03:00
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-08-17 14:13:04 -03:00
builtin-trace.c perf trace: Use heuristic when deciding if a syscall tracepoint "const char *" field is really a string 2023-08-18 16:33:28 -03:00
builtin-version.c perf version: Add status of bpf skeletons 2023-09-18 16:46:15 -07:00
builtin.h
check-headers.sh perf tools: Add get_unaligned_leNN() 2023-10-17 12:40:02 -07:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Default BUILD_BPF_SKEL, warn/disable for missing deps 2023-09-18 16:46:26 -07:00
Makefile.perf perf build: Address stray '\' before # that is warned about since grep 3.8 2023-10-25 10:05:03 -07:00
MANIFEST
perf-archive.sh
perf-completion.sh perf shell completion: Support completion of metrics/metricgroups 2023-09-11 10:26:36 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf parse-events: Remove BPF event support 2023-08-15 16:41:48 -03:00
perf.h