From: Jonathan Corbet <corbet@lwn.net>
To: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Jani Nikula <jani.nikula@intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: [PATCH 07/10] docs: sphinxify ubsan.txt and move it to dev-tools
Date: Mon, 8 Aug 2016 17:34:59 -0600 [thread overview]
Message-ID: <20160808233502.16950-8-corbet@lwn.net> (raw)
In-Reply-To: <20160808233502.16950-1-corbet@lwn.net>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
Documentation/dev-tools/tools.rst | 1 +
Documentation/{ubsan.txt => dev-tools/ubsan.rst} | 42 +++++++++++++-----------
2 files changed, 24 insertions(+), 19 deletions(-)
rename Documentation/{ubsan.txt => dev-tools/ubsan.rst} (78%)
diff --git a/Documentation/dev-tools/tools.rst b/Documentation/dev-tools/tools.rst
index 0500e65..2d11297 100644
--- a/Documentation/dev-tools/tools.rst
+++ b/Documentation/dev-tools/tools.rst
@@ -19,3 +19,4 @@ whole; patches welcome!
kcov
gcov
kasan
+ ubsan
diff --git a/Documentation/ubsan.txt b/Documentation/dev-tools/ubsan.rst
similarity index 78%
rename from Documentation/ubsan.txt
rename to Documentation/dev-tools/ubsan.rst
index f58215e..655e6b6 100644
--- a/Documentation/ubsan.txt
+++ b/Documentation/dev-tools/ubsan.rst
@@ -1,7 +1,5 @@
-Undefined Behavior Sanitizer - UBSAN
-
-Overview
---------
+The Undefined Behavior Sanitizer - UBSAN
+========================================
UBSAN is a runtime undefined behaviour checker.
@@ -10,11 +8,13 @@ Compiler inserts code that perform certain kinds of checks before operations
that may cause UB. If check fails (i.e. UB detected) __ubsan_handle_*
function called to print error message.
-GCC has that feature since 4.9.x [1] (see -fsanitize=undefined option and
-its suboptions). GCC 5.x has more checkers implemented [2].
+GCC has that feature since 4.9.x [1_] (see ``-fsanitize=undefined`` option and
+its suboptions). GCC 5.x has more checkers implemented [2_].
Report example
----------------
+--------------
+
+::
================================================================================
UBSAN: Undefined behaviour in ../include/linux/bitops.h:110:33
@@ -47,29 +47,33 @@ Report example
Usage
-----
-To enable UBSAN configure kernel with:
+To enable UBSAN configure kernel with::
CONFIG_UBSAN=y
-and to check the entire kernel:
+and to check the entire kernel::
CONFIG_UBSAN_SANITIZE_ALL=y
To enable 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):
- UBSAN_SANITIZE_main.o := y
+- For a single file (e.g. main.o)::
+
+ UBSAN_SANITIZE_main.o := y
- For all files in one directory:
- UBSAN_SANITIZE := y
+- For all files in one directory::
+
+ UBSAN_SANITIZE := y
To exclude files from being instrumented even if
-CONFIG_UBSAN_SANITIZE_ALL=y, use:
+``CONFIG_UBSAN_SANITIZE_ALL=y``, use::
+
+ UBSAN_SANITIZE_main.o := n
+
+and::
- UBSAN_SANITIZE_main.o := n
- and:
- UBSAN_SANITIZE := n
+ UBSAN_SANITIZE := n
Detection of unaligned accesses controlled through the separate option -
CONFIG_UBSAN_ALIGNMENT. It's off by default on architectures that support
@@ -80,5 +84,5 @@ reports.
References
----------
-[1] - https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html
-[2] - https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
+.. _1: https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Debugging-Options.html
+.. _2: https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
--
2.9.2
next prev parent reply other threads:[~2016-08-08 23:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 23:34 [PATCH 00/10] [RFC] Sphinxify and coalesce development-tool documents Jonathan Corbet
2016-08-08 23:34 ` [PATCH 01/10] docs: create a new dev-tools directory Jonathan Corbet
2016-08-08 23:34 ` [PATCH 02/10] docs: sphinxify coccinelle.txt and add it to dev-tools Jonathan Corbet
2016-08-09 5:18 ` Julia Lawall
2016-08-09 13:08 ` Nicolas Palix (LIG)
2016-08-08 23:34 ` [PATCH 03/10] docs: sphinxify sparse.txt and move " Jonathan Corbet
2016-08-09 8:07 ` Christoph Hellwig
2016-08-09 8:19 ` Jani Nikula
2016-08-09 8:22 ` Christoph Hellwig
2016-08-09 8:28 ` Daniel Vetter
2016-08-09 8:31 ` Christoph Hellwig
2016-08-09 10:00 ` Daniel Vetter
2016-08-09 22:53 ` Jonathan Corbet
2016-08-18 23:46 ` Jonathan Corbet
2016-08-19 2:27 ` Christoph Hellwig
2016-08-08 23:34 ` [PATCH 04/10] docs: sphinxify kcov.txt " Jonathan Corbet
2016-08-08 23:34 ` [PATCH 05/10] docs: sphinixfy gcov.txt " Jonathan Corbet
2016-08-08 23:34 ` [PATCH 06/10] docs: sphinxify kasan.txt " Jonathan Corbet
2016-08-09 9:09 ` Alexander Potapenko
2016-08-17 15:49 ` Andrey Ryabinin
2016-08-08 23:34 ` Jonathan Corbet [this message]
2016-08-17 15:50 ` [PATCH 07/10] docs: sphinxify ubsan.txt and move it " Andrey Ryabinin
2016-08-08 23:35 ` [PATCH 08/10] docs: sphinxify kmemleak.txt " Jonathan Corbet
2016-08-10 14:37 ` Catalin Marinas
2016-08-08 23:35 ` [PATCH 09/10] docs: sphinxify kmemcheck.txt and move " Jonathan Corbet
2016-08-09 7:04 ` Vegard Nossum
2016-08-08 23:35 ` [PATCH 10/10] docs: Sphinxify gdb-kernel-debugging.txt " Jonathan Corbet
2016-08-10 7:03 ` Jan Kiszka
2016-08-09 8:50 ` [PATCH 00/10] [RFC] Sphinxify and coalesce development-tool documents Jani Nikula
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=20160808233502.16950-8-corbet@lwn.net \
--to=corbet@lwn.net \
--cc=aryabinin@virtuozzo.com \
--cc=jani.nikula@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 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).