Skip to contentSkip to conversation

objtool-add-uaccess-exceptions-for-__tsan_volatile_read-write.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Feb 20, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: objtool: add UACCESS exceptions for __tsan_volatile_read/write
has been removed from the -mm tree. Its filename was
objtool-add-uaccess-exceptions-for-__tsan_volatile_read-write.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Arnd Bergmann <[email protected]>
Subject: objtool: add UACCESS exceptions for __tsan_volatile_read/write
Date: Wed, 15 Feb 2023 14:00:58 +0100

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.

Fixes 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses")
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]>

---

tools/objtool/check.c renamed from tools/objtool/check.c~objtool-add-uaccess-exceptions-for-__tsan_volatile_read-write +2 -0
@@ -1186,6 +1186,8 @@ static const char *uaccess_safe_builtin[
 	"__tsan_atomic64_compare_exchange_val",
 	"__tsan_atomic_thread_fence",
 	"__tsan_atomic_signal_fence",
+	"__tsan_unaligned_read16",
+	"__tsan_unaligned_write16",
 	/* KCOV */
 	"write_comp_data",
 	"check_kcov_mode",

_

Patches currently in -mm which might be from [email protected] are