From patchwork Fri Feb 12 16:06:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102793 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp912329lbl; Fri, 12 Feb 2016 08:07:17 -0800 (PST) X-Received: by 10.98.33.70 with SMTP id h67mr3264229pfh.54.1455293237106; Fri, 12 Feb 2016 08:07:17 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q88si20732464pfa.197.2016.02.12.08.07.16; Fri, 12 Feb 2016 08:07:17 -0800 (PST) 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 S1751379AbcBLQHM (ORCPT + 30 others); Fri, 12 Feb 2016 11:07:12 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:64636 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbcBLQHK (ORCPT ); Fri, 12 Feb 2016 11:07:10 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue001) with ESMTPA (Nemesis) id 0M3rPO-1aCJiH1hsA-00rZQE; Fri, 12 Feb 2016 17:06:31 +0100 From: Arnd Bergmann To: Michal Marek Cc: linux-arm-kernel@lists.infradead.org, Peter Oberparleiter , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 0/5] gcov fixes and maybe-uninitialized warnings Date: Fri, 12 Feb 2016 17:06:17 +0100 Message-Id: <1455293187-179811-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:gcjDDM404zVXhLUH845p5TAkVWiQlggYysNBCBHkf6sOlv/aPbm QPdh8MMIWJVadC1gzXS2fFvvf/ToQDayXziKV7KYFsM+tOAu1F+/AqFLxFddWLhUiVrri7y eUw+Xkj9oO61Oe5fnVODJYOIy57xCVLVTxmuWVrNqER3fZEIy+mkeNCmunwTm49io0b/33A NpKmSLiosFnl04CU2SthQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Jvq7EUfpkB4=:3I9odKarYqCBMH3BrLgND1 1EgK572n0QM78sa0x5oMtzlui+RAI8BPBHdF+mbWEb7IEYm5OghMBWjkYV10QkH+jbEjpUPYA cDgTw8EIZ7editnqvBKsVOT7Y9u3IYt8GU6fpn5rTMW+fcXYVL2NAi7d62SbGrsaj1/0kk9ux 0GEPNjNuKNUN3KR/yG+zJwgRV6ih+Y0uyf1QpbCkQwaIHM/LBgmaLQcbu1lu8YfE80KT1Vta0 esiuBzy9RhyLh02l0wZb2s7jKts5xFeSw3u08kjdB6vJKpu5/DCtnWxNMS16Sh8txeGWtQhwd Dt07L2TT2ddU9doVvAQkTldy4JSbEpdqL9uWAt38pBhazHXjfYqvu/xVgJYefkYijMI/ETgcZ a3J1NXEx/xD4aXIyWD1sPIu4N1M/P39vddOCm9DMnoLK61vYiEd/E8191c4/Zo/w20Hk59T7i jkuaR7otehh6wlvpsLA7/7ANlsiuNk0QTPuBtQ2wxqfhVV/Mg3ojBS4w4se5F18ZwwXfGWlPF P5z3G+nsDszdPTDjK9nws3EgFSD+D1SDt1sz0i2J6n7QSgZCX+QHXgaOENAc/9f+dZOyWIzLq 3C6m5TtWYImw+8lH7++N2Zfr8wmNFiPpZ31znPglFuLiKrfkRJK/WQr55oCXp8Z6w6s1A9EJ5 +vq1m6mmVAEF3BMzpxGBMcrRsgCkmK65t/UJeElYV1ESjR5re05h2K+SlXjAUZJ8TnRc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series tries to address two related problems: * getting better "variable may be used uninitialized" warnings in allmodconfig and randconfig builds * improving GCOV_PROFILE support Surprisingly, these two are related, so I have a single series that I hope to get merged through the Kbuild tree. I have built many thousands of ARM randconfig kernels and created patches for every single warning and error I found, and submitted most of them for inclusion. The "may be used uninitialized" warnings are both the most annoying and the most helpful ones that gcc gives us, so this tries to make them more useful, including three steps: 1. Limit the false positives as much as we can: Aside from CC_OPTIMIZE_FOR_SIZE, three other options (UBSAN_SANITIZE_ALL, PROFILE_ALL_BRANCHES and GCOV_PROFILE_ALL) confuse the compiler (in versions 4.9 through 5.3, and to a lesser degree on older versions) so we get a lot of extra warnings. We already disable the warnings for CC_OPTIMIZE_FOR_SIZE, and this series also disables them for the other two, which are rarely used in practice but do show up in randconfig builds all the time. 2. Ensure we actually see them on 'allmodconfig' builds: Today they are disabled, because CC_OPTIMIZE_FOR_SIZE disables them. UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES are defined in a way that they don't get turned on for allmodconfig, and we need to do the samem for GCOV_PROFILE_ALL and CC_OPTIMIZE_FOR_SIZE. 3. Fix all known such warnings: The warnings should stick out, so we can fix them once they first appear. Today they often get ignored because of all the false positives. For GCOV support, another problem showed up, resulting in an increased risk for kernel stack overflow, aside from getting a number of warnings about the stack size. I'm also including a patch to address that here. Arnd Arnd Bergmann (5): Kbuild: change CC_OPTIMIZE_FOR_SIZE definition Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES gcov: disable for COMPILE_TEST gcov: disable tree-loop-im to reduce stack usage gcov: disable -Wmaybe-uninitialized warning Makefile | 8 ++++++-- init/Kconfig | 13 +++++++++++++ kernel/gcov/Kconfig | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) -- 2.7.0