From patchwork Fri Apr 13 05:06:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 133327 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp346543ljb; Thu, 12 Apr 2018 22:11:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx48L34YFqUtQ5kfFa5KruqYZfKMN/JkooP3F/pevfEn6le9ZAfhKB3VGg9fd4ZKThu8s/Yph X-Received: by 2002:a17:902:30f:: with SMTP id 15-v6mr3800541pld.365.1523596315225; Thu, 12 Apr 2018 22:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523596315; cv=none; d=google.com; s=arc-20160816; b=t2hGIBJl6PU2aq6QTJxrZQf6j0U/4eX1z8UZqRCHHa26qY6vSUOIig5/eiAzfURBNA w98ul15bquTHNC98om9XUpyCJgdaa2LUV3KdioQhETAmTm1Vvvt2rnbC/zczDunxbxWN nQYjPrBJ6p8j6YG36ncnXGdER793URh2gHVBrrDv3vOV9FV81RNTLjM2sU8IyEdVLfuX /H7oVygfluiJ2DXVbGE+HO1jaIdgir+Oql5e+P3SwowojVD0D9pOvKcsoLWvUu/JzAUj GlQmYmCTNkK3YvWrxmNjlwtRGO6Y8mqyvLITeFR5lHlhORDQ+zOHkHMb7DLPD5WgHhnl JYnQ== 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=nudY1K8WMveNcJteVTbrIjEri2FTAVU/SMH55MObhu4=; b=qUnBtZAPVwq+84qtL77FEy5KD9JXvYhniNfUAWjweG8MKhHE0gOMEm0KYk+eWL9PaN Lzf5t+1p2WPwTBkVld411admej2NHmr0U1Zmjsl2m3LuubA5JhRXX4hZGPJwalK3HCwt ygalWpSYjssiOZC0gQRAzZYTi58chAU33QPXIYpoUxxx98stJP7XGO9aQF1Iwq/CAqZ3 wKCRKcCU/yJI6HErfhXCHBJaIV7l/6uaJlrAiskYZ2OFf6DMaMDTqMMdl4uUxNWq3woZ wcqVKDbzw4zaJWOZ5Jai63GK7wWHrW8KHmxjtOYlxF7GxGGdJyJBTg3+YSRl/0lPPsVN Cbpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kTv6aHXe; 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 v145si1745943pgb.203.2018.04.12.22.11.54; Thu, 12 Apr 2018 22:11:55 -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=@nifty.com header.s=dec2015msa header.b=kTv6aHXe; 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 S1751776AbeDMFIU (ORCPT + 29 others); Fri, 13 Apr 2018 01:08:20 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:54459 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeDMFIP (ORCPT ); Fri, 13 Apr 2018 01:08:15 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id w3D56lft029209; Fri, 13 Apr 2018 14:06:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com w3D56lft029209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1523596009; bh=nudY1K8WMveNcJteVTbrIjEri2FTAVU/SMH55MObhu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kTv6aHXeRAaBr7EKLtTscht01iZYn60wdvsttXo3cXUjftIC6JTnXQwUYtbg1cClJ U1fr8g/cjCgsMmmQYC/20I4CA8iRYa2YMRXQ6c94ViKejlGL4UHgRipwIiNtFZyI7F EFG0bY9ZrHYDDib69bJ2zpZcAXWNqAByU7QKG7fiNpaMm0DyuhkM834J1KEBZxdFJ3 Yao8t37lx8pq+XmBJEPXqLa3PT57hczl2hZnrRtjJwisVw2F2jGXQHl3syTqwi6vcb fOfCPC5HkB79j7Ok4A59dlfy4PmTXXiJfnN6rAM4zwPZm/3F6tRElmBKvL7PSygAtB IFm68c36QYYBA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Linus Torvalds , Sam Ravnborg , Ulf Magnusson , Nicholas Piggin , Kees Cook , Emese Revfy , x86@kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 01/30] gcc-plugins: fix build condition of SANCOV plugin Date: Fri, 13 Apr 2018 14:06:10 +0900 Message-Id: <1523595999-27433-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523595999-27433-1-git-send-email-yamada.masahiro@socionext.com> References: <1523595999-27433-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 Since commit d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp"), you miss to build the SANCOV plugin under some circumstances. CONFIG_KCOV=y CONFIG_KCOV_ENABLE_COMPARISONS=y Your compiler does not support -fsanitize-coverage=trace-pc Your compiler does not support -fsanitize-coverage=trace-cmp Under this condition, $(CFLAGS_KCOV) is not empty but contains a space, so the following ifeq-conditional is false. ifeq ($(CFLAGS_KCOV),) Then, scripts/Makefile.gcc-plugins misses to add sancov_plugin.so to gcc-plugin-y while the SANCOV plugin is necessary as an alternative means. Fixes: d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp") Signed-off-by: Masahiro Yamada --- Changes in v3: - newly added Changes in v2: None scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Acked-by: Kees Cook diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins index b2a95af..7f5c862 100644 --- a/scripts/Makefile.gcc-plugins +++ b/scripts/Makefile.gcc-plugins @@ -14,7 +14,7 @@ ifdef CONFIG_GCC_PLUGINS endif ifdef CONFIG_GCC_PLUGIN_SANCOV - ifeq ($(CFLAGS_KCOV),) + ifeq ($(strip $(CFLAGS_KCOV)),) # It is needed because of the gcc-plugin.sh and gcc version checks. gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so