Received: by 10.192.165.148 with SMTP id m20csp229315imm; Fri, 4 May 2018 09:21:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrTFGMu0KOEvL70a6/hadD5S9d3C53IgHT65maII4Mdbz494fkZ7deA4jBrOWkZC1EQvLky X-Received: by 2002:a63:3f06:: with SMTP id m6-v6mr23354762pga.340.1525450908134; Fri, 04 May 2018 09:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525450908; cv=none; d=google.com; s=arc-20160816; b=MuA9uqY5GFrZeBknduomPb7QTIWzj3Led1m9b/4+K/xnieAqeC3+RHJvXxWCuZA5cW 8Csxd8s5oknsmsaBjr24Fei3x/JNLKI9MEFQTHzo6rfavImhmGqaRKR4qoxNkaQHo7MK SIelHug+qAYFs16jxhwdtD3yOow5mtP63jkqQKCO8n45gW+vvp0E7h2zd9y0qyZ3elE2 s/ToOdhCgQDnH3UCoRM/d9gcwr7j544IynN7499qrDU1AZoi/YUz5DqB1m2Md7t0YKjc H66wSAR43LZnCM5S5ZfFKPg37HbmGWUH1/eJMmJQRq+QrPgR/kk0eMQuKMtZk9YWwaFD 45Kw== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=MXBGC51HkA4fkFjRnDIBE1yW1pfiyW2+xrMRYGdg++s=; b=x93ByAOPdcc7iF6dOO35iuKSmPkBIHhuBsSyDSBzfoHfaa8pNkgu2oc7tV2wOe9Seu u/PDshL7tnkIFIoleWftJnLFwRVkP0XPqI1a+qQa3o8GzG5iqjQ0Bs3j8gzaQHXWqlTd SKSQpTc3xK80UAVczlbuYhEVaBy2xWnpt1sGIqkIIDsa/IhJ5do+GKElP+BiaNbiTa79 kIV5c/jBedBmDxjqWJV6BBI68xqcQfKcVcYpknxbnrxfegdfiKNCW8AmnOfSK7AOyZIk EjP22+8trThapR87d4wwESOpfZp5A3F/RbNNX5vbU+xDY1WlCxJL/lB/tq6dYjE8zmK5 Xnbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=MGBLr4UX; dkim=fail header.i=@chromium.org header.s=google header.b=cenQ4Jkl; 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=fail (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 x30-v6si13872010pgc.309.2018.05.04.09.21.34; Fri, 04 May 2018 09:21:48 -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=fail header.i=@google.com header.s=20161025 header.b=MGBLr4UX; dkim=fail header.i=@chromium.org header.s=google header.b=cenQ4Jkl; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbeEDQVS (ORCPT + 99 others); Fri, 4 May 2018 12:21:18 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:40876 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751492AbeEDQVQ (ORCPT ); Fri, 4 May 2018 12:21:16 -0400 Received: by mail-vk0-f65.google.com with SMTP id x204-v6so13693786vkd.7 for ; Fri, 04 May 2018 09:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MXBGC51HkA4fkFjRnDIBE1yW1pfiyW2+xrMRYGdg++s=; b=MGBLr4UX6ceVBlmSZCDZWmYy95RiQCfohwEDErWYyzsIKvLLiR00tcdMNGfcdRxhWN mVD0bYkVAFC3OFGmxhx3OWcSppmkDSSgHtAoWmdR/pLqJevXR+mEEeiKsTCT83qZjiyU j9d72W+BxroRLG6t4orWYBT42dGX0ef8KZZZCI5MSfHwzvwTiF+OP4ERBuXgE0K87RM8 rABtPGMz3JQtYNOczQlCamtnFwhgjHzWGDEcz9Esn7C47cKlTPZcthEgJc9nPIFWWKBN gjTjaXh58f+Pwd03tJcXLuXwmtOU9XhPOamA2MiTI6OLWeQCJ38mCLsXltS63ejxdfn0 ZBcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MXBGC51HkA4fkFjRnDIBE1yW1pfiyW2+xrMRYGdg++s=; b=cenQ4Jkl84L6Y2IsEN2iKZRmCWOaID9j1WnPLJJd6zHyHVYLPe4YDygs3MAiBlEr/8 O/Gwme7facL4Y5oknEUDWNV+PiRgo4nm0r/X9U6A3e2aROObYTerCjwjNzs9DVO1cWPN VjcDIkB9iBMn0T/QYfhejIlizAytr4Wkz7nTk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MXBGC51HkA4fkFjRnDIBE1yW1pfiyW2+xrMRYGdg++s=; b=Oild9YN5TtPSd4ILRWWamHe+mMNOQfw76fuW1qbhASFe8FsnV3mpG1yypdNtYed285 pM+GkiOyjHS2IrWyFyP5OGpi+ziYWPbrgM0v07YcYBMrZ25h+y9qHgRb9Dkvbdl4rJal E2dVZr44j+w+MgWdmdPd/zEqZAuny2/iP5kEZ1QJS8S4rGzNPN41cBEsxQ2eWrKKx399 aEFdAXw3sS4mo/V5g9EB34CkyOVV1nSOAOFlv0o9oJSVMHskeUha4Ife8K1JbW8jSBvg cVc12a5j62JkhEhnGXu7di06rKdWNeyf6qfjsz5RVvHJNoW/DWNTIALhbrF0FGFcCIvD v4pA== X-Gm-Message-State: ALQs6tCC09E/8JRQrf67lvAMjeUihExCEFdcrBQP+DAd8pnr9crES3mA MNwmA474q7W8aplu5CpoZdX+Rn48F9IlW4exWZvnVQ== X-Received: by 2002:a1f:ab47:: with SMTP id u68-v6mr24699923vke.158.1525450875448; Fri, 04 May 2018 09:21:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.11.209 with HTTP; Fri, 4 May 2018 09:21:14 -0700 (PDT) In-Reply-To: References: <1523595999-27433-1-git-send-email-yamada.masahiro@socionext.com> <1523595999-27433-2-git-send-email-yamada.masahiro@socionext.com> From: Kees Cook Date: Fri, 4 May 2018 09:21:14 -0700 X-Google-Sender-Auth: Uvda8aGFdD2oLY_l0gtjl8Fbrko Message-ID: Subject: Re: [PATCH 01/30] gcc-plugins: fix build condition of SANCOV plugin To: Masahiro Yamada Cc: Linus Torvalds , Sam Ravnborg , Ulf Magnusson , Nicholas Piggin , Emese Revfy , X86 ML , Linux Kernel Mailing List , Linux Kbuild mailing list 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 Fri, May 4, 2018 at 7:21 AM, Masahiro Yamada wrote: > Hi Kees, > > > 2018-04-13 14:06 GMT+09:00 Masahiro Yamada : >> 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 >> --- > > > I am planning to queue this up to the fixes branch > since this is a bug fix. > > Do you have any comment on this? Looks fine to me; thanks! Acked-by: Kees Cook -Kees > > > > > >> Changes in v3: >> - newly added >> >> Changes in v2: None >> >> scripts/Makefile.gcc-plugins | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> 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 >> >> -- >> 2.7.4 >> > > > > -- > Best Regards > Masahiro Yamada -- Kees Cook Pixel Security