Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1327366

Re: [PATCH v8] kernel: add kcov code coverage

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v8] kernel: add kcov code coverage
Date 2016-02-05 01:20 +0100
Message-ID <qYChY-XM-9@gated-at.bofh.it> (permalink)
References <qYukr-3Rm-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu,  4 Feb 2016 16:40:41 +0100 Dmitry Vyukov <dvyukov@google.com> wrote:

> kcov provides code coverage collection for coverage-guided fuzzing
> (randomized testing).

# make allmodconfig
# make
Makefile:679: Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler
scripts/kconfig/conf  --silentoldconfig Kconfig
Makefile:679: Cannot use CONFIG_KCOV: -fsanitize-coverage=trace-pc is not supported by compiler
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/x86/purgatory/purgatory.o
gcc: error: unrecognized command line option '-fsanitize-coverage=trace-pc'
make[1]: *** [arch/x86/purgatory/purgatory.o] Error 1
make: *** [archprepare] Error 2


We can't break allmodconfig and allyesconfig!

I did this:

--- a/Makefile~kernel-add-kcov-code-coverage-fix-2
+++ a/Makefile
@@ -678,6 +678,7 @@ ifdef CONFIG_KCOV
   ifeq ($(call cc-option, $(CFLAGS_KCOV)),)
     $(warning Cannot use CONFIG_KCOV: \
              -fsanitize-coverage=trace-pc is not supported by compiler)
+    CFLAGS_KCOV =
   endif
 endif
 
but hopefully there's a better way: it's a bit silly to build in the
kcov code but to not have the compiler-generated instrumentation which
calls it.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v8] kernel: add kcov code coverage Dmitry Vyukov <dvyukov@google.com> - 2016-02-04 16:50 +0100
  Re: [PATCH v8] kernel: add kcov code coverage Andrew Morton <akpm@linux-foundation.org> - 2016-02-04 23:40 +0100
    Re: [PATCH v8] kernel: add kcov code coverage Dmitry Vyukov <dvyukov@google.com> - 2016-02-06 13:40 +0100
  Re: [PATCH v8] kernel: add kcov code coverage Andrew Morton <akpm@linux-foundation.org> - 2016-02-05 01:20 +0100

csiph-web