Skip to contentSkip to conversation

x86_64: fix page fault from show_trace()

PATCH New Jan Beulich 1 participant 1 message Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: fix page fault from show_trace()

The introduction of call_softirq switching to the interrupt stack several releases earlier resulted in a problem with the code in show_trace, which assumes that it can pick the previous stack pointer from the end of the interrupt stack.

From: Jan Beulich <[email protected]>

(actual patch attached)

The introduction of call_softirq switching to the interrupt stack several releases earlier resulted in a problem with the code in show_trace, which assumes that it can pick the previous stack pointer from the end of the interrupt stack.

From: Jan Beulich <[email protected]>

arch/x86_64/kernel/entry.S +5 -7
@@ -1024,17 +1024,15 @@ ENTRY(machine_check)
 ENTRY(call_softirq)
 	CFI_STARTPROC
 	movq %gs:pda_irqstackptr,%rax
-	pushq %r15
-	CFI_ADJUST_CFA_OFFSET 8
-	movq %rsp,%r15
-	CFI_DEF_CFA_REGISTER	r15
+	movq %rsp,%rdx
+	CFI_DEF_CFA_REGISTER	rdx
 	incl %gs:pda_irqcount
 	cmove %rax,%rsp
+	pushq %rdx
+	/*todo CFI_DEF_CFA_EXPRESSION ...*/
 	call __do_softirq
-	movq %r15,%rsp
+	popq %rsp
 	CFI_DEF_CFA_REGISTER	rsp
 	decl %gs:pda_irqcount
-	popq %r15
-	CFI_ADJUST_CFA_OFFSET -8
 	ret
 	CFI_ENDPROC