* [PATCH] arm64: allow building with kcov coverage on ARM64
@ 2016-06-15 9:55 Alexander Potapenko
2016-06-15 10:42 ` Marc Zyngier
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Potapenko @ 2016-06-15 9:55 UTC (permalink / raw)
To: dvyukov, catalin.marinas, quentin.casasnovas, will.deacon,
ard.biesheuvel, marc.zyngier, christoffer.dall
Cc: linux-arm-kernel, linux-kernel, syzkaller, kcc, akpm
Add ARCH_HAS_KCOV to ARM64 config. To avoid potential crashes, disable
instrumentation of the files in arch/arm64/kvm/hyp/*.
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
---
v3: - reverted arch/arm64/boot/Makefile, there's no code in that dir
- added ack from Mark Rutland
v2: - disable instrumentation of arch/arm64/{boot,kvm/hyp}
- enable instrumentation of arch/arm64/lib/delay.c
---
arch/arm64/Kconfig | 1 +
arch/arm64/kvm/hyp/Makefile | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 5a0a691..eb0b0a0 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -7,6 +7,7 @@ config ARM64
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_GCOV_PROFILE_ALL
+ select ARCH_HAS_KCOV
select ARCH_HAS_SG_CHAIN
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_USE_CMPXCHG_LOCKREF
diff --git a/arch/arm64/kvm/hyp/Makefile b/arch/arm64/kvm/hyp/Makefile
index 778d0ef..0c85feb 100644
--- a/arch/arm64/kvm/hyp/Makefile
+++ b/arch/arm64/kvm/hyp/Makefile
@@ -17,6 +17,10 @@ obj-$(CONFIG_KVM_ARM_HOST) += tlb.o
obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
+# KVM code is run at a different exception code with a different map, so
+# compiler instrumentation that inserts callbacks or checks into the code may
+# cause crashes. Just disable it.
GCOV_PROFILE := n
KASAN_SANITIZE := n
UBSAN_SANITIZE := n
+KCOV_INSTRUMENT := n
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: allow building with kcov coverage on ARM64
2016-06-15 9:55 [PATCH] arm64: allow building with kcov coverage on ARM64 Alexander Potapenko
@ 2016-06-15 10:42 ` Marc Zyngier
0 siblings, 0 replies; 2+ messages in thread
From: Marc Zyngier @ 2016-06-15 10:42 UTC (permalink / raw)
To: Alexander Potapenko
Cc: dvyukov, catalin.marinas, quentin.casasnovas, will.deacon,
ard.biesheuvel, christoffer.dall, linux-arm-kernel, linux-kernel,
syzkaller, kcc, akpm
On Wed, 15 Jun 2016 11:55:23 +0200
Alexander Potapenko <glider@google.com> wrote:
> Add ARCH_HAS_KCOV to ARM64 config. To avoid potential crashes, disable
> instrumentation of the files in arch/arm64/kvm/hyp/*.
>
> Signed-off-by: Alexander Potapenko <glider@google.com>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
M.
--
Jazz is not dead. It just smells funny.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-15 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15 9:55 [PATCH] arm64: allow building with kcov coverage on ARM64 Alexander Potapenko
2016-06-15 10:42 ` Marc Zyngier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).