diff mbox series

[v2,03/11] kasan: docs: update usage section

Message ID 48427809cd4b8b5d6bc00926cbe87e2b5081df17.1615559068.git.andreyknvl@google.com (mailing list archive)
State New, archived
Headers show
Series [v2,01/11] kasan: docs: clean up sections | expand

Commit Message

Andrey Konovalov March 12, 2021, 2:24 p.m. UTC
Update the "Usage" section in KASAN documentation:

- Add inline code snippet markers.
- Reword the part about stack traces for clarity.
- Other minor clean-ups.

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

Comments

Marco Elver March 12, 2021, 3:07 p.m. UTC | #1
On Fri, Mar 12, 2021 at 03:24PM +0100, Andrey Konovalov wrote:
> Update the "Usage" section in KASAN documentation:
> 
> - Add inline code snippet markers.
> - Reword the part about stack traces for clarity.
> - Other minor clean-ups.
> 
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>

Reviewed-by: Marco Elver <elver@google.com>

> ---
>  Documentation/dev-tools/kasan.rst | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
> index 2f2697b290d5..46f4e9680805 100644
> --- a/Documentation/dev-tools/kasan.rst
> +++ b/Documentation/dev-tools/kasan.rst
> @@ -41,22 +41,21 @@ and riscv architectures, and tag-based KASAN modes are supported only for arm64.
>  Usage
>  -----
>  
> -To enable KASAN configure kernel with::
> +To enable KASAN, configure the kernel with::
>  
> -	  CONFIG_KASAN = y
> +	  CONFIG_KASAN=y
>  
> -and choose between CONFIG_KASAN_GENERIC (to enable generic KASAN),
> -CONFIG_KASAN_SW_TAGS (to enable software tag-based KASAN), and
> -CONFIG_KASAN_HW_TAGS (to enable hardware tag-based KASAN).
> +and choose between ``CONFIG_KASAN_GENERIC`` (to enable generic KASAN),
> +``CONFIG_KASAN_SW_TAGS`` (to enable software tag-based KASAN), and
> +``CONFIG_KASAN_HW_TAGS`` (to enable hardware tag-based KASAN).
>  
> -For software modes, you also need to choose between CONFIG_KASAN_OUTLINE and
> -CONFIG_KASAN_INLINE. Outline and inline are compiler instrumentation types.
> -The former produces smaller binary while the latter is 1.1 - 2 times faster.
> +For software modes, also choose between ``CONFIG_KASAN_OUTLINE`` and
> +``CONFIG_KASAN_INLINE``. Outline and inline are compiler instrumentation types.
> +The former produces a smaller binary while the latter is 1.1-2 times faster.
>  
> -For better error reports that include stack traces, enable CONFIG_STACKTRACE.
> -
> -To augment reports with last allocation and freeing stack of the physical page,
> -it is recommended to enable also CONFIG_PAGE_OWNER and boot with page_owner=on.
> +To include alloc and free stack traces of affected slab objects into reports,
> +enable ``CONFIG_STACKTRACE``. To include alloc and free stack traces of affected
> +physical pages, enable ``CONFIG_PAGE_OWNER`` and boot with ``page_owner=on``.
>  
>  Error reports
>  ~~~~~~~~~~~~~
> -- 
> 2.31.0.rc2.261.g7f71774620-goog
>
diff mbox series

Patch

diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst
index 2f2697b290d5..46f4e9680805 100644
--- a/Documentation/dev-tools/kasan.rst
+++ b/Documentation/dev-tools/kasan.rst
@@ -41,22 +41,21 @@  and riscv architectures, and tag-based KASAN modes are supported only for arm64.
 Usage
 -----
 
-To enable KASAN configure kernel with::
+To enable KASAN, configure the kernel with::
 
-	  CONFIG_KASAN = y
+	  CONFIG_KASAN=y
 
-and choose between CONFIG_KASAN_GENERIC (to enable generic KASAN),
-CONFIG_KASAN_SW_TAGS (to enable software tag-based KASAN), and
-CONFIG_KASAN_HW_TAGS (to enable hardware tag-based KASAN).
+and choose between ``CONFIG_KASAN_GENERIC`` (to enable generic KASAN),
+``CONFIG_KASAN_SW_TAGS`` (to enable software tag-based KASAN), and
+``CONFIG_KASAN_HW_TAGS`` (to enable hardware tag-based KASAN).
 
-For software modes, you also need to choose between CONFIG_KASAN_OUTLINE and
-CONFIG_KASAN_INLINE. Outline and inline are compiler instrumentation types.
-The former produces smaller binary while the latter is 1.1 - 2 times faster.
+For software modes, also choose between ``CONFIG_KASAN_OUTLINE`` and
+``CONFIG_KASAN_INLINE``. Outline and inline are compiler instrumentation types.
+The former produces a smaller binary while the latter is 1.1-2 times faster.
 
-For better error reports that include stack traces, enable CONFIG_STACKTRACE.
-
-To augment reports with last allocation and freeing stack of the physical page,
-it is recommended to enable also CONFIG_PAGE_OWNER and boot with page_owner=on.
+To include alloc and free stack traces of affected slab objects into reports,
+enable ``CONFIG_STACKTRACE``. To include alloc and free stack traces of affected
+physical pages, enable ``CONFIG_PAGE_OWNER`` and boot with ``page_owner=on``.
 
 Error reports
 ~~~~~~~~~~~~~