linux-stable/tools
Arnd Bergmann a52a2817d2 objtool: add UACCESS exceptions for __tsan_volatile_read/write
[ Upstream commit d5d4692472 ]

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@kernel.org
Fixes: 75d75b7a4d ("kcsan: Support distinguishing volatile accesses")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:28 +01:00
..
accounting
arch parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-14 10:33:40 +01:00
bootconfig
bpf bpftool: profile online CPUs instead of possible 2023-03-10 09:32:58 +01:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-02-01 08:34:49 +01:00
hv
iio
include tools/nolibc: prevent gcc from making memset() loop over itself 2023-02-01 08:34:31 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib tools/lib/thermal: Fix thermal_sampling_exit() 2023-03-10 09:33:05 +01:00
memory-model
objtool objtool: add UACCESS exceptions for __tsan_volatile_read/write 2023-03-10 09:33:28 +01:00
pci
pcmcia
perf perf tests stat_all_metrics: Change true workload to sleep workload for system wide check 2023-03-10 09:33:27 +01:00
power
rcu
scripts
spi
testing selftests: use printf instead of echo -ne 2023-03-10 09:33:27 +01:00
thermal
time
tracing tools/tracing/rtla: osnoise_hist: use total duration for average calculation 2023-03-10 09:33:26 +01:00
usb
verification
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:59:42 +01:00
vm
wmi
Makefile