summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@oracle.com>2016-05-21 17:46:10 +0200
committerRichard Weinberger <richard@nod.at>2016-08-04 00:18:06 +0200
commit915eed20e40f4dcb142cb29a3de6f6ba67f4bb5a (patch)
treedc606eee62b4f6ed16b456450c4cc3523aab719f /arch/um/kernel
parent8e99bc70468dcc42a756ca4b100e2fb2c30c4c89 (diff)
downloadop-kernel-dev-915eed20e40f4dcb142cb29a3de6f6ba67f4bb5a.zip
op-kernel-dev-915eed20e40f4dcb142cb29a3de6f6ba67f4bb5a.tar.gz
um: Support kcov
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. [v2: disable instrumentation in UML-specific code] Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Richard Weinberger <richard@nod.at> Cc: Thomas Meyer <thomas@m3y3r.de> Cc: user-mode-linux-devel <user-mode-linux-devel@lists.sourceforge.net> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index a6a5e42..2f36d51 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -3,6 +3,11 @@
# Licensed under the GPL
#
+# Don't instrument UML-specific code; without this, we may crash when
+# accessing the instrumentation buffer for the first time from the
+# kernel.
+KCOV_INSTRUMENT := n
+
CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
-DELF_ARCH=$(LDS_ELF_ARCH) \
-DELF_FORMAT=$(LDS_ELF_FORMAT) \
OpenPOWER on IntegriCloud