From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836AbeANGDs (ORCPT + 1 other); Sun, 14 Jan 2018 01:03:48 -0500 Received: from merlin.infradead.org ([205.233.59.134]:33182 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbeANGDr (ORCPT ); Sun, 14 Jan 2018 01:03:47 -0500 From: Randy Dunlap Subject: warning: '______f' is static but declared in inline function in To: Steven Rostedt , Ingo Molnar , Kees Cook , LKML Message-ID: <6cad9460-3a9d-8ede-8997-5bf11c9621c4@infradead.org> Date: Sat, 13 Jan 2018 22:03:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi, I regularly get 50 MB - 60 MB files during kernel randconfig builds. These large files mostly contain (many repeats of; e.g., 124,594): In file included from ../include/linux/string.h:6:0, from ../include/linux/uuid.h:20, from ../include/linux/mod_devicetable.h:13, from ../scripts/mod/devicetable-offsets.c:3: ../include/linux/compiler.h:64:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static [enabled by default] ______f = { \ ^ ../include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if' ^ ../include/linux/string.h:425:2: note: in expansion of macro 'if' if (p_size == (size_t)-1 && q_size == (size_t)-1) ^ AFAICT, this only happens when CONFIG_FORTIFY_SOURCE=y and CONFIG_PROFILE_ALL_BRANCHES=y. Are these 2 kconfig symbols incompatible? We could prevent PROFILE_ALL_BRANCHES if FORTIFY_SOURCE=y. (e.g., see patch below) I am using: gcc (SUSE Linux) 4.8.5 Do some later versions of gcc handle this without making the build output too noisy? Does the generated code work as expected? Any patches or suggestions? (other than DDT) thanks, -- ~Randy --- orig/kernel/trace/Kconfig +++ next/kernel/trace/Kconfig @@ -355,7 +355,7 @@ config PROFILE_ANNOTATED_BRANCHES on if you need to profile the system's use of these macros. config PROFILE_ALL_BRANCHES - bool "Profile all if conditionals" + bool "Profile all if conditionals" if !FORTIFY_SOURCE select TRACE_BRANCH_PROFILING help This tracer profiles all branch conditions. Every if ()