linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] kasan: docs: clean up sections
@ 2021-03-11 21:37 Andrey Konovalov
  2021-03-11 21:37 ` [PATCH 02/11] kasan: docs: update overview section Andrey Konovalov
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Andrey Konovalov @ 2021-03-11 21:37 UTC (permalink / raw)
  To: Andrew Morton, Alexander Potapenko, Marco Elver
  Cc: Andrey Ryabinin, Dmitry Vyukov, kasan-dev, linux-mm,
	linux-kernel, Andrey Konovalov

Update KASAN documentation:

- Give some sections clearer names.
- Remove unneeded subsections in the "Tests" section.
- Move the "For developers" section and split into subsections.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 Documentation/dev-tools/kasan.rst | 50 +++++++++++++++----------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
index ddf4239a5890..c9484f34da2a 100644
--- a/Documentation/dev-tools/kasan.rst
+++ b/Documentation/dev-tools/kasan.rst
@@ -168,24 +168,6 @@ particular KASAN features.
   report or also panic the kernel (default: ``report``). Note, that tag
   checking gets disabled after the first reported bug.
 
-For developers
-~~~~~~~~~~~~~~
-
-Software KASAN modes use compiler instrumentation to insert validity checks.
-Such instrumentation might be incompatible with some part of the kernel, and
-therefore needs to be disabled. To disable instrumentation for specific files
-or directories, add a line similar to the following to the respective kernel
-Makefile:
-
-- For a single file (e.g. main.o)::
-
-    KASAN_SANITIZE_main.o := n
-
-- For all files in one directory::
-
-    KASAN_SANITIZE := n
-
-
 Implementation details
 ----------------------
 
@@ -299,8 +281,8 @@ support MTE (but supports TBI).
 Hardware tag-based KASAN only reports the first found bug. After that MTE tag
 checking gets disabled.
 
-What memory accesses are sanitised by KASAN?
---------------------------------------------
+Shadow memory
+-------------
 
 The kernel maps memory in a number of different parts of the address
 space. This poses something of a problem for KASAN, which requires
@@ -362,8 +344,29 @@ unmapped. This will require changes in arch-specific code.
 This allows ``VMAP_STACK`` support on x86, and can simplify support of
 architectures that do not have a fixed module region.
 
-CONFIG_KASAN_KUNIT_TEST and CONFIG_KASAN_MODULE_TEST
-----------------------------------------------------
+For developers
+--------------
+
+Ignoring accesses
+~~~~~~~~~~~~~~~~~
+
+Software KASAN modes use compiler instrumentation to insert validity checks.
+Such instrumentation might be incompatible with some part of the kernel, and
+therefore needs to be disabled. To disable instrumentation for specific files
+or directories, add a line similar to the following to the respective kernel
+Makefile:
+
+- For a single file (e.g. main.o)::
+
+    KASAN_SANITIZE_main.o := n
+
+- For all files in one directory::
+
+    KASAN_SANITIZE := n
+
+
+Tests
+~~~~~
 
 KASAN tests consist of two parts:
 
@@ -409,21 +412,18 @@ Or, if one of the tests failed::
 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``.
 
 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.
 
 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
-- 
2.31.0.rc2.261.g7f71774620-goog


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-03-12 14:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11 21:37 [PATCH 01/11] kasan: docs: clean up sections Andrey Konovalov
2021-03-11 21:37 ` [PATCH 02/11] kasan: docs: update overview section Andrey Konovalov
2021-03-12 10:17   ` Marco Elver
2021-03-12 13:51     ` Andrey Konovalov
2021-03-11 21:37 ` [PATCH 03/11] kasan: docs: update usage section Andrey Konovalov
2021-03-11 21:37 ` [PATCH 04/11] kasan: docs: update error reports section Andrey Konovalov
2021-03-11 21:37 ` [PATCH 05/11] kasan: docs: update boot parameters section Andrey Konovalov
2021-03-11 21:37 ` [PATCH 06/11] kasan: docs: update GENERIC implementation details section Andrey Konovalov
2021-03-11 21:37 ` [PATCH 07/11] kasan: docs: update SW_TAGS " Andrey Konovalov
2021-03-11 21:37 ` [PATCH 08/11] kasan: docs: update HW_TAGS " Andrey Konovalov
2021-03-11 21:37 ` [PATCH 09/11] kasan: docs: update shadow memory section Andrey Konovalov
2021-03-12 10:52   ` Marco Elver
2021-03-12 13:52     ` Andrey Konovalov
2021-03-11 21:37 ` [PATCH 10/11] kasan: docs: update ignoring accesses section Andrey Konovalov
2021-03-12 11:02   ` Marco Elver
2021-03-12 14:07     ` Andrey Konovalov
2021-03-11 21:37 ` [PATCH 11/11] kasan: docs: update tests section Andrey Konovalov
2021-03-12 10:47   ` Marco Elver
2021-03-12 13:53     ` Andrey Konovalov

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).