From: Thomas Richter <tmricht@linux.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
linux-perf-users@vger.kernel.org, acme@kernel.org,
namhyung@kernel.org, irogers@google.com
Cc: agordeev@linux.ibm.com, gor@linux.ibm.com,
sumanthk@linux.ibm.com, hca@linux.ibm.com, japo@linux.ibm.com,
Thomas Richter <tmricht@linux.ibm.com>
Subject: [PATCH linux-next] perf test: Skip failing 'perf test aslr' test case
Date: Fri, 19 Jun 2026 11:35:31 +0200 [thread overview]
Message-ID: <20260619093531.4038655-1-tmricht@linux.ibm.com> (raw)
The test case 'perf test aslr' fails on s390. The root cause of the
failure is subtest test_callchain_aslr. This test invokes command
# ./perf record -g -e task-clock:u -o /tmp/perf-test-aslr \
-- perf test -w noploop 3
to generate a call stack using event task-clock:u. On s390 this defaults
to '--call-graph dwarf' whereas on x86_64 this defaults to framepointer
(fp) format. The command
# ./perf inject --aslr -i /tmp/perf-test-aslr
now scans all SAMPLE entries recorded in the perf.data file to convert
possible addresses. This is done in aslr_tool__process_sample() looking
at sample_type bits PERF_SAMPLE_IP, PERF_SAMPLE_TID,
PERF_SAMPLE_TIME, PERF_SAMPLE_PERIOD, PERF_SAMPLE_CALLCHAIN,
PERF_SAMPLE_REGS_USER and PERF_SAMPLE_STACK_USER.
On s390 the samples do not contain FP entries
of type PERF_SAMPLE_CALLCHAIN (the bit is set in sample_type, but the
number of FP entries is 0).
The processing enters the PERF_SAMPLE_STACK_USER portion where the
data is copied to the newly constructed sample and then aborted with
this warning:
/* TODO: can this be less conservative? */
pr_debug("Dropping stack user sample as possible ASLR leak\n");
With command line option '--call-graph dwarf' the new output file
does not contain any samples at all. This leads to a missing $new_addr
value in the shell script and a failure.
Fix this and skip this subtest. Emit a hint that this subtest is
currently unsupported on all platform when option --call-graph dwarf
is selected.
Since one subtest is skipped, the complete test is reported as
skipped.
Fixes: 60bc9fbc0589 ("perf test: Add inject ASLR test")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Ian Rogers <irogers@google.com>
---
tools/perf/tests/shell/inject_aslr.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/perf/tests/shell/inject_aslr.sh b/tools/perf/tests/shell/inject_aslr.sh
index c00461828ea7..7fdb43679dc8 100755
--- a/tools/perf/tests/shell/inject_aslr.sh
+++ b/tools/perf/tests/shell/inject_aslr.sh
@@ -135,8 +135,15 @@ test_callchain_aslr() {
echo "Callchain ASLR test [Failed - no noploop samples in original file]"
err=1
elif [ -z "$new_addr" ]; then
- echo "Callchain ASLR test [Failed - could not find remapped address]"
- err=1
+ if perf evlist -v -i "${data}" | grep -q 'sample_type:.*STACK_USER'; then
+ echo "Dropping stack user sample as possible ASLR leak"
+ echo "Call-graph dwarf not supported with 'perf inject --aslr'"
+ echo "Callchain ASLR test [Skip]"
+ err=2
+ else
+ echo "Callchain ASLR test [Failed - could not find remapped address]"
+ err=1
+ fi
elif [ "$orig_addr" = "$new_addr" ]; then
echo "Callchain ASLR test [Failed - addresses are not remapped]"
err=1
--
2.54.0
next reply other threads:[~2026-06-19 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 9:35 Thomas Richter [this message]
2026-06-19 9:42 ` [PATCH linux-next] perf test: Skip failing 'perf test aslr' test case sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260619093531.4038655-1-tmricht@linux.ibm.com \
--to=tmricht@linux.ibm.com \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=irogers@google.com \
--cc=japo@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sumanthk@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox