From patchwork Fri Feb 5 00:14:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 8229481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5EEE39F3CD for ; Fri, 5 Feb 2016 00:17:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B6AD2039D for ; Fri, 5 Feb 2016 00:17:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B059C2022D for ; Fri, 5 Feb 2016 00:16:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRU3E-0002on-AD; Fri, 05 Feb 2016 00:15:04 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRU3B-0002bx-Ep for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2016 00:15:01 +0000 Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 82324FAA; Fri, 5 Feb 2016 00:14:39 +0000 (UTC) Date: Thu, 4 Feb 2016 16:14:38 -0800 From: Andrew Morton To: Dmitry Vyukov 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160204_161501_543835_09C16C55 X-CRM114-Status: UNSURE ( 7.25 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: vegard.nossum@oracle.com, ryabinin.a.a@gmail.com, ard.biesheuvel@linaro.org, catalin.marinas@arm.com, kirill@shutemov.name, keescook@google.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, quentin.casasnovas@oracle.com, kcc@google.com, edumazet@google.com, syzkaller@googlegroups.com, glider@google.com, taviso@google.com, bhelgaas@google.com, sasha.levin@oracle.com, jslaby@suse.cz, drysdale@google.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 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. --- 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