aboutsummaryrefslogtreecommitdiff
path: root/tools/objtool
diff options
context:
space:
mode:
authorMarco Elver2020-07-03 15:40:29 +0200
committerPaul E. McKenney2020-08-24 15:09:05 -0700
commit0f8ad5f2e93425812c393c91ceb5af3d95e79b10 (patch)
treefcd29f371507fec0bbd0b5b83f93c37fd61ed241 /tools/objtool
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff)
kcsan: Add support for atomic builtins
Some architectures (currently e.g. s390 partially) implement atomics using the compiler's atomic builtins (__atomic_*, __sync_*). To support enabling KCSAN on such architectures in future, or support experimental use of these builtins, implement support for them. We should also avoid breaking KCSAN kernels due to use (accidental or otherwise) of atomic builtins in drivers, as has happened in the past: https://lkml.kernel.org/r/5231d2c0-41d9-6721-e15f-a7eedf3ce69e@infradead.org The instrumentation is subtly different from regular reads/writes: TSAN instrumentation replaces the use of atomic builtins with a call into the runtime, and the runtime's job is to also execute the desired atomic operation. We rely on the __atomic_* compiler builtins, available with all KCSAN-supported compilers, to implement each TSAN atomic instrumentation function. Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/objtool')
0 files changed, 0 insertions, 0 deletions