* [PATCH] x86/entry/64: Fix unwind hint for rewind_stack_do_exit
@ 2020-03-05 22:54 Jann Horn
2020-03-06 16:58 ` Josh Poimboeuf
0 siblings, 1 reply; 2+ messages in thread
From: Jann Horn @ 2020-03-05 22:54 UTC (permalink / raw)
To: Josh Poimboeuf, Andy Lutomirski, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H. Peter Anvin
Cc: x86, linux-kernel
The leaq instruction in rewind_stack_do_exit moves the stack pointer
directly below the pt_regs at the top of the task stack before calling
do_exit(). Tell the unwinder to expect pt_regs.
Signed-off-by: Jann Horn <jannh@google.com>
---
arch/x86/entry/entry_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index f2bb91e87877..2393c803fd8c 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1739,7 +1739,7 @@ SYM_CODE_START(rewind_stack_do_exit)
movq PER_CPU_VAR(cpu_current_top_of_stack), %rax
leaq -PTREGS_SIZE(%rax), %rsp
- UNWIND_HINT_FUNC sp_offset=PTREGS_SIZE
+ UNWIND_HINT_REGS
call do_exit
SYM_CODE_END(rewind_stack_do_exit)
base-commit: 9f65ed5fe41ce08ed1cb1f6a950f9ec694c142ad
--
2.25.0.265.gbab2e86ba0-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/entry/64: Fix unwind hint for rewind_stack_do_exit
2020-03-05 22:54 [PATCH] x86/entry/64: Fix unwind hint for rewind_stack_do_exit Jann Horn
@ 2020-03-06 16:58 ` Josh Poimboeuf
0 siblings, 0 replies; 2+ messages in thread
From: Josh Poimboeuf @ 2020-03-06 16:58 UTC (permalink / raw)
To: Jann Horn
Cc: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
H. Peter Anvin, x86, linux-kernel
On Thu, Mar 05, 2020 at 11:54:43PM +0100, Jann Horn wrote:
> The leaq instruction in rewind_stack_do_exit moves the stack pointer
> directly below the pt_regs at the top of the task stack before calling
> do_exit(). Tell the unwinder to expect pt_regs.
>
> Signed-off-by: Jann Horn <jannh@google.com>
Thanks Jann. This fits in nicely with my ORC series so I'll add it.
--
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-06 16:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-05 22:54 [PATCH] x86/entry/64: Fix unwind hint for rewind_stack_do_exit Jann Horn
2020-03-06 16:58 ` Josh Poimboeuf
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).