objtool, kcsan: Remove memory barrier instrumentation from noinstr
authorMarco Elver <elver@google.com>
Tue, 30 Nov 2021 11:44:31 +0000 (12:44 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 10 Dec 2021 00:42:28 +0000 (16:42 -0800)
commit0509811952e41ad1e04c50d2378078250b6b7be3
tree44e74157c55812b237dcf6cf9ce2d20caea4e458
parent0525bd82f6a9b5860ed3ea53520ac11ebfa09d5b
objtool, kcsan: Remove memory barrier instrumentation from noinstr

Teach objtool to turn instrumentation required for memory barrier
modeling into nops in noinstr text.

The __tsan_func_entry/exit calls are still emitted by compilers even
with the __no_sanitize_thread attribute. The memory barrier
instrumentation will be inserted explicitly (without compiler help), and
thus needs to also explicitly be removed.

Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/objtool/check.c
tools/objtool/include/objtool/elf.h