From: Vegard N. <veg...@or...> - 2016-05-21 14:03:58
|
This adds support for kcov to UML. There is a small problem where UML will randomly segfault during boot; this is because current_thread_info() occasionally returns an invalid (non-NULL) pointer and we try to dereference it in __sanitizer_cov_trace_pc(). I consider this a bug in UML itself and this patch merely exposes it. Cc: Quentin Casasnovas <que...@or...> Cc: Richard Weinberger <ri...@no...> Cc: Thomas Meyer <th...@m3...> Cc: user-mode-linux-devel <use...@li...> Cc: Dmitry Vyukov <dv...@go...> Signed-off-by: Vegard Nossum <veg...@or...> --- arch/um/Kconfig.common | 1 + arch/x86/um/vdso/Makefile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index cc00134..64c1d46 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common @@ -1,6 +1,7 @@ config UML bool default y + select ARCH_HAS_KCOV select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_SECCOMP_FILTER select HAVE_UID16 diff --git a/arch/x86/um/vdso/Makefile b/arch/x86/um/vdso/Makefile index 6c803ca..d72dec4 100644 --- a/arch/x86/um/vdso/Makefile +++ b/arch/x86/um/vdso/Makefile @@ -2,6 +2,9 @@ # Building vDSO images for x86. # +# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. +KCOV_INSTRUMENT := n + VDSO64-y := y vdso-install-$(VDSO64-y) += vdso.so -- 1.9.1 |