Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1142276ybl; Tue, 13 Aug 2019 08:02:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrXC9Q8DoIR8alELyxomcVn4WPw38q0aUHOzA7RSkUBCsiR/b6NKDy9aGNgZ6lKEa0DeC7 X-Received: by 2002:a17:902:9f93:: with SMTP id g19mr37779036plq.223.1565708555413; Tue, 13 Aug 2019 08:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565708555; cv=none; d=google.com; s=arc-20160816; b=z1rlDEe6rolO5Issqh2/cTnRZbffOcNvFEmR7PrNgAEyAvV1DZB78vzNpOu5Kyp8J4 XJx7iag6v5BINLu7Kj4UywsKWRcOaGannNZcU4GSfkEHb2MoFFdG1jGQfKoxJYB+/g5N p+a2+ioEL4oAPS4rJp2gAyGAPi/eY+Cjb561KrUK+ajTHv8Nbv0UJWQSPa0n9joPUaz9 1p3CE/i0UiJHLBx70wzLW5rxnfjmz318In3Lwhyp0NpSMSyavycZ4mkA3yQplHckwCvb B2LLh76UlOMth1knAXyYYkOYZdy9XtGD7OhmJc5S425bpjen5QxYI8uh+Di/HBptrS7E 6s5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Dl4zVREy4GL+zTPrnysS4JlC3AXp76Unucw3J+BxEXY=; b=ddKOXe8V/6A5iRP6xcO7M+qeNV3AGHTjMxeC5TRP4H+oWunzawqCPugDwv2NCs4gi0 /zfecLVdLxBnVOel3GRZp+KfUDlp5xvep3JJvA/6G7gFYw1nYcwA5mqhtAL1DZiXONxm A3HgO2mSqut1K11o/Tjgob36u1bRcO2Ps3Dow/ySifeIoqnnJh9o3KDGVQEOIXNmE1Vq EO6O1GMxi6rPbPWmtPEQYzPIhOaEyFiEHMkr4PdTyxcIvfmwlip7JxS6+wyOVY93MMk7 Emec1cykJeep0eg2eLzBkuHqgQKV+AeIe1ANWMdHJJxerZNLUNt3BxrLU2WP9g6iAubX huIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HfdlKLK7; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2si5368739pls.175.2019.08.13.08.02.18; Tue, 13 Aug 2019 08:02:35 -0700 (PDT) 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=@chromium.org header.s=google header.b=HfdlKLK7; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729883AbfHMPAz (ORCPT + 99 others); Tue, 13 Aug 2019 11:00:55 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:34403 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729424AbfHMPAz (ORCPT ); Tue, 13 Aug 2019 11:00:55 -0400 Received: by mail-pg1-f196.google.com with SMTP id n9so45177351pgc.1 for ; Tue, 13 Aug 2019 08:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Dl4zVREy4GL+zTPrnysS4JlC3AXp76Unucw3J+BxEXY=; b=HfdlKLK7w5ckYWTiIAzA/VwjXyExjaFSKoh7zzeDJPrIWm6F5UJ3581EHNU4Zr+p/p LKtfzmYDqbq8e9GirSLRDUTaIGLRyk//tHb+E/npw4iLXU48CvIEHVjQdaTYHZKekBiB tzmV0Kwef9RmZK+5l0x0sOexOKP018DtqrLJk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Dl4zVREy4GL+zTPrnysS4JlC3AXp76Unucw3J+BxEXY=; b=jBXeYO2+dV4m38zZb1G9PZ4rzMii3ifo5i9XJNpdDZ4AHA/8UlP3WxsMIsNNJJJvD2 jAgVqMMFT/ha6CCt+AQRGkQLuduwdOKRY/xQbZfdvTsZ+kRcfQ18hotg0kFnGTkfSgC4 km2bws28ABxrVMLzOAteQm81vxQ9NupCkvzSy+CQPL6SBvuOgJ33JVucQk8oxGFPWrcm BiqoC2B4z4aRuDnpBkOYsiym21oBK0ChKRZEEu2e8LMOxC+XgGFhDd96jIrnOR5zCVHV g3ttp9/Z/O5LdOyq8Q+k2gtW8+yUS/YLN3YvwU7biKhl7K53N8m18TU3be7EXfqVHc0v bF2g== X-Gm-Message-State: APjAAAXHkDxYPXp57CYg8laervq7ObYEjSFjzVnHl+Yvru2ioI4xi652 Lfz4Vgym0TYvS0Yql6kvA1S5UQ== X-Received: by 2002:a17:90a:9f46:: with SMTP id q6mr2558368pjv.110.1565708454954; Tue, 13 Aug 2019 08:00:54 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j15sm107632196pfr.146.2019.08.13.08.00.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 08:00:54 -0700 (PDT) Date: Tue, 13 Aug 2019 08:00:53 -0700 From: Kees Cook To: zhe.he@windriver.com Cc: re.emese@gmail.com, kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org, Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: Re: [PATCH] gcc-plugins: Enable error message print Message-ID: <201908130755.A44C39B46@keescook> References: <1565689489-309136-1-git-send-email-zhe.he@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1565689489-309136-1-git-send-email-zhe.he@windriver.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 05:44:49PM +0800, zhe.he@windriver.com wrote: > From: He Zhe > > Instead of sliently emptying CONFIG_PLUGIN_HOSTCC which is the dependency > of a series of configurations, the following error message would be easier > for users to find something is wrong and what is happening. > > scripts/gcc-plugins/gcc-common.h:5:22: fatal error: bversion.h: > No such file or directory > compilation terminated. > > Now that we have already got the error message switch, let's turn it on. > > Signed-off-by: He Zhe Hi! Yeah, this would be helpful, but unfortunately it would be very noisy for many people who don't have the GCC plugins installed. It used to print error messages when it was a selectable Kconfig option but now that it is autodetected, we can't show the errors unconditionally. I would love to have some kind of way to answer the question "why isn't this option available?" in Kconfig. The best place for this might be in the menuconfig search option, but I'm not sure how to wire up other things like it. -Kees > --- > scripts/gcc-plugins/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/gcc-plugins/Kconfig b/scripts/gcc-plugins/Kconfig > index d33de0b..fe28cb9 100644 > --- a/scripts/gcc-plugins/Kconfig > +++ b/scripts/gcc-plugins/Kconfig > @@ -3,7 +3,7 @@ preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX), > > config PLUGIN_HOSTCC > string > - default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC > + default "$(shell,$(srctree)/scripts/gcc-plugin.sh --show-error "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC > help > Host compiler used to build GCC plugins. This can be $(HOSTCXX), > $(HOSTCC), or a null string if GCC plugin is unsupported. > -- > 2.7.4 > -- Kees Cook