summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2018-02-12 11:45:03 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:42:21 +0100
commitbdcf05c64a64743f512f12b17d4f9d8b14d2ad31 (patch)
tree02ce652773e3d6d5ecae63b77796fa472164d182 /arch
parenta816dd2fa2dcbde206bc67ebbdf8bbf75a54936c (diff)
downloadlinux-stable-bdcf05c64a64743f512f12b17d4f9d8b14d2ad31.tar.gz
linux-stable-bdcf05c64a64743f512f12b17d4f9d8b14d2ad31.tar.bz2
linux-stable-bdcf05c64a64743f512f12b17d4f9d8b14d2ad31.zip
x86/entry/64: Fix paranoid_entry() frame pointer warning
commit b3ccefaed922529e6a67de7b30af5aa38c76ace9 upstream. With the following commit: f09d160992d1 ("x86/entry/64: Get rid of the ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS macros") ... one of my suggested improvements triggered a frame pointer warning: arch/x86/entry/entry_64.o: warning: objtool: paranoid_entry()+0x11: call without frame pointer save/setup The warning is correct for the build-time code, but it's actually not relevant at runtime because of paravirt patching. The paravirt swapgs call gets replaced with either a SWAPGS instruction or NOPs at runtime. Go back to the previous behavior by removing the ELF function annotation for paranoid_entry() and adding an unwind hint, which effectively silences the warning. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: kbuild-all@01.org Cc: tipbuild@zytor.com Fixes: f09d160992d1 ("x86/entry/64: Get rid of the ALLOC_PT_GPREGS_ON_STACK and SAVE_AND_CLEAR_REGS macros") Link: http://lkml.kernel.org/r/20180212174503.5acbymg5z6p32snu@treble Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/entry/entry_64.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 8a3280bf79a1..c5ef704df069 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1122,6 +1122,7 @@ idtentry machine_check do_mce has_error_code=0 paranoid=1
* Return: ebx=0: need swapgs on exit, ebx=1: otherwise
*/
ENTRY(paranoid_entry)
+ UNWIND_HINT_FUNC
cld
movl $1, %ebx
movl $MSR_GS_BASE, %ecx
@@ -1135,7 +1136,7 @@ ENTRY(paranoid_entry)
SAVE_AND_SWITCH_TO_KERNEL_CR3 scratch_reg=%rax save_reg=%r14
ret
-ENDPROC(paranoid_entry)
+END(paranoid_entry)
/*
* "Paranoid" exit path from exception stack. This is invoked