[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a1675b9f-5727-e767-f835-6ab9ff711ef3@gmail.com>
Date: Thu, 13 May 2021 19:47:41 +0900
From: Akira Yokosawa <akiyks@...il.com>
To: "Paul E. McKenney" <paulmck@...nel.org>,
linux-kernel@...r.kernel.org, kasan-dev@...glegroups.com,
kernel-team@...com, mingo@...nel.org
Cc: elver@...gle.com, andreyknvl@...gle.com, glider@...gle.com,
dvyukov@...gle.com, cai@....pw, boqun.feng@...il.com
Subject: Re: [PATCH tip/core/rcu 01/10] kcsan: Add pointer to
access-marking.txt to data_race() bullet
Hi Paul,
On Tue, 11 May 2021 16:23:52 -0700, Paul E. McKenney wrote:
> This commit references tools/memory-model/Documentation/access-marking.txt
> in the bullet introducing data_race(). The access-marking.txt file
> gives advice on when data_race() should and should not be used.
>
> Suggested-by: Akira Yokosawa <akiyks@...il.com>
> Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
> ---
> Documentation/dev-tools/kcsan.rst | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/dev-tools/kcsan.rst b/Documentation/dev-tools/kcsan.rst
> index d85ce238ace7..80894664a44c 100644
> --- a/Documentation/dev-tools/kcsan.rst
> +++ b/Documentation/dev-tools/kcsan.rst
> @@ -106,7 +106,9 @@ the below options are available:
>
> * 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.
> + behaviour when encountering a data race is deemed safe. Please see
> + ``tools/memory-model/Documentation/access-marking.txt`` in the kernel source
> + tree for more information.
>
> * Disabling data race detection for entire functions can be accomplished by
> using the function attribute ``__no_kcsan``::
>
I think this needs some adjustment for overall consistency.
A possible follow-up patch (relative to the change above) would look
like the following.
Thoughts?
Thanks, Akira
-------8<--------
From: Akira Yokosawa <akiyks@...il.com>
Subject: [PATCH] kcsan: Use URL link for pointing access-marking.txt
For consistency within kcsan.rst, use a URL link as the same as in
section "Data Races".
Signed-off-by: Akira Yokosawa <akiyks@...il.com>
Cc: Paul E. McKenney <paulmck@...nel.org>
---
Documentation/dev-tools/kcsan.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/dev-tools/kcsan.rst b/Documentation/dev-tools/kcsan.rst
index 80894664a44c..151f96b7fef0 100644
--- a/Documentation/dev-tools/kcsan.rst
+++ b/Documentation/dev-tools/kcsan.rst
@@ -107,8 +107,7 @@ the below options are available:
* 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. Please see
- ``tools/memory-model/Documentation/access-marking.txt`` in the kernel source
- tree for more information.
+ `"Marking Shared-Memory Accesses" in the LKMM`_ for more information.
* Disabling data race detection for entire functions can be accomplished by
using the function attribute ``__no_kcsan``::
@@ -130,6 +129,8 @@ the below options are available:
KCSAN_SANITIZE := n
+.. _"Marking Shared-Memory Accesses" in the LKMM: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/memory-model/Documentation/access-marking.txt
+
Furthermore, it is possible to tell KCSAN to show or hide entire classes of
data races, depending on preferences. These can be changed via the following
Kconfig options:
--
2.17.1
Powered by blists - more mailing lists