]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2018 17:46:17 +0000 (18:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2018 17:46:17 +0000 (18:46 +0100)
added patches:
objtool-fix-retpoline-support-for-pre-orc-objtool.patch

queue-4.9/objtool-fix-retpoline-support-for-pre-orc-objtool.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/objtool-fix-retpoline-support-for-pre-orc-objtool.patch b/queue-4.9/objtool-fix-retpoline-support-for-pre-orc-objtool.patch
new file mode 100644 (file)
index 0000000..a773f63
--- /dev/null
@@ -0,0 +1,45 @@
+From jpoimboe@redhat.com  Mon Jan 15 18:44:58 2018
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+Date: Mon, 15 Jan 2018 11:00:54 -0600
+Subject: objtool: Fix retpoline support for pre-ORC objtool
+To: David Woodhouse <dwmw2@infradead.org>
+Cc: gregkh@linuxfoundation.org, ak@linux.intel.com, dave.hansen@intel.com, gregkh@linux-foundation.org, jikos@kernel.org, keescook@google.com, luto@amacapital.net, peterz@infradead.org, pjt@google.com, riel@redhat.com, tglx@linutronix.de, tim.c.chen@linux.intel.com, torvalds@linux-foundation.org, stable@vger.kernel.org, stable-commits@vger.kernel.org
+Message-ID: <20180115170054.6baepkgihtla4nub@treble>
+Content-Disposition: inline
+
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+
+Objtool 1.0 (pre-ORC) produces the following warning when it encounters
+a retpoline:
+
+  arch/x86/crypto/camellia-aesni-avx2-asm_64.o: warning: objtool: .altinstr_replacement+0xf: return instruction outside of a callable function
+
+That warning is meant to catch GCC bugs and missing ENTRY/ENDPROC
+annotations, neither of which are applicable to alternatives.  Silence
+the warning for alternative instructions, just like objtool 2.0 already
+does.
+
+Reported-by: David Woodhouse <dwmw2@infradead.org>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/objtool/builtin-check.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/tools/objtool/builtin-check.c
++++ b/tools/objtool/builtin-check.c
+@@ -1230,6 +1230,14 @@ static int validate_uncallable_instructi
+       for_each_insn(file, insn) {
+               if (!insn->visited && insn->type == INSN_RETURN) {
++
++                      /*
++                       * Don't warn about call instructions in unvisited
++                       * retpoline alternatives.
++                       */
++                      if (!strcmp(insn->sec->name, ".altinstr_replacement"))
++                              continue;
++
+                       WARN_FUNC("return instruction outside of a callable function",
+                                 insn->sec, insn->offset);
+                       warnings++;
index bf8b4c1ad2c2d6ee78d5e56a791116465e5f1852..8ae3e786148926f59ee0b644fc05922cc9e5b820 100644 (file)
@@ -94,3 +94,4 @@ x86-retpoline-irq32-convert-assembler-indirect-jumps.patch
 x86-retpoline-fill-return-stack-buffer-on-vmexit.patch
 selftests-x86-add-test_vsyscall.patch
 x86-retpoline-remove-compile-time-warning.patch
+objtool-fix-retpoline-support-for-pre-orc-objtool.patch