linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* warning: '______f' is static but declared in inline function in <string.h>
@ 2018-01-14  6:03 Randy Dunlap
  2018-01-15 11:48 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2018-01-14  6:03 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Kees Cook, LKML

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 ()

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: warning: '______f' is static but declared in inline function in <string.h>
  2018-01-14  6:03 warning: '______f' is static but declared in inline function in <string.h> Randy Dunlap
@ 2018-01-15 11:48 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2018-01-15 11:48 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Ingo Molnar, Kees Cook, LKML

On Sat, 13 Jan 2018 22:03:40 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:

> -- 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 ()

I'm fine with this solution.

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-15 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-14  6:03 warning: '______f' is static but declared in inline function in <string.h> Randy Dunlap
2018-01-15 11:48 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).