From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 3/4] configs: build the User Mode Linux KUnit kernel with KASAN
Date: Mon, 26 Oct 2026 19:05:45 +0100 [thread overview]
Message-ID: <20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-3-b7e76e985a6b@virtuozzo.com> (raw)
In-Reply-To: <20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-0-b7e76e985a6b@virtuozzo.com>
Generic KASAN catches out-of-bounds and use-after-free accesses that a
test itself does not notice. Instrumentation is inline and covers
vmalloc too.
The KASAN self-test stays out. It makes bad accesses on purpose and
expects their reports on the console, where hci-kunit counts any report
as a failure of the run. What it checks is KASAN itself, not our code.
SLUB_DEBUG_ON stays off: KASAN catches what its redzones and poisoning
would, and at the moment of the access.
https://virtuozzo.atlassian.net/browse/VSTOR-143636
https://virtuozzo.atlassian.net/browse/VSTOR-148112
Feature: KUnit tests on User Mode Linux
Co-developed-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN | 1 +
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_GENERIC | 1 +
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_INLINE | 1 +
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_KUNIT_TEST | 1 +
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_OUTLINE | 1 +
redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_VMALLOC | 1 +
6 files changed, 6 insertions(+)
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN
new file mode 100644
index 0000000000000..4d920992d7c88
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN
@@ -0,0 +1 @@
+CONFIG_KASAN=y
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_GENERIC b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_GENERIC
new file mode 100644
index 0000000000000..1c58d0d4a67d6
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_GENERIC
@@ -0,0 +1 @@
+CONFIG_KASAN_GENERIC=y
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_INLINE b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_INLINE
new file mode 100644
index 0000000000000..80f3231193560
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_INLINE
@@ -0,0 +1 @@
+CONFIG_KASAN_INLINE=y
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_KUNIT_TEST b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_KUNIT_TEST
new file mode 100644
index 0000000000000..c3842ac36b18c
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_KUNIT_TEST
@@ -0,0 +1 @@
+# CONFIG_KASAN_KUNIT_TEST is not set
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_OUTLINE b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_OUTLINE
new file mode 100644
index 0000000000000..9b97879cd3adc
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_OUTLINE
@@ -0,0 +1 @@
+# CONFIG_KASAN_OUTLINE is not set
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_VMALLOC b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_VMALLOC
new file mode 100644
index 0000000000000..290120758d0b0
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_KASAN_VMALLOC
@@ -0,0 +1 @@
+CONFIG_KASAN_VMALLOC=y
--
2.43.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-26 18:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 18:05 [Devel] [PATCH hci-8.1 0/4] configs: a User Mode Linux kernel for the KUnit tests Konstantin Khorenko
2026-10-26 18:05 ` [Devel] [PATCH hci-8.1 1/4] configs: add a User Mode Linux config " Konstantin Khorenko
2026-10-26 18:05 ` [Devel] [PATCH hci-8.1 2/4] kasan: let a config leave the KUnit test out under KUNIT_ALL_TESTS Konstantin Khorenko
2026-10-26 18:05 ` Konstantin Khorenko [this message]
2026-10-26 18:05 ` [Devel] [PATCH hci-8.1 4/4] configs: build the User Mode Linux KUnit kernel without debug info Konstantin Khorenko
2026-10-26 18:52 ` [Devel] [PATCH hci-8.1 0/4] configs: a User Mode Linux kernel for the KUnit tests Eva Kurchatova (Virtuozzo)
2026-10-26 21:52 ` Konstantin Khorenko
2026-10-26 22:27 ` Eva Kurchatova (Virtuozzo)
2026-10-26 22:42 ` Konstantin Khorenko
2026-10-26 21:16 ` Eva Kurchatova (Virtuozzo)
2026-10-26 21:51 ` Konstantin Khorenko
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=20261026-b4-prep-khorenko-vstor-143636-uml-config-v1-3-b7e76e985a6b@virtuozzo.com \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--cc=eva.kurchatova@virtuozzo.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