Re: [PATCH v2 28/33] s390/string: Add KMSAN support
From: Alexander Potapenko <glider@google.com>
Date: 2023-12-11 10:50:34
Also in:
linux-mm, linux-s390, lkml
From: Alexander Potapenko <glider@google.com>
Date: 2023-12-11 10:50:34
Also in:
linux-mm, linux-s390, lkml
On Tue, Nov 21, 2023 at 11:03 PM Ilya Leoshkevich [off-list ref] wrote:
Add KMSAN support for the s390 implementations of the string functions.
Do this similar to how it's already done for KASAN, except that the
optimized memset{16,32,64}() functions need to be disabled: it's
important for KMSAN to know that they initialized something.
The way boot code is built with regard to string functions is
problematic, since most files think it's configured with sanitizers,
but boot/string.c doesn't. This creates various problems with the
memset64() definitions, depending on whether the code is built with
sanitizers or fortify. This should probably be streamlined, but in the
meantime resolve the issues by introducing the IN_BOOT_STRING_C macro,
similar to the existing IN_ARCH_STRING_C macro.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>Reviewed-by: Alexander Potapenko <glider@google.com>