Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2017-10-30 13:34:26 +0100
committerJiri Slaby <jslaby@suse.cz>2017-10-30 15:02:54 +0100
commite683952999feec913a7541b48863d95743720b59 (patch)
tree42582412ae74e3fbc760ff8ddfe3cd7c4798fb1b
parentb3608b0c135addf415116bbb671c73ab88c8013a (diff)
objtool: Upgrade libelf-devel warning to error for
CONFIG_ORC_UNWINDER (bnc#1058115).
-rw-r--r--patches.suse/objtool-Upgrade-libelf-devel-warning-to-error-for-CO.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.suse/objtool-Upgrade-libelf-devel-warning-to-error-for-CO.patch b/patches.suse/objtool-Upgrade-libelf-devel-warning-to-error-for-CO.patch
new file mode 100644
index 0000000000..4bbb696097
--- /dev/null
+++ b/patches.suse/objtool-Upgrade-libelf-devel-warning-to-error-for-CO.patch
@@ -0,0 +1,39 @@
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+Date: Tue, 3 Oct 2017 20:10:36 -0500
+Subject: objtool: Upgrade libelf-devel warning to error for
+ CONFIG_ORC_UNWINDER
+Git-commit: 3dd40cb320fee7c23b574ab821ce140ccd1281c9
+Patch-mainline: v4.14-rc5
+References: bnc#1058115
+
+With CONFIG_ORC_UNWINDER, if the user doesn't have libelf-devel
+installed, and they don't see the make warning, their ORC unwinder will
+be silently broken. Upgrade the warning to an error.
+
+Reported-and-tested-by: Borislav Petkov <bp@alien8.de>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Link: http://lkml.kernel.org/r/d9dfc39fb8240998820f9efb233d283a1ee96084.1507079417.git.jpoimboe@redhat.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ Makefile | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -954,7 +954,11 @@ ifdef CONFIG_STACK_VALIDATION
+ ifeq ($(has_libelf),1)
+ objtool_target := tools/objtool FORCE
+ else
+- $(warning "Cannot use CONFIG_STACK_VALIDATION, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
++ ifdef CONFIG_ORC_UNWINDER
++ $(error "Cannot generate ORC metadata for CONFIG_ORC_UNWINDER=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
++ else
++ $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
++ endif
+ SKIP_STACK_VALIDATION := 1
+ export SKIP_STACK_VALIDATION
+ endif
diff --git a/series.conf b/series.conf
index b6edf6cfe2..6e78ac173f 100644
--- a/series.conf
+++ b/series.conf
@@ -4986,6 +4986,7 @@
patches.suse/objtool-Skip-unreachable-warnings-for-GCC-4.4-and-ol.patch
patches.suse/objtool-Support-unoptimized-frame-pointer-setup.patch
patches.suse/kprobes-x86-Set-up-frame-pointer-in-kprobe-trampolin.patch
+ patches.suse/objtool-Upgrade-libelf-devel-warning-to-error-for-CO.patch
# pending
patches.suse/0001-objtool-Don-t-report-end-of-section-error-after-an-e.patch