mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bill Wendling <morbo@google.com>
To: linux-kernel@vger.kernel.org
Cc: "Bill Wendling" <morbo@google.com>,
	"Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
	"Alexander Potapenko" <glider@google.com>,
	"Andrey Konovalov" <andreyknvl@gmail.com>,
	"Dmitry Vyukov" <dvyukov@google.com>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Mickaël Salaün" <mic@digikod.net>,
	"Günther Noack" <gnoack@google.com>,
	kasan-dev@googlegroups.com, linux-mm@kvack.org,
	linux-security-module@vger.kernel.org
Subject: [PATCH 1/7] kasan: Add .kunitconfig for KUnit tests
Date: Fri, 11 Sep 2026 07:03:39 +0000	[thread overview]
Message-ID: <20260911070346.801948-2-morbo@google.com> (raw)
In-Reply-To: <20260911070346.801948-1-morbo@google.com>

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


  reply	other threads:[~2026-09-11  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  7:03 [PATCH 0/7] kasan: Add KUnit config and fix missing instrumentation in load_unaligned_zeropad() Bill Wendling
2026-09-11  7:03 ` Bill Wendling [this message]
2026-09-11  7:03 ` [PATCH 2/7] x86/word-at-a-time: Instrument load_unaligned_zeropad() Bill Wendling
2026-09-11  7:03 ` [PATCH 3/7] arm64/word-at-a-time: " Bill Wendling
2026-09-11  7:03 ` [PATCH 4/7] arm/word-at-a-time: " Bill Wendling
2026-09-11  7:03 ` [PATCH 5/7] riscv/word-at-a-time: " Bill Wendling
2026-09-11  7:03 ` [PATCH 6/7] s390/word-at-a-time: " Bill Wendling
2026-09-11  7:03 ` [PATCH 7/7] powerpc/word-at-a-time: " Bill Wendling

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=20260911070346.801948-2-morbo@google.com \
    --to=morbo@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=gnoack@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.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®