From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 3/6] configs: build the User Mode Linux KUnit kernel with KASAN
Date: Mon, 26 Oct 2026 23:34:21 +0100 [thread overview]
Message-ID: <20261026-b4-prep-khorenko-vstor-143636-uml-config-v2-3-76c8329592af@virtuozzo.com> (raw)
In-Reply-To: <20261026-b4-prep-khorenko-vstor-143636-uml-config-v2-0-76c8329592af@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. SLUB_RCU_DEBUG lets it see a use after free in a
SLAB_TYPESAFE_BY_RCU cache as well; the generic layer has it off, as it
is of no use without KASAN.
The KASAN self-test stays out. It makes bad accesses on purpose and
expects their reports on the console, where the hci-kunit test 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 +
redhat/configs/custom-overrides/generic/um/CONFIG_SLUB_RCU_DEBUG | 1 +
7 files changed, 7 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
diff --git a/redhat/configs/custom-overrides/generic/um/CONFIG_SLUB_RCU_DEBUG b/redhat/configs/custom-overrides/generic/um/CONFIG_SLUB_RCU_DEBUG
new file mode 100644
index 0000000000000..6cdbbe398fc2e
--- /dev/null
+++ b/redhat/configs/custom-overrides/generic/um/CONFIG_SLUB_RCU_DEBUG
@@ -0,0 +1 @@
+CONFIG_SLUB_RCU_DEBUG=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 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 22:34 [Devel] [PATCH hci-8.1 v2 0/6] configs: a User Mode Linux kernel for the KUnit tests Konstantin Khorenko
2026-10-26 22:34 ` [Devel] [PATCH hci-8.1 v2 1/6] configs: add a User Mode Linux config " Konstantin Khorenko
2026-10-26 22:34 ` [Devel] [PATCH hci-8.1 v2 2/6] kasan: let a config leave the KUnit test out under KUNIT_ALL_TESTS Konstantin Khorenko
2026-10-26 22:34 ` Konstantin Khorenko [this message]
2026-10-26 22:34 ` [Devel] [PATCH hci-8.1 v2 4/6] configs: build the User Mode Linux KUnit kernel without debug info Konstantin Khorenko
2026-10-26 22:34 ` [Devel] [PATCH hci-8.1 v2 5/6] configs: turn off module-only subsystems in the User Mode Linux config Konstantin Khorenko
2026-10-26 22:34 ` [Devel] [PATCH hci-8.1 v2 6/6] configs: check the User Mode Linux KUnit config at build time Konstantin Khorenko
[not found] ` <0429d3d2-4664-4afa-a088-993344b6140f@virtuozzo.com>
2026-10-27 10:42 ` [Devel] [PATCH hci-8.1 v2 0/6] configs: a User Mode Linux kernel for the KUnit tests Konstantin Khorenko
2026-10-27 10: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-v2-3-76c8329592af@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