The quilt patch titled Subject: kasan: delete CONFIG_KASAN_MODULE_TEST has been removed from the -mm tree. Its filename was kasan-delete-config_kasan_module_test.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Sabyrzhan Tasbolatov <snovitoll@xxxxxxxxx> Subject: kasan: delete CONFIG_KASAN_MODULE_TEST Date: Wed, 16 Oct 2024 18:18:02 +0500 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. [snovitoll@xxxxxxxxx: fix indentation in translation] Link: https://lkml.kernel.org/r/20241020042813.3223449-1-snovitoll@xxxxxxxxx Link: https://lkml.kernel.org/r/20241016131802.3115788-4-snovitoll@xxxxxxxxx Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@xxxxxxxxx> Reviewed-by: Andrey Konovalov <andreyknvl@xxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Alex Shi <alexs@xxxxxxxxxx> Cc: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: Hu Haowen <2023002089@xxxxxxxxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Cc: Vincenzo Frascino <vincenzo.frascino@xxxxxxx> Cc: Yanteng Si <siyanteng@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/dev-tools/kasan.rst | 23 +++------- Documentation/translations/zh_CN/dev-tools/kasan.rst | 20 +++----- Documentation/translations/zh_TW/dev-tools/kasan.rst | 21 +++------ lib/Kconfig.kasan | 7 --- mm/kasan/kasan.h | 2 mm/kasan/report.c | 2 6 files changed, 28 insertions(+), 47 deletions(-) --- a/Documentation/dev-tools/kasan.rst~kasan-delete-config_kasan_module_test +++ a/Documentation/dev-tools/kasan.rst @@ -511,19 +511,14 @@ 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 -``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified +All KASAN tests are integrated with the KUnit Test Framework and can be enabled +via ``CONFIG_KASAN_KUNIT_TEST``. The 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. +Each KASAN test prints one of multiple KASAN reports if an error is detected. +Then the test prints its number and status. When a test passes:: @@ -550,16 +545,16 @@ Or, if one of the tests failed:: not ok 1 - kasan -There are a few ways to run KUnit-compatible KASAN tests. +There are a few ways to run the KASAN tests. 1. Loadable module - With ``CONFIG_KUNIT`` enabled, KASAN-KUnit tests can be built as a loadable - module and run by loading ``kasan_test.ko`` with ``insmod`` or ``modprobe``. + With ``CONFIG_KUNIT`` enabled, the tests can be built as a loadable module + and run by loading ``kasan_test.ko`` with ``insmod`` or ``modprobe``. 2. Built-In - With ``CONFIG_KUNIT`` built-in, KASAN-KUnit tests can be built-in as well. + With ``CONFIG_KUNIT`` built-in, the tests can be built-in as well. In this case, the tests will run at boot as a late-init call. 3. Using kunit_tool --- a/Documentation/translations/zh_CN/dev-tools/kasan.rst~kasan-delete-config_kasan_module_test +++ a/Documentation/translations/zh_CN/dev-tools/kasan.rst @@ -422,16 +422,12 @@ æµ?è¯? ~~~~ æ??ä¸?äº?KASANæµ?è¯?å?¯ä»¥éª?è¯?KASANæ?¯å?¦æ£å¸¸å·¥ä½?并å?¯ä»¥æ£?æµ?æ??äº?ç±»å??ç??å??å?æ??å??ã?? -æµ?è¯?ç?±ä¸¤é?¨å??ç»?æ??: -1. ä¸?KUnitæµ?è¯?æ¡?æ?¶é??æ??ç??æµ?è¯?ã??使ç?¨ ``CONFIG_KASAN_KUNIT_TEST`` å?¯ç?¨ã?? -è¿?äº?æµ?è¯?å?¯ä»¥é??è¿?å? ç§?ä¸?å??ç??æ?¹å¼?è?ªå?¨è¿?è¡?å??é?¨å??éª?è¯?ï¼?请å??é??ä¸?é?¢ç??说æ??ã?? +æ??æ?? KASAN æµ?è¯?é?½ä¸? KUnit æµ?è¯?æ¡?æ?¶é??æ??ï¼?å?¯é??è¿? ``CONFIG_KASAN_KUNIT_TEST`` å?¯ç?¨ã?? +æµ?è¯?å?¯ä»¥é??è¿?å? ç§?ä¸?å??ç??æ?¹å¼?è?ªå?¨è¿?è¡?å??é?¨å??éª?è¯?ï¼?请å??é??以ä¸?说æ??ã?? -2. ä¸?KUnitä¸?å?¼å®¹ç??æµ?è¯?ã??使ç?¨ ``CONFIG_KASAN_MODULE_TEST`` å?¯ç?¨å¹¶ä¸?å?ªè?½ä½?为模å?? -è¿?è¡?ã??è¿?äº?æµ?è¯?å?ªè?½é??è¿?å? è½½å??æ ¸æ¨¡å??并æ£?æ?¥å??æ ¸æ?¥å¿?以è?·å??KASANæ?¥å??æ?¥æ??å?¨éª?è¯?ã?? - -å¦?æ??æ£?æµ?å?°é??误ï¼?æ¯?个KUnitå?¼å®¹ç??KASANæµ?è¯?é?½ä¼?æ??å?°å¤?个KASANæ?¥å??ä¹?ä¸?ï¼?ç?¶å??æµ?è¯?æ??å?° -å?¶ç¼?å?·å??ç?¶æ??ã?? +å¦?æ??æ£?æµ?å?°é??误ï¼?æ¯?个 KASAN æµ?è¯?é?½ä¼?æ??å?°å¤?份 KASAN æ?¥å??ä¸ç??ä¸?份ã?? +ç?¶å??æµ?è¯?ä¼?æ??å?°å?¶ç¼?å?·å??ç?¶æ??ã?? å½?æµ?è¯?é??è¿?:: @@ -458,16 +454,16 @@ æ??è??ï¼?å¦?æ??å?¶ä¸ä¸?项æµ?è¯?失败: not ok 1 - kasan -æ??å? ç§?æ?¹æ³?å?¯ä»¥è¿?è¡?ä¸?KUnitå?¼å®¹ç??KASANæµ?è¯?ã?? +æ??å? ç§?æ?¹æ³?å?¯ä»¥è¿?è¡? KASAN æµ?è¯?ã?? 1. å?¯å? 载模å?? - å?¯ç?¨ ``CONFIG_KUNIT`` å??ï¼?KASAN-KUnitæµ?è¯?å?¯ä»¥æ??建为å?¯å? 载模å??ï¼?并é??è¿?使ç?¨ - ``insmod`` æ?? ``modprobe`` å? è½½ ``kasan_test.ko`` æ?¥è¿?è¡?ã?? + å?¯ç?¨ ``CONFIG_KUNIT`` å??ï¼?å?¯ä»¥å°?æµ?è¯?æ??建为å?¯å? 载模å?? + 并é??è¿?使ç?¨ ``insmod`` æ?? ``modprobe`` å? è½½ ``kasan_test.ko`` æ?¥è¿?è¡?ã?? 2. å??ç½® - é??è¿?å??ç½® ``CONFIG_KUNIT`` ï¼?ä¹?å?¯ä»¥å??ç½®KASAN-KUnitæµ?è¯?ã??å?¨è¿?ç§?æ??å?µä¸?ï¼? + é??è¿?å??ç½® ``CONFIG_KUNIT``ï¼?æµ?è¯?ä¹?å?¯ä»¥å??ç½®ã?? æµ?è¯?å°?å?¨å?¯å?¨æ?¶ä½?为å??æ??å??å§?å??è°?ç?¨è¿?è¡?ã?? 3. 使ç?¨kunit_tool --- a/Documentation/translations/zh_TW/dev-tools/kasan.rst~kasan-delete-config_kasan_module_test +++ a/Documentation/translations/zh_TW/dev-tools/kasan.rst @@ -404,16 +404,13 @@ 測試 ~~~~ æ??ä¸?äº?KASAN測試å?¯ä»¥é©?è?KASANæ?¯å?¦æ£å¸¸å·¥ä½?並å?¯ä»¥æª¢æ¸¬æ??äº?é¡?å??ç??å?§å?æ??å£?ã?? -測試ç?±å?©é?¨å??çµ?æ??: -1. è??KUnit測試æ¡?æ?¶é??æ??ç??測試ã??使ç?¨ ``CONFIG_KASAN_KUNIT_TEST`` å??ç?¨ã?? -é??äº?測試å?¯ä»¥é??é??幾種ä¸?å??ç??æ?¹å¼?è?ªå??é??è¡?å??é?¨å??é©?è?ï¼?è«?å??é?±ä¸?é?¢ç??說æ??ã?? +æ??æ?? KASAN 測試å??è?? KUnit 測試æ¡?æ?¶é??æ??ï¼?並ä¸?å?¯ä»¥å??ç?¨ +é??é?? ``CONFIG_KASAN_KUNIT_TEST``ã??å?¯ä»¥é??è¡?測試並é?²è¡?é?¨å??é©?è? +以幾種ä¸?å??ç??æ?¹å¼?è?ªå??é?²è¡?ï¼?è«?å??é?±ä¸?é?¢ç??說æ??ã?? -2. è??KUnitä¸?å?¼å®¹ç??測試ã??使ç?¨ ``CONFIG_KASAN_MODULE_TEST`` å??ç?¨ä¸¦ä¸?å?ªè?½ä½?ç?²æ¨¡å¡? -é??è¡?ã??é??äº?測試å?ªè?½é??é??å? è¼?å?§æ ¸æ¨¡å¡?並檢æ?¥å?§æ ¸æ?¥èª?以ç?²å??KASANå ±å??ä¾?æ??å??é©?è?ã?? - -å¦?æ??檢測å?°é?¯èª¤ï¼?æ¯?å??KUnitå?¼å®¹ç??KASAN測試é?½æ??æ??å?°å¤?å??KASANå ±å??ä¹?ä¸?ï¼?ç?¶å¾?測試æ??å?° -å?¶ç·¨è??å??ç??æ??ã?? +å¦?æ??å?µæ¸¬å?°é?¯èª¤ï¼?æ¯?å?? KASAN 測試é?½æ??å??å?°å¤?å?? KASAN å ±å??ä¹?ä¸?ã?? +ç?¶å¾?測試å??å?°å?¶ç·¨è??å??ç??æ??ã?? ç?¶æ¸¬è©¦é??é??:: @@ -440,16 +437,16 @@ æ??è??ï¼?å¦?æ??å?¶ä¸ä¸?é ?測試失æ??: not ok 1 - kasan -æ??幾種æ?¹æ³?å?¯ä»¥é??è¡?è??KUnitå?¼å®¹ç??KASAN測試ã?? +æ??幾種æ?¹æ³?å?¯ä»¥å?·è¡? KASAN 測試ã?? 1. å?¯å? è¼?模å¡? - å??ç?¨ ``CONFIG_KUNIT`` å¾?ï¼?KASAN-KUnit測試å?¯ä»¥æ§?建ç?²å?¯å? è¼?模å¡?ï¼?並é??é??使ç?¨ - ``insmod`` æ?? ``modprobe`` å? è¼? ``kasan_test.ko`` ä¾?é??è¡?ã?? + å??ç?¨ ``CONFIG_KUNIT`` å¾?ï¼?測試å?¯ä»¥å»ºç½®ç?ºå?¯è¼?å?¥æ¨¡çµ? + 並ä¸?é??é??使ç?¨ ``insmod`` æ?? ``modprobe`` ä¾?è¼?å?¥ ``kasan_test.ko`` ä¾?é??ä½?ã?? 2. å?§ç½® - é??é??å?§ç½® ``CONFIG_KUNIT`` ï¼?ä¹?å?¯ä»¥å?§ç½®KASAN-KUnit測試ã??å?¨é??種æ??æ³?ä¸?ï¼? + é??é??å?§å»º ``CONFIG_KUNIT``ï¼?測試ä¹?å?¯ä»¥å?§å»ºã?? 測試å°?å?¨å??å??æ??ä½?ç?²å¾?æ??å??å§?å??調ç?¨é??è¡?ã?? 3. 使ç?¨kunit_tool --- a/lib/Kconfig.kasan~kasan-delete-config_kasan_module_test +++ a/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 --- a/mm/kasan/kasan.h~kasan-delete-config_kasan_module_test +++ a/mm/kasan/kasan.h @@ -568,7 +568,7 @@ static inline void kasan_kunit_test_suit #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); --- a/mm/kasan/report.c~kasan-delete-config_kasan_module_test +++ a/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) { _ Patches currently in -mm which might be from snovitoll@xxxxxxxxx are