Re: [PATCH v3 29/34] s390/string: Add KMSAN support

From: Heiko Carstens
Date: Tue Jan 02 2024 - 10:15:07 EST


On Thu, Dec 14, 2023 at 12:24:49AM +0100, Ilya Leoshkevich 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.
>
> Reviewed-by: Alexander Potapenko <glider@xxxxxxxxxx>
> Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
> ---
> arch/s390/boot/string.c | 16 ++++++++++++++++
> arch/s390/include/asm/string.h | 20 +++++++++++++++-----
> 2 files changed, 31 insertions(+), 5 deletions(-)

Acked-by: Heiko Carstens <hca@xxxxxxxxxxxxx>