Received: by 10.223.185.116 with SMTP id b49csp1056048wrg; Fri, 16 Feb 2018 11:36:28 -0800 (PST) X-Google-Smtp-Source: AH8x225ahL2Z1pxA/N960QamryskHI9IYRka5vysNglRA5+4Rp9ilO4U/sEgVinPikVNoCmzhIqW X-Received: by 10.101.77.12 with SMTP id i12mr5848771pgt.75.1518809788685; Fri, 16 Feb 2018 11:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518809788; cv=none; d=google.com; s=arc-20160816; b=Ke9aRuxe5K5vo3w4ZdWrZJnkX2a94AxuoL4UNsXnFNPwVfLL9DoRloGIqFPqYvdCre OZ1Qfjt7/nSk3QMI624m9FtO7PcDUHRDyxu3nPbvAj04nVpcV43fZITk5Lv6FC/TOnUn BUOKGa4Ie8o3+HvQziQULAYLzqY8/3o9FVw8NGjt0mSL54m2BLUeH3Tt+7Ya3uqT8Nm5 1eyavyWjZKrzw9ISBX5thSiuNp2sddleSp2Whynw6veUGEX3DjE95+1n00ZzapVHRLqj wykoHDkZ5C9flilMoYDDiR07x042WYv8soVJzsY+sg7UMasL5JvDZpnwdYMamvaIDyZ9 z8lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=NNUronc0b0DxbhAtpAXfRP7LuUaytEfPMCerNrVvsRI=; b=TddiPralABl7H8dgN6c28Nl1svXXySzAuRANuJVEdCqyRzZUmQ/lE4lIWNWtBiWvUC wRyqgI4Gn54EsJK9WvwhddKkSTzuAQFhW6fiwNhAGISgYa5EwEtIy9R7MRwPtA/Q1xRC IJD0pYazNMZAQ3CwXS3pXqwav/sleRA3beufXlHrUZGQ7M6E/s3quHORq3S3NKkMBziN B7qyirISULhaZD9HFSN1g3nUhVit2+5QMcIJ3Dx/qDjw/kKKQ6SQK2NQ7w8HeFevHPIP sxJosDWiH3id8tKE+Iay4V/Url7ncyy2qjWnka+AyLqPZVTrkbeIbc4Qz+zn85aGa+ky hlNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=c1puTWxM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si991pfg.246.2018.02.16.11.36.14; Fri, 16 Feb 2018 11:36:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=c1puTWxM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbeBPSpP (ORCPT + 99 others); Fri, 16 Feb 2018 13:45:15 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:57779 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752696AbeBPSlT (ORCPT ); Fri, 16 Feb 2018 13:41:19 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-07.nifty.com with ESMTP id w1GIdBTM013418; Sat, 17 Feb 2018 03:39:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w1GIdBTM013418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1518806370; bh=NNUronc0b0DxbhAtpAXfRP7LuUaytEfPMCerNrVvsRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1puTWxMB8foCOL8AnvAnR43Xew+G3qCSfx3UlFvqoqGb9RTflHT4AB5+KHdhNxDv ShU0lwSrmFF951Zhcnz03u/0u2u9p8duLbCp9YPf7ZxycuCwEeHYyPlzbRP4Zvb2IN cjguVqLP2uZWO8tBn3lUwDiEbAoYvQ/xBBHeZKoYQIu4B+K8Vm0yYjfp+MqsSYJM1h Gj3zjy7n+wNASruivcmIMxqJTkeu/JqeT6Zcu2ZxJzjRb/QJ/BChlcQ94Vj82eyn/3 cJkAw0FzyW9JLfiF9e0x6DeIw/o4G8CNqxXpdgryrmDwpUteH/MhBlgNtj1QEccFTV kWW5oUATERAXw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Greg Kroah-Hartman , Arnd Bergmann , Kees Cook , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Michal Marek , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 19/23] kcov: imply GCC_PLUGINS and GCC_PLUGIN_SANCOV instead of select'ing them Date: Sat, 17 Feb 2018 03:38:47 +0900 Message-Id: <1518806331-7101-20-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> References: <1518806331-7101-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As Documentation/kbuild/kconfig-language.txt notes, 'select' should be used with care - it forces a lower limit of another symbol, ignoring the dependency. In this case, KCOV can select GCC_PLUGINS even if 'depends on HAVE_GCC_PLUGINS' is unmet. 'imply' is modest enough to observe the dependency, and this makes sense. If you enable KCOV, you will probably want to enable GCC_PLUGIN_SANCOV, but it should not break the dependency. I also remove unneeded code, I just happened to notice. Signed-off-by: Masahiro Yamada --- lib/Kconfig.debug | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 6088408..1216ce6 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -743,8 +743,8 @@ config KCOV bool "Code coverage for fuzzing" depends on ARCH_HAS_KCOV select DEBUG_FS - select GCC_PLUGINS if !COMPILE_TEST - select GCC_PLUGIN_SANCOV if !COMPILE_TEST + imply GCC_PLUGINS + imply GCC_PLUGIN_SANCOV help KCOV exposes kernel code coverage information in a form suitable for coverage-guided fuzzing (randomized testing). @@ -758,7 +758,6 @@ config KCOV config KCOV_ENABLE_COMPARISONS bool "Enable comparison operands collection by KCOV" depends on KCOV - default n help KCOV also exposes operands of every comparison in the instrumented code along with operand sizes and PCs of the comparison instructions. @@ -768,7 +767,7 @@ config KCOV_ENABLE_COMPARISONS config KCOV_INSTRUMENT_ALL bool "Instrument all code by default" depends on KCOV - default y if KCOV + default y help If you are doing generic system call fuzzing (like e.g. syzkaller), then you will want to instrument the whole kernel and you should -- 2.7.4