Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c05991ed authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Add kernel thread stack frame termination for properly stopping stack unwinds.



One open question: Should these added pushes perhaps be made
conditional upon CONFIG_STACK_UNWIND or CONFIG_UNWIND_INFO?
[AK: Not needed -- these are all very slow paths]

Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 11012d41
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -973,6 +973,8 @@ ENTRY(kernel_thread)
ENDPROC(kernel_thread)
	
child_rip:
	pushq $0		# fake return address
	CFI_STARTPROC
	/*
	 * Here we are in the child and the registers are set as they were
	 * at kernel_thread() invocation in the parent.
@@ -983,6 +985,7 @@ child_rip:
	# exit
	xorl %edi, %edi
	call do_exit
	CFI_ENDPROC
ENDPROC(child_rip)

/*
+1 −0
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ startup_64:
	 * jump
	 */
	movq	initial_code(%rip),%rax
	pushq	$0		# fake return address
	jmp	*%rax

	/* SMP bootup changes these two */