From: Marco Elver <elver@google.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Potapenko <glider@google.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Dmitry Vyukov <dvyukov@google.com>,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 11/11] kasan: docs: update tests section
Date: Fri, 12 Mar 2021 16:11:01 +0100 [thread overview]
Message-ID: <YEuEhc1JBq5dTpxp@elver.google.com> (raw)
In-Reply-To: <fb08845e25c8847ffda271fa19cda2621c04a65b.1615559068.git.andreyknvl@google.com>
On Fri, Mar 12, 2021 at 03:24PM +0100, Andrey Konovalov wrote:
> Update the "Tests" section in KASAN documentation:
>
> - Add an introductory sentence.
> - Add proper indentation for the list of ways to run KUnit tests.
> - Punctuation, readability, and other minor clean-ups.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
> ---
>
> Changes v1->v2:
> - Fix missing snippet delimeter around "test_kasan.ko".
> - Drop "the" before "test_kasan.ko".
> ---
> Documentation/dev-tools/kasan.rst | 32 +++++++++++++++----------------
> 1 file changed, 15 insertions(+), 17 deletions(-)
>
> diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
> index 5749c14b38d0..a8c3e0cff88d 100644
> --- a/Documentation/dev-tools/kasan.rst
> +++ b/Documentation/dev-tools/kasan.rst
> @@ -411,19 +411,20 @@ saving and restoring the per-page KASAN tag via
> Tests
> ~~~~~
>
> -KASAN tests consist of two parts:
> +There are KASAN tests that allow verifying that KASAN works and can detect
> +certain types of memory corruptions. The tests consist of two parts:
>
> 1. 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.
> +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
> +only be verified manually by loading the kernel module and inspecting the
> kernel log for KASAN reports.
>
> -Each KUnit-compatible KASAN test prints a KASAN report if an error is detected.
> -Then the test prints its number and status.
> +Each KUnit-compatible 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::
>
> @@ -451,27 +452,24 @@ Or, if one of the tests failed::
>
> not ok 1 - kasan
>
> -
> There are a few ways to run KUnit-compatible KASAN tests.
>
> 1. Loadable module
>
> -With ``CONFIG_KUNIT`` enabled, ``CONFIG_KASAN_KUNIT_TEST`` can be built as
> -a loadable module and run on any architecture that supports KASAN by loading
> -the module with insmod or modprobe. The module is called ``test_kasan``.
> + With ``CONFIG_KUNIT`` enabled, KASAN-KUnit tests can be built as a loadable
> + module and run by loading ``test_kasan.ko`` with ``insmod`` or ``modprobe``.
>
> 2. Built-In
>
> -With ``CONFIG_KUNIT`` built-in, ``CONFIG_KASAN_KUNIT_TEST`` can be built-in
> -on any architecure that supports KASAN. These and any other KUnit tests enabled
> -will run and print the results at boot as a late-init call.
> + With ``CONFIG_KUNIT`` built-in, KASAN-KUnit 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
>
> -With ``CONFIG_KUNIT`` and ``CONFIG_KASAN_KUNIT_TEST`` built-in, it's also
> -possible use ``kunit_tool`` to see the results of these and other KUnit tests
> -in a more readable way. This will not print the KASAN reports of the tests that
> -passed. Use `KUnit documentation <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
> -for more up-to-date information on ``kunit_tool``.
> + With ``CONFIG_KUNIT`` and ``CONFIG_KASAN_KUNIT_TEST`` built-in, it is also
> + possible to use ``kunit_tool`` to see the results of KUnit tests in a more
> + readable way. This will not print the KASAN reports of the tests that passed.
> + See `KUnit documentation <https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html>`_
> + for more up-to-date information on ``kunit_tool``.
>
> .. _KUnit: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html
> --
> 2.31.0.rc2.261.g7f71774620-goog
>
next prev parent reply other threads:[~2021-03-12 15:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 14:24 [PATCH v2 01/11] kasan: docs: clean up sections Andrey Konovalov
2021-03-12 14:24 ` [PATCH v2 02/11] kasan: docs: update overview section Andrey Konovalov
2021-03-12 15:07 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 03/11] kasan: docs: update usage section Andrey Konovalov
2021-03-12 15:07 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 04/11] kasan: docs: update error reports section Andrey Konovalov
2021-03-12 15:08 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 05/11] kasan: docs: update boot parameters section Andrey Konovalov
2021-03-12 15:08 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 06/11] kasan: docs: update GENERIC implementation details section Andrey Konovalov
2021-03-12 15:08 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 07/11] kasan: docs: update SW_TAGS " Andrey Konovalov
2021-03-12 15:09 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 08/11] kasan: docs: update HW_TAGS " Andrey Konovalov
2021-03-12 15:09 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 09/11] kasan: docs: update shadow memory section Andrey Konovalov
2021-03-12 15:09 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 10/11] kasan: docs: update ignoring accesses section Andrey Konovalov
2021-03-12 15:10 ` Marco Elver
2021-03-12 14:24 ` [PATCH v2 11/11] kasan: docs: update tests section Andrey Konovalov
2021-03-12 15:11 ` Marco Elver [this message]
2021-03-12 15:06 ` [PATCH v2 01/11] kasan: docs: clean up sections Marco Elver
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=YEuEhc1JBq5dTpxp@elver.google.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.