linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mm: annotate no_context with UNWIND_HINTS
@ 2018-10-15  0:37 Nick Desaulniers
  2018-10-15  3:43 ` Andy Lutomirski
  0 siblings, 1 reply; 12+ messages in thread
From: Nick Desaulniers @ 2018-10-15  0:37 UTC (permalink / raw)
  To: dave.hansen, luto, peterz, tglx, mingo, bp, hpa
  Cc: natechancellor, Nick Desaulniers, x86, linux-kernel

Fixes the objtool warning:
arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable
instruction

Link: https://github.com/ClangBuiltLinux/linux/issues/204
Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
---
 arch/x86/mm/fault.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 47bebfe6efa7..057d2178fa19 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -760,9 +760,11 @@ no_context(struct pt_regs *regs, unsigned long error_code,
 		 * and then double-fault, though, because we're likely to
 		 * break the console driver and lose most of the stack dump.
 		 */
-		asm volatile ("movq %[stack], %%rsp\n\t"
+		asm volatile (UNWIND_HINT_SAVE
+			      "movq %[stack], %%rsp\n\t"
 			      "call handle_stack_overflow\n\t"
-			      "1: jmp 1b"
+			      "1: jmp 1b\n\t"
+			      UNWIND_HINT_RESTORE
 			      : ASM_CALL_CONSTRAINT
 			      : "D" ("kernel stack overflow (page fault)"),
 				"S" (regs), "d" (address),
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-15 17:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15  0:37 [PATCH] x86/mm: annotate no_context with UNWIND_HINTS Nick Desaulniers
2018-10-15  3:43 ` Andy Lutomirski
2018-10-15  5:17   ` Nathan Chancellor
2018-10-15 14:22     ` Josh Poimboeuf
2018-10-15 14:34     ` Andy Lutomirski
2018-10-15 15:22       ` Nathan Chancellor
2018-10-15 15:31         ` Josh Poimboeuf
2018-10-15 16:03           ` Andy Lutomirski
2018-10-15 16:07             ` Nathan Chancellor
2018-10-15 16:20             ` Josh Poimboeuf
2018-10-15 16:57             ` Nick Desaulniers
2018-10-15 17:23               ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).