Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7481ybl; Tue, 7 Jan 2020 13:03:04 -0800 (PST) X-Google-Smtp-Source: APXvYqzqIWS83+idaYE+KN246dLFYLhrvGCyCWjWzG1g4f0ZcrV8jJGgdZ2rmBD6xKCJDEC0aUP/ X-Received: by 2002:a05:6808:8d5:: with SMTP id k21mr301691oij.121.1578430984194; Tue, 07 Jan 2020 13:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578430984; cv=none; d=google.com; s=arc-20160816; b=YG3YGwlkDMLNYRwvBz/6MjXOJfn3rsJhqC0Nt9820ZBb4PwpcLKuRPxlblIKmhbDZK wgOHXbrhlUcIQfuSyuQi7U6m2yXe/YS4N1UV9Z1182hs1ZCKby51nf6Yf168C2v/EJb9 TSw+ym7FSKbUEZZ8oQB9oaHvwug3gw4/Mex0sSsaqELcYU0odILF17A7x/QZO+VTCLwC R6yHpEgcJVPPLqxTYn/+jVgg5qzV5DL0F09zXOML/18auik8DP8o9OvnaNJDcuihW1pA DfQFC+GsgkQdZJ9n0ehu3w13GDJYQlRWZIzNrfBkocgyfx4aOBQCs0HWzwVI37Qi4nmJ WJGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BL194MqlSb2L1Yr1f25k5qqO4UOlHfJc1mK86HBrCrk=; b=nKRJNGh/ErAhuPv2c7WsGXqjrVNtkjZRcwAE762Syh+myqNg8Ni459BL4Dj5hqTpGR fNFsHOG9TMVYDUG65cJyyglunh5ZO6RhGhJVrnEiHaruj9YuvMSQvg1wkyae2a1fE2aa 14LB2cDg3mNKxU5i6Qub9x1Cy7pOmdmexLbcF4pmhTSuETgSya82v0x+huKHbIkLTRGw bpCmvnphSP7hz6YUitfSBAc+4JILivQFe8QDXC64dAY9NIp4Pj0Ul7FiPddrkxotmhfZ ZCIvCEiiJbJwkdkV8T7PJZyf1X1vtQRMbNIPa0R1c3gkgdgnBe23LGNggGEdW6oJGVnT R8sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vGxWRkqh; 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 u21si578872oic.263.2020.01.07.13.02.47; Tue, 07 Jan 2020 13:03:04 -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=@kernel.org header.s=default header.b=vGxWRkqh; 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 S1728185AbgAGVBQ (ORCPT + 99 others); Tue, 7 Jan 2020 16:01:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:37692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728145AbgAGVBF (ORCPT ); Tue, 7 Jan 2020 16:01:05 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 83BED21744; Tue, 7 Jan 2020 21:01:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430865; bh=YLoaA4tNyNuuKDFt662/r/YVwrSW+OM1l9CULpRehWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vGxWRkqh++CBtaz+XaB4RjcNfY3spXxi98ghqpTcCfzjePLEmVZF3EY9ksnQ27pa6 uGNHVhKrmKM3eFnlOqUAzwJM1IMP5Lv+zeWz3ZeYeNtqjTbiC+hKlzy6rqaix+QN9a Vw7Q5GxvOc8OvWbhT1LrzUZ6sUXCtf8KzTXQU4Sg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ard Biesheuvel , Masahiro Yamada , Kees Cook Subject: [PATCH 5.4 091/191] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again Date: Tue, 7 Jan 2020 21:53:31 +0100 Message-Id: <20200107205337.866321051@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205332.984228665@linuxfoundation.org> References: <20200107205332.984228665@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit a5b0dc5a46c221725c43bd9b01570239a4cd78b1 upstream. I noticed that randconfig builds with gcc no longer produce a lot of ccache hits, unlike with clang, and traced this back to plugins now being enabled unconditionally if they are supported. I am now working around this by adding export CCACHE_COMPILERCHECK=/usr/bin/size -A %compiler% to my top-level Makefile. This changes the heuristic that ccache uses to determine whether the plugins are the same after a 'make clean'. However, it also seems that being able to just turn off the plugins is generally useful, at least for build testing it adds noticeable overhead but does not find a lot of bugs additional bugs, and may be easier for ccache users than my workaround. Fixes: 9f671e58159a ("security: Create "kernel hardening" config area") Signed-off-by: Arnd Bergmann Acked-by: Ard Biesheuvel Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191211133951.401933-1-arnd@arndb.de Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- scripts/gcc-plugins/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/scripts/gcc-plugins/Kconfig +++ b/scripts/gcc-plugins/Kconfig @@ -14,8 +14,8 @@ config HAVE_GCC_PLUGINS An arch should select this symbol if it supports building with GCC plugins. -config GCC_PLUGINS - bool +menuconfig GCC_PLUGINS + bool "GCC plugins" depends on HAVE_GCC_PLUGINS depends on PLUGIN_HOSTCC != "" default y @@ -25,8 +25,7 @@ config GCC_PLUGINS See Documentation/core-api/gcc-plugins.rst for details. -menu "GCC plugins" - depends on GCC_PLUGINS +if GCC_PLUGINS config GCC_PLUGIN_CYC_COMPLEXITY bool "Compute the cyclomatic complexity of a function" if EXPERT @@ -113,4 +112,4 @@ config GCC_PLUGIN_ARM_SSP_PER_TASK bool depends on GCC_PLUGINS && ARM -endmenu +endif