Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 152eaa86 authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Greg Kroah-Hartman
Browse files

s390/purgatory: do not build purgatory with kcov, kasan and friends



[ Upstream commit c23587c92f6e3260fe3b82bb75b38aa2553b9468 ]

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: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5ee6f0da
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -13,8 +13,10 @@ $(obj)/sha256.o: $(srctree)/lib/sha256.c FORCE
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
	$(call if_changed_rule,as_o_S)

$(obj)/string.o: $(srctree)/arch/s390/lib/string.c FORCE
	$(call if_changed_rule,cc_o_c)
KCOV_INSTRUMENT := n
GCOV_PROFILE := n
UBSAN_SANITIZE := n
KASAN_SANITIZE := n

LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib
LDFLAGS_purgatory.ro += -z nodefaultlib
+3 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#define __HAVE_ARCH_MEMCMP	/* arch function */
#include "../lib/string.c"