B Bill Wendling #
Message details and related content
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: <redacted> Cc: <redacted> Cc: <redacted> Cc: <redacted> --- 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