Skip to content

Commit

Permalink
kcsan: Remove existing special atomic rules
Browse files Browse the repository at this point in the history
Remove existing special atomic rules from kcsan_is_atomic_special()
because they are no longer needed. Since we rely on the compiler
emitting instrumentation distinguishing volatile accesses, the rules
have become redundant.

Let's keep kcsan_is_atomic_special() around, so that we have an obvious
place to add special rules should the need arise in future.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
  • Loading branch information
Marco Elver authored and Paul E. McKenney committed Jun 29, 2020
1 parent acfa087 commit 7e76656
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kernel/kcsan/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#ifndef _KERNEL_KCSAN_ATOMIC_H
#define _KERNEL_KCSAN_ATOMIC_H

#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/types.h>

/*
* Special rules for certain memory where concurrent conflicting accesses are
Expand All @@ -13,8 +12,7 @@
*/
static bool kcsan_is_atomic_special(const volatile void *ptr)
{
/* volatile globals that have been observed in data races. */
return ptr == &jiffies || ptr == &current->state;
return false;
}

#endif /* _KERNEL_KCSAN_ATOMIC_H */

0 comments on commit 7e76656

Please sign in to comment.