Skip to content

Commit

Permalink
x86-64: Fix unwind annotations in syscall stubs
Browse files Browse the repository at this point in the history
With the return address removed from the stack, these should
really refer to their caller's register state.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Alexander van Heukelum <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Jan Beulich authored and Ingo Molnar committed Sep 3, 2010
1 parent 2bfc96a commit e6b04b6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,8 @@ END(ptregscall_common)

ENTRY(stub_execve)
CFI_STARTPROC
popq %r11
CFI_ADJUST_CFA_OFFSET -8
CFI_REGISTER rip, r11
addq $8, %rsp
PARTIAL_FRAME 0
SAVE_REST
FIXUP_TOP_OF_STACK %r11
movq %rsp, %rcx
Expand All @@ -735,7 +734,7 @@ END(stub_execve)
ENTRY(stub_rt_sigreturn)
CFI_STARTPROC
addq $8, %rsp
CFI_ADJUST_CFA_OFFSET -8
PARTIAL_FRAME 0
SAVE_REST
movq %rsp,%rdi
FIXUP_TOP_OF_STACK %r11
Expand Down Expand Up @@ -1445,7 +1444,6 @@ error_swapgs:
error_sti:
TRACE_IRQS_OFF
ret
CFI_ENDPROC

/*
* There are two places in the kernel that can potentially fault with
Expand All @@ -1470,6 +1468,7 @@ bstep_iret:
/* Fix truncated RIP */
movq %rcx,RIP+8(%rsp)
jmp error_swapgs
CFI_ENDPROC
END(error_entry)


Expand Down

0 comments on commit e6b04b6

Please sign in to comment.