Commit 7add7875 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@kernel.org>
parents 837171fe e33f9a16
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -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
~~~~~~~
+168 −167

File changed.

Preview size limit exceeded, changes collapsed.

+166 −165

File changed.

Preview size limit exceeded, changes collapsed.

+171 −169

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Diff line number Diff line
@@ -146,8 +146,7 @@
#endif

#if defined(__SANITIZE_THREAD__) && __has_attribute(__no_sanitize_thread__)
#define __no_sanitize_thread                                                   \
	__attribute__((__noinline__)) __attribute__((no_sanitize_thread))
#define __no_sanitize_thread __attribute__((no_sanitize_thread))
#else
#define __no_sanitize_thread
#endif
Loading