Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1677433pxb; Mon, 22 Feb 2021 08:11:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8FObAh30+9RUx2mP4vI5Kv6OdFvLahsdsMLTC64qx4MgB8ofnIYfH3HR0FptajT2376Pl X-Received: by 2002:aa7:c586:: with SMTP id g6mr22441138edq.203.1614010272609; Mon, 22 Feb 2021 08:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614010272; cv=none; d=google.com; s=arc-20160816; b=0pk54Vf+o0AYTlsGTbRDtegTEa5gA9NR1yohUFG2pdYxfXe0v359ISOvNdlRQY4ypI 7NsxYXFmlPdsPJdye4B3BEqvH1fbbLHG51qJ3ty1e8G6j4ql0J0rvniMefZNqn86u3Dl oWRa831nW91l0WNNh3Vzp8/JGs7hQD763HJpr+QN73CyLoixXMgS3ltqPqLwGo8VH0gF v6EJW5XqAKMjIC85Lx52VrfQx6LsXABAVbUmj+3thiLuS22bQvmna+Wc3RaR8aPfs7JR nUrPumzeOEysyCI+rbxEsCiZULKBcyc0kDCJ/9s8bPREyTcouC0mHKDnGYprvBC/M1BN G+kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:sender:dkim-signature; bh=kFKJjBTlIwwumjw5NTvL3ETbdYuWkFw8Ve3/Yw/5y64=; b=bMs7h5rQ24rNWu6YW9YXFBgpnFGlP+ovc1BHK0Umr638WPXH4Clhcqc12diQWHGg0m A8NQC/tSIUUJjf00VGxGd0z/2tKNGUfZWcsWGg+3CKKWtHjk67a0Z0Itvpw7Ee9wINaZ Zrk0ppDrzhaaVYGHXtJDuO+wcaqbZzPNepcHX+diwSoiPwUAFMF5VQDCjVXCal6xLbXs feKaClPEuJeLkfvKMFikvPW7YlfHyK3YXsYj/4B8OebXrItZqDUIkr8yg1zTBXuwIpP6 5fJqUZgweIexoMc/DRI+JcxTwPup2+JIHAwFmV04RhohNycA6RNV6HXD/JOzD1vOxzxo kIgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CWYshtvi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p62si11804583edp.242.2021.02.22.08.10.49; Mon, 22 Feb 2021 08:11:12 -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=@gmail.com header.s=20161025 header.b=CWYshtvi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231691AbhBVQH7 (ORCPT + 99 others); Mon, 22 Feb 2021 11:07:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbhBVQFJ (ORCPT ); Mon, 22 Feb 2021 11:05:09 -0500 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC61FC06178B; Mon, 22 Feb 2021 08:03:33 -0800 (PST) Received: by mail-ot1-x334.google.com with SMTP id g6so8278687otk.11; Mon, 22 Feb 2021 08:03:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kFKJjBTlIwwumjw5NTvL3ETbdYuWkFw8Ve3/Yw/5y64=; b=CWYshtviojPE3HRMuQDeLdEl2sPJHt7KYy4gPQk9LgwByK6URoGBf7D8UynTlfuM92 VF6u30H+NewqyiaGtUzv1MuQxNmRuF7gM1E6HNYsg61mYPX1n3CIIwYrQXZ/lKwscPwS 88A6lVkFkxu31qm6Bv3hzs5xHDfoomrNofFpW6HoI2VrL8vC3NTbQ7eqJaFJxWhHax1o 3+7zN9gYAv3QPJcQGyc/VNHLhEceHjF63MHNBDyfcmRzyX0BoGqtR6Ypx4aVvpViMNVE 7BjkTKf1KPFtHyL2Xlvx5QtsfForGzPtBjdDk8DJmizpHFSS7NRKzSKubG+NYsIU3yuy XTrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=kFKJjBTlIwwumjw5NTvL3ETbdYuWkFw8Ve3/Yw/5y64=; b=rOA3JzhaMoU5QCwHxKZRFKGNRmVQ1awg/jyakA44hqf6q0QNGuZon3/IQ0BThhowBV SBsIEYEFWOBjK55QzCXLc0qeWHKoXFxrU+PjzbplsXi1qTrUq9KvPF3puXykzY6mknhp rDqS6Eb88JwmQMsDEtoUiHxU7Hoql3P/sip1DsVdQgEJD2ZB7xDXblO5XKdxw9Y3Clz8 I5KO7Kjt68INc4KVWOSQTVjOJqRINBzyZpH/hQvcUG8i2rKpVcgR86cy06Mv3JgDjlF6 LL4h5uuo7ULUXaDNtd8+ll2G6VYMUhco0ov+9pLCMZvsjRa0AB5DUXzJEZGFXFz6R8JV HH4w== X-Gm-Message-State: AOAM533jjKDwYySJtYWF2JYxgF5MDe54d8Iz3NNoEluQT/mI1BX+yWNv 1z3MK9pPaxlTwW2emA9JgyY= X-Received: by 2002:a9d:3b45:: with SMTP id z63mr15678733otb.198.1614009813267; Mon, 22 Feb 2021 08:03:33 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id v9sm2837124otq.68.2021.02.22.08.03.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 08:03:32 -0800 (PST) Sender: Guenter Roeck Subject: Re: [PATCH] gcc-plugins: Disable GCC_PLUGIN_CYC_COMPLEXITY for s390 To: Masahiro Yamada Cc: Heiko Carstens , Kees Cook , linux-hardening@vger.kernel.org, Linux Kernel Mailing List , Arnd Bergmann References: <20210221225650.33134-1-linux@roeck-us.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULu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ZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= Message-ID: <8d3de6fc-0991-9cef-d5fd-032fdbe2e85e@roeck-us.net> Date: Mon, 22 Feb 2021 08:03:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/22/21 7:45 AM, Masahiro Yamada wrote: > 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 > Good idea. Downside would be that it won't solve the real problem for s390 (which is lack of allmodconfig/allyesconfig compile test coverage because COMPILE_TEST isn't set anymore), but that is a different problem anyway, and my original patch doesn't solve that either. On the other side, if that flag would be set explicitly by all{yes,mod}config, it would really beg for being misused. We might then as well add a new flag that is explicitly associated with all{yes,mod}config, but not with randconfig. Thanks, Guenter