linux/tools/perf
Adrian Hunter e101a05f79 perf intel-pt: Fix unassigned instruction op (discovered by MemorySanitizer)
MemorySanitizer discovered instances where the instruction op value was
not assigned.:

  WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5581c00a76b3 in intel_pt_sample_flags tools/perf/util/intel-pt.c:1527:17
  Uninitialized value was stored to memory at
    #0 0x5581c005ddf8 in intel_pt_walk_insn tools/perf/util/intel-pt-decoder/intel-pt-decoder.c:1256:25

The op value is used to set branch flags for branch instructions
encountered when walking the code, so fix by setting op to
INTEL_PT_OP_OTHER in other cases.

Fixes: 4c761d805b ("perf intel-pt: Fix intel_pt_fup_event() assumptions about setting state type")
Reported-by: Ian Rogers <irogers@google.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Closes: https://lore.kernel.org/linux-perf-users/20240320162619.1272015-1-irogers@google.com/
Link: https://lore.kernel.org/r/20240326083223.10883-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-04-26 22:13:10 -03:00
..
arch perf arch x86: Add shellcheck to build 2024-04-12 17:54:02 -03:00
bench perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
dlfilters
Documentation perf docs: Document bpf event modifier 2024-04-18 22:22:51 -03:00
include/perf
jvmti
pmu-events Merge remote-tracking branch 'torvalds/master' into perf-tools-next 2024-04-22 13:35:18 -03:00
python
scripts perf scripts python: Add a script to run instances of 'perf script' in parallel 2024-04-26 22:07:19 -03:00
tests perf test: Add a new test for 'perf annotate' 2024-04-26 22:07:21 -03:00
trace tools include UAPI: Sync linux/vhost.h with the kernel sources 2024-04-22 17:44:57 -03:00
ui Merge remote-tracking branch 'torvalds/master' into perf-tools-next 2024-04-22 13:35:18 -03:00
util perf intel-pt: Fix unassigned instruction op (discovered by MemorySanitizer) 2024-04-26 22:13:10 -03:00
.gitignore
Build perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
builtin-annotate.c perf annotate-data: Add hist_entry__annotate_data_tui() 2024-04-12 12:02:06 -03:00
builtin-bench.c perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf cpumap: Clean up use of perf_cpu_map__has_any_cpu_or_is_empty 2024-03-21 10:41:28 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf dsos: Introduce dsos__for_each_dso() 2024-04-12 12:04:13 -03:00
builtin-kallsyms.c
builtin-kmem.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-kvm.c
builtin-kwork.c
builtin-list.c perf list: Escape '\r' in JSON output 2024-04-12 17:54:02 -03:00
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Fix comment misspellings 2024-04-26 22:13:10 -03:00
builtin-report.c perf report: Do not collect sample histogram unnecessarily 2024-04-12 12:02:06 -03:00
builtin-sched.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-script.c perf script: Consolidate capstone print functions 2024-04-08 17:42:27 -03:00
builtin-stat.c perf stat: Add new field in stat_config to enable hardware aware grouping 2024-04-18 22:22:51 -03:00
builtin-timechart.c
builtin-top.c
builtin-trace.c perf evsel: Use evsel__name_is() helper 2024-04-03 11:48:56 -03:00
builtin-version.c perf version: Display availability of OpenCSD support 2024-03-03 22:48:40 -08:00
builtin.h perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
check-headers.sh Revert "tools headers: Remove almost unused copy of uapi/stat.h, add few conditional defines" 2024-04-18 22:22:52 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Add LIBTRACEEVENT_DIR build option 2024-04-03 18:05:19 -03:00
Makefile.perf perf beauty: Move uapi/linux/vhost.h copy out of the directory used to build perf 2024-03-21 20:44:35 -03:00
MANIFEST
perf-archive.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-completion.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tools: Suggest inbuilt commands for unknown command 2024-03-21 13:54:40 -03:00
perf.h