Skip to content

Commit c23587c

Browse files
borntraegerVasily Gorbik
authored andcommitted
s390/purgatory: do not build purgatory with kcov, kasan and friends
the purgatory must not rely on functions from the "old" kernel, so we must disable kasan and friends. We also need to have a separate copy of string.c as the default does not build memcmp with KASAN. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Reviewed-by: Vasily Gorbik <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent cd92ac2 commit c23587c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

arch/s390/purgatory/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ CFLAGS_sha256.o := -D__DISABLE_EXPORTS
1515
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
1616
$(call if_changed_rule,as_o_S)
1717

18-
$(obj)/string.o: $(srctree)/arch/s390/lib/string.c FORCE
19-
$(call if_changed_rule,cc_o_c)
18+
KCOV_INSTRUMENT := n
19+
GCOV_PROFILE := n
20+
UBSAN_SANITIZE := n
21+
KASAN_SANITIZE := n
2022

2123
KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
2224
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare

arch/s390/purgatory/string.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
#define __HAVE_ARCH_MEMCMP /* arch function */
3+
#include "../lib/string.c"

0 commit comments

Comments
 (0)