linux-stable/arch/x86/lib
Vincent Whitchurch 10f4c9b9a3 x86/asm: Fix build of UML with KASAN
Building UML with KASAN fails since commit 69d4c0d321 ("entry, kasan,
x86: Disallow overriding mem*() functions") with the following errors:

 $ tools/testing/kunit/kunit.py run --kconfig_add CONFIG_KASAN=y
 ...
 ld: mm/kasan/shadow.o: in function `memset':
 shadow.c:(.text+0x40): multiple definition of `memset';
 arch/x86/lib/memset_64.o:(.noinstr.text+0x0): first defined here
 ld: mm/kasan/shadow.o: in function `memmove':
 shadow.c:(.text+0x90): multiple definition of `memmove';
 arch/x86/lib/memmove_64.o:(.noinstr.text+0x0): first defined here
 ld: mm/kasan/shadow.o: in function `memcpy':
 shadow.c:(.text+0x110): multiple definition of `memcpy';
 arch/x86/lib/memcpy_64.o:(.noinstr.text+0x0): first defined here

UML does not use GENERIC_ENTRY and is still supposed to be allowed to
override the mem*() functions, so use weak aliases in that case.

Fixes: 69d4c0d321 ("entry, kasan, x86: Disallow overriding mem*() functions")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20230918-uml-kasan-v3-1-7ad6db477df6@axis.com
2023-09-18 19:30:08 +02:00
..
.gitignore
atomic64_32.c
atomic64_386_32.S
atomic64_cx8_32.S
cache-smp.c
checksum_32.S
clear_page_64.S
cmdline.c
cmpxchg8b_emu.S
cmpxchg16b_emu.S
copy_mc_64.S
copy_mc.c
copy_page_64.S
copy_user_64.S x86: bring back rep movsq for user access on CPUs without ERMS 2023-08-30 09:45:12 -07:00
copy_user_uncached_64.S
cpu.c
csum-copy_64.S
csum-partial_64.c
csum-wrappers_64.c
delay.c
error-inject.c
getuser.S
hweight.S
inat.c
insn-eval.c
insn.c
iomap_copy_64.S
iomem.c
kaslr.c
Makefile
memcpy_32.c
memcpy_64.S x86/asm: Fix build of UML with KASAN 2023-09-18 19:30:08 +02:00
memmove_32.S
memmove_64.S x86/asm: Fix build of UML with KASAN 2023-09-18 19:30:08 +02:00
memset_64.S x86/asm: Fix build of UML with KASAN 2023-09-18 19:30:08 +02:00
misc.c
msr-reg-export.c
msr-reg.S
msr-smp.c
msr.c
pc-conf-reg.c
putuser.S x86/ibt: Avoid duplicate ENDBR in __put_user_nocheck*() 2023-09-12 17:51:24 +02:00
retpoline.S x86/srso: Explain the untraining sequences a bit more 2023-08-16 21:58:59 +02:00
string_32.c
strstr_32.c
usercopy_32.c
usercopy_64.c
usercopy.c
x86-opcode-map.txt