Skip to content

Commit d5d4692

Browse files
arndbakpm00
authored andcommitted
objtool: add UACCESS exceptions for __tsan_volatile_read/write
A lot of the tsan helpers are already excempt from the UACCESS warnings, but some more functions were added that need the same thing: kernel/kcsan/core.o: warning: objtool: __tsan_volatile_read16+0x0: call to __tsan_unaligned_read16() with UACCESS enabled kernel/kcsan/core.o: warning: objtool: __tsan_volatile_write16+0x0: call to __tsan_unaligned_write16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_read16+0x4: call to __tsan_unaligned_read16() with UACCESS enabled vmlinux.o: warning: objtool: __tsan_unaligned_volatile_write16+0x4: call to __tsan_unaligned_write16() with UACCESS enabled As Marco points out, these functions don't even call each other explicitly but instead gcc (but not clang) notices the functions being identical and turns one symbol into a direct branch to the other. Link: https://lkml.kernel.org/r/[email protected] Fixes: 75d75b7 ("kcsan: Support distinguishing volatile accesses") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Marco Elver <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Kuan-Ying Lee <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: Vincenzo Frascino <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent e75a698 commit d5d4692

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/objtool/check.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,8 @@ static const char *uaccess_safe_builtin[] = {
11861186
"__tsan_atomic64_compare_exchange_val",
11871187
"__tsan_atomic_thread_fence",
11881188
"__tsan_atomic_signal_fence",
1189+
"__tsan_unaligned_read16",
1190+
"__tsan_unaligned_write16",
11891191
/* KCOV */
11901192
"write_comp_data",
11911193
"check_kcov_mode",

0 commit comments

Comments
 (0)