From: Kunwu Chan <kunwu.chan@gmail.com>
To: dave@stgolabs.net, paulmck@kernel.org, josh@joshtriplett.org,
frederic@kernel.org, neeraj.upadhyay@kernel.org,
joelagnelf@nvidia.com, boqun@kernel.org, urezki@gmail.com
Cc: rostedt@goodmis.org, mathieu.desnoyers@efficios.com,
jiangshanlai@gmail.com, qiang.zhang@linux.dev,
linux-kernel@vger.kernel.org, rcu@vger.kernel.org,
Kunwu Chan <kunwu.chan@gmail.com>,
Kunwu Chan <chentao@kylinos.cn>
Subject: [PATCH v2 7/7] rcutorture: Run KASAN aux-stack checks from torture.sh
Date: Wed, 18 Nov 2026 16:51:47 +0800 [thread overview]
Message-ID: <20261118085147.1668598-8-kunwu.chan@gmail.com> (raw)
In-Reply-To: <20261118085147.1668598-1-kunwu.chan@gmail.com>
Invoke kasan-aux.sh when torture.sh has both RCU-torture and KASAN
testing enabled, reusing the existing --do-kasan switch, the
torture_one bookkeeping, and the --configs-rcutorture scenario
selection, so the added kernel builds scale with that selection.
--no-kasan disables both ordinary KASAN and aux-stack testing.
Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Suggested-by: Joel Fernandes <joelagnelf@nvidia.com>
Cc: Kunwu Chan <kunwu.chan@gmail.com>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
Documentation/RCU/torture.rst | 14 ++++++++++++++
tools/testing/selftests/rcutorture/bin/torture.sh | 9 +++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/RCU/torture.rst b/Documentation/RCU/torture.rst
index 15a430f5111f4..8c8dcf6449bf0 100644
--- a/Documentation/RCU/torture.rst
+++ b/Documentation/RCU/torture.rst
@@ -244,6 +244,20 @@ As with the intentional warnings tested by ``srcu_lockdep.sh``, ordinary
diagnostic; use the dedicated check to distinguish the expected report
from failures.
+``torture.sh`` includes these dedicated runs when both RCU torture and
+KASAN testing are enabled, as they are by default, using the scenarios
+selected by ``--configs-rcutorture`` and 30-second run durations.
+``--no-kasan`` disables both ordinary KASAN and auxiliary-stack testing.
+For example::
+
+ tools/testing/selftests/rcutorture/bin/torture.sh \
+ --do-none --do-rcutorture --do-kasan \
+ --configs-rcutorture TREE03 --duration 2
+
+This runs ordinary KASAN torture with TREE03, followed by the dedicated
+auxiliary-stack verification of TREE03. To run only the auxiliary
+checks, invoke ``kasan-aux.sh`` directly.
+
Kernel boot arguments can also be supplied, for example, to control
rcutorture's module parameters. For example, to test a change to RCU's
CPU stall-warning code, use "--bootargs 'rcutorture.stall_cpu=30'".
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 90b5e113a0b03..e04ed2c27f533 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -515,6 +515,15 @@ if test "$do_rcutorture" = "yes"
then
torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000"
torture_set "rcutorture" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration "$duration_rcutorture" --configs "$configs_rcutorture" --trust-make
+
+ # Check intentional reports separately from the ordinary KASAN bug hunts.
+ # kasan-aux.sh supplies its own boot arguments and rejects --bootargs.
+ if test "$do_kasan" = "yes"
+ then
+ torture_bootargs=""
+ curflavor=rcu-aux-kasan
+ torture_one tools/testing/selftests/rcutorture/bin/kasan-aux.sh --configs "$configs_rcutorture"
+ fi
fi
# Test atomic SRCU across Tree SRCU (SRCU-N and SRCU-P) and Tiny SRCU
--
2.43.0
prev parent reply other threads:[~2026-11-18 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:51 [PATCH v2 0/7] rcu: Record callback enqueue stacks and add torture tests Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 1/7] rcu-tasks: Record callback enqueue stack Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 2/7] rcutorture: Require debug_objects flag for debug-objects test Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 3/7] rcutorture: Test duplicate call_rcu_tasks() callback enqueue Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 4/7] rcutorture: Test duplicate call_rcu_tasks_trace() " Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 5/7] rcutorture: Add KASAN aux-stack self-test Kunwu Chan
2026-11-18 8:51 ` [PATCH v2 6/7] rcutorture: Add kasan-aux.sh aux-stack checker Kunwu Chan
2026-11-18 8:51 ` Kunwu Chan [this message]
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=20261118085147.1668598-8-kunwu.chan@gmail.com \
--to=kunwu.chan@gmail.com \
--cc=boqun@kernel.org \
--cc=chentao@kylinos.cn \
--cc=dave@stgolabs.net \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang@linux.dev \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=urezki@gmail.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
all inboxes | Powered by JetHome®