From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965472AbcBEAOo (ORCPT ); Thu, 4 Feb 2016 19:14:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40315 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757732AbcBEAOk (ORCPT ); Thu, 4 Feb 2016 19:14:40 -0500 Date: Thu, 4 Feb 2016 16:14:38 -0800 From: Andrew Morton To: Dmitry Vyukov 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 Message-Id: <20160204161438.a6c7fb568a00a42c179a20de@linux-foundation.org> In-Reply-To: <1454600441-70701-1-git-send-email-dvyukov@google.com> References: <1454600441-70701-1-git-send-email-dvyukov@google.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Feb 2016 16:40:41 +0100 Dmitry Vyukov 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.