Skip to content

Commit 68e76e0

Browse files
rddunlaprostedt
authored andcommitted
tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y
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) ^ This only happens when CONFIG_FORTIFY_SOURCE=y and CONFIG_PROFILE_ALL_BRANCHES=y, so prevent PROFILE_ALL_BRANCHES if FORTIFY_SOURCE=y. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent a0e3a18 commit 68e76e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ config PROFILE_ANNOTATED_BRANCHES
355355
on if you need to profile the system's use of these macros.
356356

357357
config PROFILE_ALL_BRANCHES
358-
bool "Profile all if conditionals"
358+
bool "Profile all if conditionals" if !FORTIFY_SOURCE
359359
select TRACE_BRANCH_PROFILING
360360
help
361361
This tracer profiles all branch conditions. Every if ()

0 commit comments

Comments
 (0)