linux/tools/perf
Ian Rogers 20c9ccffcc perf maps: Ensure kmap is set up for all inserts
__maps__fixup_overlap_and_insert may split or directly insert a map,
when doing this the map may need to have a kmap set up for the sake of
the kmaps. The missing kmap set up fails the check_invariants test in
maps, later "Internal error" reports from map__kmap and ultimately
causes segfaults.

Similar fixes were added in commit e0e4e0b8b7 ("perf maps: Add
missing map__set_kmap_maps() when replacing a kernel map") and commit
25d9c0301d ("perf maps: Set the kmaps for newly created/added kernel
maps") but they missed cases. To try to reduce the risk of this,
update the kmap directly following any manual insert. This identified
another problem in maps__copy_from.

Fixes: e0e4e0b8b7 ("perf maps: Add missing map__set_kmap_maps() when replacing a kernel map")
Fixes: 25d9c0301d ("perf maps: Set the kmaps for newly created/added kernel maps")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-09-15 10:03:23 -07:00
..
arch tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
bench perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
check-header_ignore_hunks/lib
dlfilters
Documentation perf record: Make --buildid-mmap the default 2025-07-25 10:37:56 -07:00
include/perf perf dso: Move build_id to dso_id 2025-07-25 10:37:56 -07:00
jvmti perf: Fix libjvmti.c sign compare error 2025-06-09 22:12:08 -07:00
pmu-events perf jevents: Add common software event json 2025-07-26 16:31:43 -07:00
python perf python: Add counting.py as example for counting perf events 2025-05-22 22:24:58 -03:00
scripts perf flamegraph: Fix minor pylint/type hint issues 2025-07-16 10:43:27 -07:00
tests perf test: Checking BPF metadata collection fails on version string 2025-09-04 16:37:19 -07:00
trace tools headers: Sync uapi/linux/vhost.h with the kernel source 2025-08-18 13:49:26 -07:00
ui perf evlist: Change env variable to session 2025-07-25 10:37:56 -07:00
util perf maps: Ensure kmap is set up for all inserts 2025-09-15 10:03:23 -07:00
.gitignore perf tools: Remove libtraceevent in .gitignore 2025-07-26 15:38:10 -07:00
Build perf build: Specify shellcheck should use bash 2025-06-30 09:43:06 -07:00
builtin-annotate.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-bench.c
builtin-buildid-cache.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
builtin-buildid-list.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
builtin-c2c.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-check.c tools: Remove libcrypto dependency 2025-06-26 10:51:41 -07:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-evlist.c
builtin-ftrace.c perf: ftrace: add graph tracer options args/retval/retval-hex/retaddr 2025-07-22 17:47:22 -07:00
builtin-help.c
builtin-inject.c perf symbol: Add blocking argument to filename__read_build_id 2025-08-25 15:07:18 -07:00
builtin-kallsyms.c perf machine: Explicitly pass in host perf_env 2025-07-25 10:37:57 -07:00
builtin-kmem.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-kvm.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-kwork.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-list.c perf list: Skip ABI PMUs when printing pmu values 2025-07-26 16:31:43 -07:00
builtin-lock.c perf lock: Provide a host_env for session new 2025-09-12 17:53:03 -07:00
builtin-mem.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-probe.c
builtin-record.c perf auxtrace: Pass perf_env from session through to mmap read 2025-07-25 10:37:58 -07:00
builtin-report.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-sched.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-script.c perf sample: Remove arch notion of sample parsing 2025-07-25 10:37:58 -07:00
builtin-stat.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-timechart.c perf session: Add accessor for session->header.env 2025-07-25 10:37:56 -07:00
builtin-top.c perf sort: Use perf_env to set arch sort keys and header 2025-07-25 10:37:58 -07:00
builtin-trace.c perf trace: Avoid global perf_env with evsel__env 2025-07-25 10:37:58 -07:00
builtin-version.c perf check: Share the feature status printing routine with 'perf version' 2025-04-10 10:44:04 -03:00
builtin.h perf check: Allow showing a tip for opt-in features not built into perf 2025-04-10 10:44:42 -03:00
check-headers.sh perf tools: Remove excess variable declarations 2025-06-24 11:06:02 -07:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config tools: Remove libcrypto dependency 2025-06-26 10:51:41 -07:00
Makefile.perf perf build: Always disable stack protection for BPF skeleton objects 2025-07-20 20:49:35 -07:00
MANIFEST perf tools: Fix arm64 source package build 2025-05-13 17:26:35 -03:00
perf-archive.sh tools/perf: Add --exclude-buildids option to perf archive command 2025-06-26 15:40:19 -07:00
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf env: Remove global perf_env 2025-07-25 10:37:58 -07:00
perf.h