Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp682061ybl; Wed, 11 Dec 2019 06:00:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwSRX2bmoVEfzO51dLWQtr4iI4tuNORBdY4vDqw53ZuNFJ6BC/QaZcOddSjjLZOs2poe0HG X-Received: by 2002:a54:451a:: with SMTP id l26mr2929949oil.69.1576072832154; Wed, 11 Dec 2019 06:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576072832; cv=none; d=google.com; s=arc-20160816; b=ftzWvx9yEO6wj0TB/XwwX7AtdAwj5Jm5945wO5636cciZ1Gq/V5ZO7vIP8cQGV0ixY LyDfHbe+hTLRBqo3Hgj+3YUSMxjLefxzC90MAmcEoxOM2gmVFeGXTjStuw5EayOtuSgI zquoFmqRRG1FRmM/I/BiRack0k/wDnHaGtQhkESIvqjvQVmwj4KcpE/aARZ/mZbrXcQV J/UhjY355Z/LHnqRj+8n39lJCL90KzINwDtnOPR0+a3IIauC5bjI39sNloVctNcFmjXf YLFQb1DoQLW3i1Og1A65MBd0mLsuFqwnIm0nhaDDGY/Yx4YnGm+IzJLFGAN2Zo7zXqO7 5opw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=STaNEtWndnwuAqqhmXVnDhNs+/7QG3rCPR52EQWWaas=; b=FTEn57u97hyL3ZQfjYrqQyYHrhwGjd1iuOXL9D+S0LvwanwY0gwO8xH+8iymD5sJf0 tlMs8nzudQhMOg+z+s2DEfwjaRBTuxAlZlQ+5EgoEl6QJtcLFyIk6aoN39JZkpGvpghL NVY5E5nxipjDvaHLwzTsDGFhl2xbfPDo+QS6fivQzPw67nB2/5/ugBT65ArDyYEefaUh QVMIQfZSRkv0G/lSGk9+WPL/Hp960vxfrrGdd8v3QDXR1HQNPZAx4AfUBwZZELrN3dLc Hmg77vXMAGbk9K0lE8aCMKZkuZDlZ3nO1e6s1a7NSwstmfDRz6SiadJV2+KMJUn62AUX EK1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H8UZouch; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h138si1096936oib.6.2019.12.11.06.00.11; Wed, 11 Dec 2019 06:00:32 -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=@linaro.org header.s=google header.b=H8UZouch; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729701AbfLKN7h (ORCPT + 99 others); Wed, 11 Dec 2019 08:59:37 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:34541 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729513AbfLKN7h (ORCPT ); Wed, 11 Dec 2019 08:59:37 -0500 Received: by mail-wr1-f68.google.com with SMTP id t2so24173867wrr.1 for ; Wed, 11 Dec 2019 05:59:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=STaNEtWndnwuAqqhmXVnDhNs+/7QG3rCPR52EQWWaas=; b=H8UZouchmiK0Y13YNR0SwBb+PKetsAbTms3YnTspLwes/xLjaIGRijl06ZP9T/cWhL eL0jssfAK++uUWsJ+aOMGrdnzq5QH1jQtnzTzB7dj1tfmDziq8+BoZkfyIlaxdyE9CCM GhWR+kt0PNgI+E5NjbSENGvL/yWvUasNFalqQGuFTAFdKkC7vMpxIs0RUu9RsRN0lvuu uH8cbM+Pt3j+q9QsbwWwSwa/iQB592ABHABHAEDd1WH8FCeLFHyQOdCaCqYOEyAhFTlU P/ODSOaB2X7AKgLJo11KL20XSy761EVB73m9jR6fgcPYgmX0mTlkwrTkUagSHh22wNFG qEYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=STaNEtWndnwuAqqhmXVnDhNs+/7QG3rCPR52EQWWaas=; b=C1N4v/fz2eCmDlFHwmgpNneY1V41SRxtf01C3czB9mUuTeMdpgr7OgL4aVWSzvMx7A KGhJOxiSo7DLPb5qaBzFLTy3F/RcPaPnd9EV2fnUCXH2wXMjeoX+V0pHyNCXszXRuQTE sSkFR7TDTid59bNXDFszdDlUhZjOsV16jCmYSgYHKQwUMU1RnPOkxIe1h82XMe4PeD/T kRFkssd3qr1iPjKkNJCAQ+PDm9fEecE0WCQQxKsp0fi+PGgrhZeVUiRzhHOe1X/puWt5 IWMCytDaJyNHTRLiggQ/EZJ10PoTr0MxlMGDXWKIQxafQzwTdO+ebVTez/S3eByfKah3 hNRQ== X-Gm-Message-State: APjAAAWjaYbdfFW05AuLyBru3L2ya0xsw2Etuub7ZzZxZOJTDSusnlyx +06Nr6XCAPRhc6huV5BYIoWYtLVVqKvHBDZJukFlWg== X-Received: by 2002:a5d:46c1:: with SMTP id g1mr3933196wrs.200.1576072774421; Wed, 11 Dec 2019 05:59:34 -0800 (PST) MIME-Version: 1.0 References: <20191211133951.401933-1-arnd@arndb.de> In-Reply-To: <20191211133951.401933-1-arnd@arndb.de> From: Ard Biesheuvel Date: Wed, 11 Dec 2019 14:59:23 +0100 Message-ID: Subject: Re: [PATCH] gcc-plugins: make it possible to disable CONFIG_GCC_PLUGINS again To: Arnd Bergmann Cc: Kees Cook , Masahiro Yamada , Emese Revfy , Ard Biesheuvel , Andrey Ryabinin , Kernel Hardening , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Dec 2019 at 14:40, Arnd Bergmann wrote: > > 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 > --- > scripts/gcc-plugins/Kconfig | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig > index d33de0b9f4f5..e3569543bdac 100644 > --- 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 > -- > 2.20.0 >