Received: by 2002:a05:6520:3645:b029:c0:f950:43e0 with SMTP id l5csp339199lki; Mon, 22 Feb 2021 07:51:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5FxOKMPf6BVyrTgze5/RN43kXhyfsN7b6cavEjX9DDbDQ6+24YhV5rwLS9tEj7S7YBWYE X-Received: by 2002:a05:6402:105a:: with SMTP id e26mr22518434edu.60.1614009084186; Mon, 22 Feb 2021 07:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614009084; cv=none; d=google.com; s=arc-20160816; b=mG5p0Q15F9KI/YnDZOzPEnbl+tqOWLPZKBqrQRJe/ZsGqLaQCE9dm+cYLI3sgdiXB0 Ou1GBNivWbge0Q30Vi+23rfpfwWV4gFEre6sFa8VngROn1g1J3G1o8feoQcn8LzOOzJJ QStp1ZHQVHAMz36C/AK9za7OWEfSg/8qKhVSsH8klfFDAMzpoCVOE1IEDIux2h6fuXfh gyJ2UhX7Xod37juvxAHnMFy5gkQs4udznkoV3eLoljGiw2NW68skb0tGDljyp6Tc5+3G meNuf2rfx7ToPsf+qk3nbPhgWPPdlIESMU8ImlZp3unSwKsAI0+S0zBMvteKc5aa+zrO DkvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=89wXumCMVcs8ybK5qsD235XsMdw1h/Bx6pEH2/t7rnU=; b=plcvyz+68Vn3MIVQjWHmkRQbTbVP7unx3xa2k79iRkcUoB4jj02NIzOCafL4Hj/Odd R6NzMUlqK1dUuCebVJptz8RXeIkTcd54cCG9Jf6ow4zwLyq39zs1eQMGH+v2QUVg9nOj 1pITAH6yL62KTTlmWH9+hIt4vlmKei1nBB7LkfNEPiYLo/frayQaAHNo46ltKDoigPVr gMiCd0RgvbzDf81WB2m+ypjb4u01Ar3Lte71F8oiqQ/NjJI1qwwM/4kmo35BvmgkR8gQ KgoOt6MoV/qFYIFM+vtNL5NV7U57tfTculeqqlK6F7gSHcERBejl8StpnsVlrZNL4hhR L81A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=oiMhYH+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si12873568edd.436.2021.02.22.07.51.01; Mon, 22 Feb 2021 07:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=oiMhYH+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbhBVPrR (ORCPT + 99 others); Mon, 22 Feb 2021 10:47:17 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:26805 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230454AbhBVPrH (ORCPT ); Mon, 22 Feb 2021 10:47:07 -0500 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 11MFk2Ev004320; Tue, 23 Feb 2021 00:46:02 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 11MFk2Ev004320 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614008763; bh=89wXumCMVcs8ybK5qsD235XsMdw1h/Bx6pEH2/t7rnU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oiMhYH+0j6BkMUJA290YpMySryyjfMcfeeiuWCz86lIarNDqfkBiTlmYTuSvEZ9dl HcfdeG+jzZrOMlG5vjYFyT86f/29c5HpeYDVK0lwHGjAUBWc4j/C5Q2Cae+vJRVjDl R0MBmT0eGzGdlBBaq21UHZ8C8yuBxMrGjJMZWNKtlSeh8Gzhcxb7Ew4jPmvw/suxgt +U7tDq4TRVYB/QmN6DAt93KLevII+aS01yPQgCwxhO8RTt+L9mJR2juN6YnTm4+50L YSEqGBn4ZBo4yoHLLSx9schIg153y1JZfO3rbqH5l6Ayf3zokBcEW2sIT3Hn2H+kb6 yJkVUwBqXNoCA== X-Nifty-SrcIP: [209.85.210.175] Received: by mail-pf1-f175.google.com with SMTP id q20so6810088pfu.8; Mon, 22 Feb 2021 07:46:02 -0800 (PST) X-Gm-Message-State: AOAM5334Ocp9qyott/8iLmtoaFN5om3vybWuAWb2mSfMvkFDWItwxwf3 JGP+gf4WzG5NbpIEkjke4xo3gCgOk37Y6t/EViQ= X-Received: by 2002:a62:d454:0:b029:1ed:a6d6:539d with SMTP id u20-20020a62d4540000b02901eda6d6539dmr5123963pfl.63.1614008761620; Mon, 22 Feb 2021 07:46:01 -0800 (PST) MIME-Version: 1.0 References: <20210221225650.33134-1-linux@roeck-us.net> In-Reply-To: From: Masahiro Yamada Date: Tue, 23 Feb 2021 00:45:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] gcc-plugins: Disable GCC_PLUGIN_CYC_COMPLEXITY for s390 To: Guenter Roeck Cc: Heiko Carstens , Kees Cook , linux-hardening@vger.kernel.org, Linux Kernel Mailing List , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 23, 2021 at 12:18 AM Guenter Roeck wrote: > > On 2/22/21 4:05 AM, Heiko Carstens wrote: > > On Sun, Feb 21, 2021 at 02:56:50PM -0800, Guenter Roeck wrote: > >> Commit 334ef6ed06fa ("init/Kconfig: make COMPILE_TEST depend on !S390") disabled > >> COMPILE_TEST for s390. At the same time, "make allmodconfig/allyesconfig" for > >> s390 is still supported. However, it generates thousands of compiler > >> messages such as the following, making it highly impractical to run. > >> > >> Cyclomatic Complexity 1 scripts/mod/devicetable-offsets.c:main > >> Cyclomatic Complexity 1 scripts/mod/devicetable-offsets.c:_GLOBAL__sub_I_00100_0_main > >> > >> Since GCC_PLUGIN_CYC_COMPLEXITY is primarily used for testing, disable it > >> when building s390 images. > >> > >> Cc: Arnd Bergmann > >> Cc: Heiko Carstens > >> Fixes: 334ef6ed06fa ("init/Kconfig: make COMPILE_TEST depend on !S390") > >> Signed-off-by: Guenter Roeck > >> --- > >> 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 ab9eb4cbe33a..5e9bb500f443 100644 > >> --- a/scripts/gcc-plugins/Kconfig > >> +++ b/scripts/gcc-plugins/Kconfig > >> @@ -21,7 +21,7 @@ if GCC_PLUGINS > >> > >> config GCC_PLUGIN_CYC_COMPLEXITY > >> bool "Compute the cyclomatic complexity of a function" if EXPERT > >> - depends on !COMPILE_TEST # too noisy > >> + depends on !COMPILE_TEST && !S390 # too noisy > > > > I don't see a reason to disable this in general for s390. COMPILE_TEST > > was only disabled for s390 because a lot of irrelevant configs didn't > > compile and it would cause a lot of unnecessary work to fix that. > > > > However the !COMPILE_TEST dependency here looks more like it was > > misused in lack of a possibility to detect if the config was generated > > with allyesconfig/allmodconfig. Maybe that could be added somehow to > > Kconfig? > > > > That is what COMPILE_TEST used to be for. Not setting it for s390 doesn't > just cause this config to be disabled. Lots of other compile tests > for s390 are now disabled as well, and code which should be disabled > is now enabled. Looking at it, I'd be a bit surprised if allmodconfig/ > allyesconfig with COMPILE_TEST=y still builds for s390. > > I agree that COMPILE_TEST it is being misused. However, I think what > you'd be looking for is something like COMPILE_TEST_RANDCONFIG. > FWIW, in my opinion, randconfig should not enable COMPILE_TEST > to start with. But that is a different discussion. > > Anyway, I can disable GCC_PLUGIN_CYC_COMPLEXITY manually in my own > build tests, so this isn't that much of a problem for me, so feel > free to drop this patch. > > Guenter Maybe, we can add something like CONFIG_SUPPRESS_NOISY_TESTS, which is set to y by all{yes,mod}config. This is self-documenting, so we do not need the '# too noisy' comment. config SUPPRESS_NOISY_TESTS bool "suppress noisy test" config GCC_PLUGIN_CYC_COMPLEXITY bool "Compute the cyclomatic complexity of a function" if EXPERT depends on !SUPPRESS_NOISY_TESTS -- Best Regards Masahiro Yamada