All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Vince Weaver <vincent.weaver@maine.edu>, Dave Jones <dsj@fb.com>,
	Jann Horn <jannh@google.com>, Miroslav Benes <mbenes@suse.cz>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH v2 05/11] x86/entry/64: Fix unwind hints in rewind_stack_do_exit()
Date: Sat, 25 Apr 2020 05:03:04 -0500	[thread overview]
Message-ID: <68c33e17ae5963854916a46f522624f8e1d264f2.1587808742.git.jpoimboe@redhat.com> (raw)
In-Reply-To: <cover.1587808742.git.jpoimboe@redhat.com>

From: Jann Horn <jannh@google.com>

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.

Fixes: 8c1f75587a18 ("x86/entry/64: Add unwind hint annotations")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
---
 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 34a588950fe1..9fe0d5cad8e4 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)
-- 
2.21.1


  parent reply	other threads:[~2020-04-25 10:03 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 10:02 [PATCH v2 00/11] ORC fixes Josh Poimboeuf
2020-04-25 10:03 ` [PATCH v2 01/11] objtool: Fix stack offset tracking for indirect CFAs Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:03 ` [PATCH v2 02/11] x86/entry/64: Fix unwind hints in register clearing code Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:03 ` [PATCH v2 03/11] x86/entry/64: Fix unwind hints in kernel exit path Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:03 ` [PATCH v2 04/11] x86/entry/64: Fix unwind hints in __switch_to_asm() Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:03 ` Josh Poimboeuf [this message]
2020-04-26  6:47   ` [tip: x86/urgent] x86/entry/64: Fix unwind hints in rewind_stack_do_exit() tip-bot2 for Jann Horn
2020-04-25 10:03 ` [PATCH v2 06/11] x86/unwind/orc: Convert global variables to static Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2024-02-28 23:35   ` [PATCH v2 06/11] " Steven Rostedt
2024-02-29  0:03     ` Josh Poimboeuf
2024-02-29  0:14       ` Steven Rostedt
2024-02-29  0:42         ` Josh Poimboeuf
2024-02-29 23:40           ` Steven Rostedt
2024-03-18 15:58           ` Steven Rostedt
2020-04-25 10:03 ` [PATCH v2 07/11] x86/unwind: Prevent false warnings for non-current tasks Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:03 ` [PATCH v2 08/11] x86/unwind/orc: Don't skip the first frame for inactive tasks Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Miroslav Benes
2020-04-25 10:03 ` [PATCH v2 09/11] x86/unwind/orc: Prevent unwinding before ORC initialization Josh Poimboeuf
2020-04-25 10:12   ` Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:06 ` [PATCH v2 10/11] x86/unwind/orc: Fix error path for bad ORC entry type Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:06 ` [PATCH v2 11/11] x86/unwind/orc: Fix premature unwind stoppage due to IRET frames Josh Poimboeuf
2020-04-26  6:47   ` [tip: x86/urgent] " tip-bot2 for Josh Poimboeuf
2020-04-25 10:25 ` [PATCH v2 00/11] ORC fixes Ingo Molnar
2020-04-25 10:41   ` Josh Poimboeuf
2020-04-26  7:26     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=68c33e17ae5963854916a46f522624f8e1d264f2.1587808742.git.jpoimboe@redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=dsj@fb.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mbenes@suse.cz \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=vincent.weaver@maine.edu \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.