Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3703751imm; Mon, 18 Jun 2018 02:37:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJGcWQhsCKqSTsudsD3Sf2q8PeuhnZwsbrV0+eq8EuEraRj2JfUaJUBji1cxnQnA7N6Qq/8 X-Received: by 2002:a63:6142:: with SMTP id v63-v6mr10104035pgb.390.1529314663345; Mon, 18 Jun 2018 02:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529314663; cv=none; d=google.com; s=arc-20160816; b=ydil3vm0TFVmK3khWzExBIC9hTT/uNOUawLgQRgosdDUHpWCnmbf3NRwRDYgOUgBdg JWMKCe1GsEyr17fTQMpwDZKvEsFGIi5lIEmheH8R03vuxwe663g/KGiZOImpylBqIp+N wmqPV1fzj/M3xRmGjhLE9+HiL8SfBM9JbpTowauMUUJWTnyUsw25rqAwskUBhjAtiuXH umNcOGMTHwE+XcI9tLTh6/EObsxoqoONIEA8mDWxn/H2jmxZdCV5ADAWmbB02R3El0T+ E8AgSZK8WVsnir7s/qWx0c4mkqSo+i4OagwDKPOER11IKnogE0geIUuA5TnAg3wfYVGl b5bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=tnqMahbRWcDQ02DgulnFRhyN/5/yx3ocIeKiVZV9syc=; b=f1t2GMg+5F4oxuk6ZC/qQvPRR+o4tAACnJLMXG4MO9wj1c8cjdSlNn3n0Nmuc9TGKG hV+wfBLhRYbAfai6d8qukIjnOlcVx/bqSluEiLpWo785C42fFxXhEjuVgaC7C8jQm6Cv Riq2UrQqt9lQkS8w8UuF2bLsmhYNMf0LlHHIMbCP2Az1xIiMaTCc4z44gciq3HpH8IsT vVkFxqpaUxZ/9SODgOj2bFiwwjxW6r2jEzfIVHwk8oT11LrZchBHpgOk5sqZWyLuI5Mp L0mTmHjB6vI2Det5OorBbT+CH0v5zP7DA9rv3/XzckTE3wCx7TRi8IoFDlXECEMgtPh8 tDRw== ARC-Authentication-Results: i=1; mx.google.com; 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 w21-v6si14282525plp.199.2018.06.18.02.37.29; Mon, 18 Jun 2018 02:37:43 -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; 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 S964990AbeFRJgy (ORCPT + 99 others); Mon, 18 Jun 2018 05:36:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55892 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935942AbeFRIXt (ORCPT ); Mon, 18 Jun 2018 04:23:49 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6452FC5C; Mon, 18 Jun 2018 08:23:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Kees Cook , Sasha Levin Subject: [PATCH 4.16 185/279] gcc-plugins: fix build condition of SANCOV plugin Date: Mon, 18 Jun 2018 10:12:50 +0200 Message-Id: <20180618080616.594507233@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Masahiro Yamada [ Upstream commit 642ef99be932c4071274b28eaf3d3d85bbb6e78c ] 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 Acked-by: Kees Cook Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- scripts/Makefile.gcc-plugins | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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