public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86-64: fix unwind annotations in recent NMI changes
@ 2013-01-24  9:27 Jan Beulich
  2013-01-24 12:27 ` [tip:x86/urgent] x86-64: Fix " tip-bot for Jan Beulich
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2013-01-24  9:27 UTC (permalink / raw)
  To: mingo, tglx, hpa; +Cc: Steven Rostedt, linux-kernel

While in one case a plain annotation is necessary, in the other case
the stack adjustment can simply be folded into the immediately
preceding RESTORE_ALL, thus getting the correct annotation for free.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>

---
 arch/x86/kernel/entry_64.S |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- 3.8-rc4/arch/x86/kernel/entry_64.S
+++ 3.8-rc4-x86_64-NMI-unwind/arch/x86/kernel/entry_64.S
@@ -1781,6 +1781,7 @@ first_nmi:
 	 * Leave room for the "copied" frame
 	 */
 	subq $(5*8), %rsp
+	CFI_ADJUST_CFA_OFFSET 5*8
 
 	/* Copy the stack frame to the Saved frame */
 	.rept 5
@@ -1863,10 +1864,8 @@ end_repeat_nmi:
 nmi_swapgs:
 	SWAPGS_UNSAFE_STACK
 nmi_restore:
-	RESTORE_ALL 8
-
-	/* Pop the extra iret frame */
-	addq $(5*8), %rsp
+	/* Pop the extra iret frame at once */
+	RESTORE_ALL 6*8
 
 	/* Clear the NMI executing stack variable */
 	movq $0, 5*8(%rsp)




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

end of thread, other threads:[~2013-01-24 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24  9:27 [PATCH] x86-64: fix unwind annotations in recent NMI changes Jan Beulich
2013-01-24 12:27 ` [tip:x86/urgent] x86-64: Fix " tip-bot for Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox