s390/checksum: support GENERIC_CSUM, enable it for KASAN
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 30 Nov 2022 09:40:34 +0000 (10:40 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 2 Dec 2022 17:25:04 +0000 (18:25 +0100)
commitdfe843dce775f16e3d15a1bf14e5363bff2321f3
treee9c5f13696357f8cbdf88685019e2e9b49743380
parent78c045c08a393285e615260c50cedf9cea5a7fa1
s390/checksum: support GENERIC_CSUM, enable it for KASAN

This is the s390 variant of commit d911c67e10b4 ("x86: kasan: kmsan:
support CONFIG_GENERIC_CSUM on x86, enable it for KASAN/KMSAN"). Even
though most of the s390 specific checksum code is written in C there is
still the csum_partial() inline assembly which could prevent KASAN and
KMSAN from seeing all memory accesses.

Therefore switch to GENERIC_CSUM if KASAN is enabled just like x86.

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/Kconfig
arch/s390/include/asm/checksum.h