summaryrefslogtreecommitdiffstats
path: root/scripts/modules-check.sh
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2020-05-21 16:20:40 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-06-11 20:04:01 +0200
commitd31d4d6bb256c3e784709e4aaf075de87c3390fc (patch)
treed482432f59783269009752aa3bc582ee078d5e20 /scripts/modules-check.sh
parent75d75b7a4d5489cc6a5e91ace306f6c13f376f33 (diff)
downloadlinux-d31d4d6bb256c3e784709e4aaf075de87c3390fc.tar.gz
linux-d31d4d6bb256c3e784709e4aaf075de87c3390fc.tar.bz2
linux-d31d4d6bb256c3e784709e4aaf075de87c3390fc.zip
kcsan: Pass option tsan-instrument-read-before-write to Clang
Clang (unlike GCC) removes reads before writes with matching addresses in the same basic block. This is an optimization for TSAN, since writes will always cause conflict if the preceding read would have. However, for KCSAN we cannot rely on this option, because we apply several special rules to writes, in particular when the KCSAN_ASSUME_PLAIN_WRITES_ATOMIC option is selected. To avoid missing potential data races, pass the -tsan-instrument-read-before-write option to Clang if it is available [1]. [1] https://github.com/llvm/llvm-project/commit/151ed6aa38a3ec6c01973b35f684586b6e1c0f7e Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lkml.kernel.org/r/20200521142047.169334-5-elver@google.com
Diffstat (limited to 'scripts/modules-check.sh')
0 files changed, 0 insertions, 0 deletions