]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf inject/aslr: Add ASLR tool infrastructure and MMAP tracking
authorIan Rogers <irogers@google.com>
Thu, 11 Jun 2026 16:41:19 +0000 (09:41 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 15 Jun 2026 12:02:17 +0000 (09:02 -0300)
commitfebea9ec382f5616954c1e3578e70308f4762e59
tree66c59c9d294cc2c2342491b5e295d1d53e0dfdf2
parent75a4888b7029a1f98613aef91f517b2ee1f03d43
perf inject/aslr: Add ASLR tool infrastructure and MMAP tracking

If perf.data files are taken from one machine to another they may
leak virtual addresses and so weaken ASLR on the machine they are
coming from. Add an aslr option for perf inject that remaps all
virtual addresses, or drops data/events, so that the virtual address
information isn't leaked.

This patch introduces the core ASLR remapping tool infrastructure and
implements remapping/tracking for metadata events (MMAP, MMAP2, COMM,
FORK, EXIT, KSYMBOL, TEXT_POKE). Sample events are delegated without
remapping for now.

Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Co-developed-by: Gabriel Marin <gmx@google.com>
Signed-off-by: Gabriel Marin <gmx@google.com>
Tested-by: James Clark <james.clark@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-inject.c
tools/perf/util/Build
tools/perf/util/aslr.c [new file with mode: 0644]
tools/perf/util/aslr.h [new file with mode: 0644]