* [PATCH 1/7] kasan: Add .kunitconfig for KUnit tests
[not found] <20260911070346.801948-1-morbo@google.com>
@ 2026-09-11 7:03 ` Bill Wendling
0 siblings, 0 replies; only message in thread
From: Bill Wendling @ 2026-09-11 7:03 UTC (permalink / raw)
To: linux-kernel
Cc: Bill Wendling, Andrey Ryabinin, Alexander Potapenko,
Andrey Konovalov, Dmitry Vyukov, Vincenzo Frascino, Andrew Morton,
Mickaël Salaün, Günther Noack, kasan-dev, linux-mm,
linux-security-module
Add a .kunitconfig file for the KASAN test suite so that it can easily
be run via kunit.py:
./tools/testing/kunit/kunit.py run --arch=x86_64 --kunitconfig mm/kasan
CONFIG_KASAN_KUNIT_TEST depends on TRACEPOINTS, which is an invisible
Kconfig symbol without a prompt. CONFIG_FTRACE alone only unlocks the
tracer submenu and does not select TRACEPOINTS by itself, so also
enable CONFIG_SCHED_TRACER=y, which selects GENERIC_TRACER -> TRACING
-> TRACEPOINTS. This follows the same pattern used by
security/landlock/.kunitconfig. Verified with:
make KCONFIG_ALLCONFIG=mm/kasan/.kunitconfig allnoconfig
that CONFIG_TRACEPOINTS=y and CONFIG_KASAN_KUNIT_TEST=y both resolve.
In addition, set CONFIG_LOG_BUF_SHIFT=20 to prevent printk buffer
overflows on serial consoles when running under QEMU, as KASAN generates
extensive reports across its test cases.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Bill Wendling <morbo@google.com>
---
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Mickaël Salaün" <mic@digikod.net>
Cc: "Günther Noack" <gnoack@google.com>
Cc: linux-kernel@vger.kernel.org
Cc: kasan-dev@googlegroups.com
Cc: linux-mm@kvack.org
Cc: linux-security-module@vger.kernel.org
---
mm/kasan/.kunitconfig | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 mm/kasan/.kunitconfig
diff --git a/mm/kasan/.kunitconfig b/mm/kasan/.kunitconfig
new file mode 100644
index 000000000000..58a7448fa352
--- /dev/null
+++ b/mm/kasan/.kunitconfig
@@ -0,0 +1,15 @@
+CONFIG_KUNIT=y
+CONFIG_KASAN=y
+CONFIG_KASAN_KUNIT_TEST=y
+
+# Additional dependencies.
+# CONFIG_KASAN_KUNIT_TEST depends on TRACEPOINTS, an invisible Kconfig
+# symbol with no prompt. CONFIG_FTRACE alone only unlocks the tracer
+# submenu; CONFIG_SCHED_TRACER is needed to actually select
+# GENERIC_TRACER -> TRACING -> TRACEPOINTS.
+CONFIG_FTRACE=y
+CONFIG_SCHED_TRACER=y
+
+# Prevent printk buffer overflows on serial consoles when running under
+# QEMU, since KASAN generates extensive reports across its test cases.
+CONFIG_LOG_BUF_SHIFT=20
--
2.47.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 7:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260911070346.801948-1-morbo@google.com>
2026-09-11 7:03 ` [PATCH 1/7] kasan: Add .kunitconfig for KUnit tests Bill Wendling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox