From 79d769e90f23a2f265e1770f7292b719b12e464e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 17 Feb 2018 14:31:05 +0100 Subject: [PATCH] 4.14-stable patches added patches: tracing-prevent-profile_all_branches-when-fortify_source-y.patch --- queue-4.14/series | 1 + ...e_all_branches-when-fortify_source-y.patch | 51 +++++++++++++++++++ queue-4.15/series | 0 queue-4.9/series | 0 4 files changed, 52 insertions(+) create mode 100644 queue-4.14/series create mode 100644 queue-4.14/tracing-prevent-profile_all_branches-when-fortify_source-y.patch create mode 100644 queue-4.15/series create mode 100644 queue-4.9/series diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..372b72b88c1 --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1 @@ +tracing-prevent-profile_all_branches-when-fortify_source-y.patch diff --git a/queue-4.14/tracing-prevent-profile_all_branches-when-fortify_source-y.patch b/queue-4.14/tracing-prevent-profile_all_branches-when-fortify_source-y.patch new file mode 100644 index 00000000000..aa79e0d7e38 --- /dev/null +++ b/queue-4.14/tracing-prevent-profile_all_branches-when-fortify_source-y.patch @@ -0,0 +1,51 @@ +From 68e76e034b6b1c1ce2eece1ab8ae4008e14be470 Mon Sep 17 00:00:00 2001 +From: Randy Dunlap +Date: Mon, 15 Jan 2018 11:07:27 -0800 +Subject: tracing: Prevent PROFILE_ALL_BRANCHES when FORTIFY_SOURCE=y + +From: Randy Dunlap + +commit 68e76e034b6b1c1ce2eece1ab8ae4008e14be470 upstream. + +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/9199446b-a141-c0c3-9678-a3f9107f2750@infradead.org + +Signed-off-by: Randy Dunlap +Signed-off-by: Steven Rostedt (VMware) +Cc: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/Kconfig ++++ b/kernel/trace/Kconfig +@@ -343,7 +343,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 () diff --git a/queue-4.15/series b/queue-4.15/series new file mode 100644 index 00000000000..e69de29bb2d diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..e69de29bb2d -- 2.47.3