From: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
To: andreyknvl@gmail.com
Cc: akpm@linux-foundation.org, dvyukov@google.com, glider@google.com,
kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, ryabinin.a.a@gmail.com, snovitoll@gmail.com,
vincenzo.frascino@arm.com, elver@google.com, corbet@lwn.net,
alexs@kernel.org, siyanteng@loongson.cn,
2023002089@link.tyut.edu.cn, workflows@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: [PATCH v2 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST
Date: Sun, 13 Oct 2024 18:02:11 +0500 [thread overview]
Message-ID: <20241013130211.3067196-4-snovitoll@gmail.com> (raw)
In-Reply-To: <20241013130211.3067196-1-snovitoll@gmail.com>
Since we've migrated all tests to the KUnit framework,
we can delete CONFIG_KASAN_MODULE_TEST and mentioning of it in the
documentation as well.
I've used the online translator to modify the non-English documentation.
Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
---
Documentation/dev-tools/kasan.rst | 9 ++-------
Documentation/translations/zh_CN/dev-tools/kasan.rst | 6 +-----
Documentation/translations/zh_TW/dev-tools/kasan.rst | 6 +-----
lib/Kconfig.kasan | 7 -------
mm/kasan/kasan.h | 2 +-
mm/kasan/report.c | 2 +-
6 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
index d7de44f5339..52fdd6b5ef6 100644
--- a/Documentation/dev-tools/kasan.rst
+++ b/Documentation/dev-tools/kasan.rst
@@ -511,17 +511,12 @@ Tests
~~~~~
There are KASAN tests that allow verifying that KASAN works and can detect
-certain types of memory corruptions. The tests consist of two parts:
+certain types of memory corruptions.
-1. Tests that are integrated with the KUnit Test Framework. Enabled with
+Tests that are integrated with the KUnit Test Framework. Enabled with
``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified
automatically in a few different ways; see the instructions below.
-2. Tests that are currently incompatible with KUnit. Enabled with
-``CONFIG_KASAN_MODULE_TEST`` and can only be run as a module. These tests can
-only be verified manually by loading the kernel module and inspecting the
-kernel log for KASAN reports.
-
Each KUnit-compatible KASAN test prints one of multiple KASAN reports if an
error is detected. Then the test prints its number and status.
diff --git a/Documentation/translations/zh_CN/dev-tools/kasan.rst b/Documentation/translations/zh_CN/dev-tools/kasan.rst
index 4491ad2830e..f968d262be1 100644
--- a/Documentation/translations/zh_CN/dev-tools/kasan.rst
+++ b/Documentation/translations/zh_CN/dev-tools/kasan.rst
@@ -422,14 +422,10 @@ KASAN连接到vmap基础架构以懒清理未使用的影子内存。
~~~~
有一些KASAN测试可以验证KASAN是否正常工作并可以检测某些类型的内存损坏。
-测试由两部分组成:
-1. 与KUnit测试框架集成的测试。使用 ``CONFIG_KASAN_KUNIT_TEST`` 启用。
+与KUnit测试框架集成的测试。使用 ``CONFIG_KASAN_KUNIT_TEST`` 启用。
这些测试可以通过几种不同的方式自动运行和部分验证;请参阅下面的说明。
-2. 与KUnit不兼容的测试。使用 ``CONFIG_KASAN_MODULE_TEST`` 启用并且只能作为模块
-运行。这些测试只能通过加载内核模块并检查内核日志以获取KASAN报告来手动验证。
-
如果检测到错误,每个KUnit兼容的KASAN测试都会打印多个KASAN报告之一,然后测试打印
其编号和状态。
diff --git a/Documentation/translations/zh_TW/dev-tools/kasan.rst b/Documentation/translations/zh_TW/dev-tools/kasan.rst
index ed342e67d8e..19457860486 100644
--- a/Documentation/translations/zh_TW/dev-tools/kasan.rst
+++ b/Documentation/translations/zh_TW/dev-tools/kasan.rst
@@ -404,14 +404,10 @@ KASAN連接到vmap基礎架構以懶清理未使用的影子內存。
~~~~
有一些KASAN測試可以驗證KASAN是否正常工作並可以檢測某些類型的內存損壞。
-測試由兩部分組成:
-1. 與KUnit測試框架集成的測試。使用 ``CONFIG_KASAN_KUNIT_TEST`` 啓用。
+與KUnit測試框架集成的測試。使用 ``CONFIG_KASAN_KUNIT_TEST`` 啓用。
這些測試可以通過幾種不同的方式自動運行和部分驗證;請參閱下面的說明。
-2. 與KUnit不兼容的測試。使用 ``CONFIG_KASAN_MODULE_TEST`` 啓用並且只能作爲模塊
-運行。這些測試只能通過加載內核模塊並檢查內核日誌以獲取KASAN報告來手動驗證。
-
如果檢測到錯誤,每個KUnit兼容的KASAN測試都會打印多個KASAN報告之一,然後測試打印
其編號和狀態。
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 98016e137b7..f82889a830f 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -195,13 +195,6 @@ config KASAN_KUNIT_TEST
For more information on KUnit and unit tests in general, please refer
to the KUnit documentation in Documentation/dev-tools/kunit/.
-config KASAN_MODULE_TEST
- tristate "KUnit-incompatible tests of KASAN bug detection capabilities"
- depends on m && KASAN && !KASAN_HW_TAGS
- help
- A part of the KASAN test suite that is not integrated with KUnit.
- Incompatible with Hardware Tag-Based KASAN.
-
config KASAN_EXTRA_INFO
bool "Record and report more information"
depends on KASAN
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h
index f438a6cdc96..b7e4b81421b 100644
--- a/mm/kasan/kasan.h
+++ b/mm/kasan/kasan.h
@@ -568,7 +568,7 @@ static inline void kasan_kunit_test_suite_end(void) { }
#endif /* CONFIG_KASAN_KUNIT_TEST */
-#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_TEST)
+#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST)
bool kasan_save_enable_multi_shot(void);
void kasan_restore_multi_shot(bool enabled);
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index b48c768acc8..3e48668c3e4 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -132,7 +132,7 @@ static bool report_enabled(void)
return !test_and_set_bit(KASAN_BIT_REPORTED, &kasan_flags);
}
-#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_TEST)
+#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST)
bool kasan_save_enable_multi_shot(void)
{
--
2.34.1
next prev parent reply other threads:[~2024-10-13 13:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 7:16 [PATCH] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-11 9:13 ` Sabyrzhan Tasbolatov
2024-10-12 22:49 ` Andrey Konovalov
2024-10-13 6:33 ` Sabyrzhan Tasbolatov
2024-10-12 22:46 ` Andrey Konovalov
2024-10-13 13:02 ` [PATCH v2 0/3] kasan: migrate the last module test " Sabyrzhan Tasbolatov
2024-10-13 13:02 ` [PATCH v2 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-13 16:04 ` Andrey Konovalov
2024-10-13 13:02 ` [PATCH v2 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-13 16:02 ` Andrey Konovalov
2024-10-13 18:20 ` [PATCH v3 " Sabyrzhan Tasbolatov
2024-10-13 20:25 ` Andrey Konovalov
2024-10-14 2:56 ` [PATCH RESEND v3 0/3] kasan: migrate the last module test " Sabyrzhan Tasbolatov
2024-10-14 2:56 ` [PATCH RESEND v3 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-14 2:57 ` [PATCH RESEND v3 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-14 23:10 ` Andrew Morton
2024-10-15 1:18 ` Andrey Konovalov
2024-10-15 10:53 ` Sabyrzhan Tasbolatov
2024-10-15 23:16 ` Andrey Konovalov
2024-10-16 13:17 ` [PATCH v4 0/3] kasan: migrate the last module test " Sabyrzhan Tasbolatov
2024-10-16 13:18 ` [PATCH v4 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-16 13:18 ` [PATCH v4 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-16 13:18 ` [PATCH v4 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST Sabyrzhan Tasbolatov
2024-10-14 2:57 ` [PATCH RESEND v3 " Sabyrzhan Tasbolatov
2024-10-13 13:02 ` Sabyrzhan Tasbolatov [this message]
2024-10-13 16:03 ` [PATCH v2 " Andrey Konovalov
2024-10-13 18:21 ` [PATCH v3 " Sabyrzhan Tasbolatov
2024-10-13 20:25 ` Andrey Konovalov
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=20241013130211.3067196-4-snovitoll@gmail.com \
--to=snovitoll@gmail.com \
--cc=2023002089@link.tyut.edu.cn \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=andreyknvl@gmail.com \
--cc=corbet@lwn.net \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ryabinin.a.a@gmail.com \
--cc=siyanteng@loongson.cn \
--cc=vincenzo.frascino@arm.com \
--cc=workflows@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).