mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: syzkaller@googlegroups.com, vegard.nossum@oracle.com,
	catalin.marinas@arm.com, taviso@google.com, will.deacon@arm.com,
	linux-kernel@vger.kernel.org, quentin.casasnovas@oracle.com,
	kcc@google.com, edumazet@google.com, glider@google.com,
	keescook@google.com, bhelgaas@google.com, sasha.levin@oracle.com,
	drysdale@google.com, linux-arm-kernel@lists.infradead.org,
	ard.biesheuvel@linaro.org, ryabinin.a.a@gmail.com,
	kirill@shutemov.name, jslaby@suse.cz
Subject: Re: [PATCH v8] kernel: add kcov code coverage
Date: Thu, 4 Feb 2016 16:14:38 -0800	[thread overview]
Message-ID: <20160204161438.a6c7fb568a00a42c179a20de@linux-foundation.org> (raw)
In-Reply-To: <1454600441-70701-1-git-send-email-dvyukov@google.com>

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.

      parent reply	other threads:[~2016-02-05  0:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 15:40 Dmitry Vyukov
2016-02-04 22:30 ` Andrew Morton
2016-02-06 12:30   ` Dmitry Vyukov
2016-02-24 11:26   ` Dmitry Vyukov
2016-02-05  0:14 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160204161438.a6c7fb568a00a42c179a20de@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=drysdale@google.com \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=glider@google.com \
    --cc=jslaby@suse.cz \
    --cc=kcc@google.com \
    --cc=keescook@google.com \
    --cc=kirill@shutemov.name \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quentin.casasnovas@oracle.com \
    --cc=ryabinin.a.a@gmail.com \
    --cc=sasha.levin@oracle.com \
    --cc=syzkaller@googlegroups.com \
    --cc=taviso@google.com \
    --cc=vegard.nossum@oracle.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®