Patch "objtool: add UACCESS exceptions for __tsan_volatile_read/write" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    objtool: add UACCESS exceptions for __tsan_volatile_read/write

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     objtool-add-uaccess-exceptions-for-__tsan_volatile_r.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0e2a4b26e1cd88fa9b192752f7395fe6ece33670
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Wed Feb 15 14:00:58 2023 +0100

    objtool: add UACCESS exceptions for __tsan_volatile_read/write
    
    [ Upstream commit d5d469247264e56960705dc5ae7e1d014861fe40 ]
    
    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/20230215130058.3836177-4-arnd@xxxxxxxxxx
    Fixes: 75d75b7a4d54 ("kcsan: Support distinguishing volatile accesses")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Acked-by: Marco Elver <elver@xxxxxxxxxx>
    Cc: Alexander Potapenko <glider@xxxxxxxxxx>
    Cc: Andrey Konovalov <andreyknvl@xxxxxxxxx>
    Cc: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>
    Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
    Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
    Cc: Kuan-Ying Lee <Kuan-Ying.Lee@xxxxxxxxxxxx>
    Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Cc: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index ff47aed7ef6fe..5c4190382a51a 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -864,6 +864,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",



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux