diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-01-24 09:33:52 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-24 09:35:51 +0100 |
commit | 7add7875a8eb4ffe5eddaf8a11e409c9e1b6e3f3 (patch) | |
tree | 62f720dcb9326470c76a38afb1c61a2b8cecce45 /Documentation/dev-tools | |
parent | 837171fe77d700222bb75ef5fe26f4785fcd9e99 (diff) | |
parent | e33f9a169747880a008dd5e7b934fc592e91cd63 (diff) | |
download | linux-7add7875a8eb4ffe5eddaf8a11e409c9e1b6e3f3.tar.bz2 |
Merge branch 'kcsan.2020.01.07a' into locking/kcsan
Pull KCSAN updates from Paul E. McKenney:
- UBSAN fixes
- inlining updates
- documentation updates
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/dev-tools')
-rw-r--r-- | Documentation/dev-tools/kcsan.rst | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Documentation/dev-tools/kcsan.rst b/Documentation/dev-tools/kcsan.rst index a6f4f92df2fa..65a0be513b7d 100644 --- a/Documentation/dev-tools/kcsan.rst +++ b/Documentation/dev-tools/kcsan.rst @@ -101,18 +101,28 @@ instrumentation or e.g. DMA accesses. Selective analysis ~~~~~~~~~~~~~~~~~~ -To disable KCSAN data race detection for an entire subsystem, add to the -respective ``Makefile``:: +It may be desirable to disable data race detection for specific accesses, +functions, compilation units, or entire subsystems. For static blacklisting, +the below options are available: - KCSAN_SANITIZE := n +* KCSAN understands the ``data_race(expr)`` annotation, which tells KCSAN that + any data races due to accesses in ``expr`` should be ignored and resulting + behaviour when encountering a data race is deemed safe. + +* Disabling data race detection for entire functions can be accomplished by + using the function attribute ``__no_kcsan`` (or ``__no_kcsan_or_inline`` for + ``__always_inline`` functions). To dynamically control for which functions + data races are reported, see the `debugfs`_ blacklist/whitelist feature. -To disable KCSAN on a per-file basis, add to the ``Makefile``:: +* To disable data race detection for a particular compilation unit, add to the + ``Makefile``:: KCSAN_SANITIZE_file.o := n -KCSAN also understands the ``data_race(expr)`` annotation, which tells KCSAN -that any data races due to accesses in ``expr`` should be ignored and resulting -behaviour when encountering a data race is deemed safe. +* To disable data race detection for all compilation units listed in a + ``Makefile``, add to the respective ``Makefile``:: + + KCSAN_SANITIZE := n debugfs ~~~~~~~ |