mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
kasan: delete CONFIG_KASAN_MODULE_TEST
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@gmail.com: fix indentation in translation] Link: https://lkml.kernel.org/r/20241020042813.3223449-1-snovitoll@gmail.com Link: https://lkml.kernel.org/r/20241016131802.3115788-4-snovitoll@gmail.com Signed-off-by: Sabyrzhan Tasbolatov <snovitoll@gmail.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Cc: Alexander Potapenko <glider@google.com> Cc: Alex Shi <alexs@kernel.org> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Marco Elver <elver@google.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Yanteng Si <siyanteng@loongson.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
ca79a00bb9
commit
4e4d9c72c9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user