Skip to contentSkip to conversation

x86_64: fix RIP printout in early_idt_handler

PATCH In review Jiri Slaby 2 participants 2 messages Jan 3, 2009 – Jan 4, 2009 x86

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 x86_64: fix RIP printout in early_idt_handler

Since errorcode is popped out, RIP is on the top of the stack. Use real RIP value instead of wrong CS.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc H. Peter Anvin <[email protected]>
---
 arch/x86/kernel/head_64.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/head_64.S +1 -1
index 26cfdc1..0e275d4 100644
@@ -305,7 +305,7 @@ ENTRY(early_idt_handler)
 	call dump_stack
 #ifdef CONFIG_KALLSYMS	
 	leaq early_idt_ripmsg(%rip),%rdi
-	movq 8(%rsp),%rsi	# get rip again
+	movq 0(%rsp),%rsi	# get rip again
 	call __print_symbol
 #endif
 #endif /* EARLY_PRINTK */
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 10 lines · Jiri Slaby

Since errorcode is popped out, RIP is on the top of the stack. Use real RIP value instead of wrong CS.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc H. Peter Anvin <[email protected]>
---
 arch/x86/kernel/head_64.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

good spotting - applied to tip/x86/urgent, thanks Jiri. I have also added a -stable backport tag.

Ingo