Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121025
b: refs/heads/master
c: 5b3eec0
h: refs/heads/master
i:
  121023: 1013ccd
v: v3
  • Loading branch information
Ingo Molnar committed Nov 28, 2008
1 parent a8ecbde commit 0ec5e04
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3bdae4f46445ea7cc9ee031d7ff106fdc6228669
refs/heads/master: 5b3eec0c80038c8739ccd465b897a35c0dff1cc4
31 changes: 16 additions & 15 deletions trunk/arch/x86/kernel/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -361,34 +361,35 @@ ENTRY(save_paranoid)
END(save_paranoid)

/*
* A newly forked process directly context switches into this.
* A newly forked process directly context switches into this address.
*
* rdi: prev task we switched from
*/
/* rdi: prev */
ENTRY(ret_from_fork)
DEFAULT_FRAME

push kernel_eflags(%rip)
CFI_ADJUST_CFA_OFFSET 8
popf # reset kernel eflags
popf # reset kernel eflags
CFI_ADJUST_CFA_OFFSET -8
call schedule_tail

call schedule_tail # rdi: 'prev' task parameter

GET_THREAD_INFO(%rcx)
testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)

CFI_REMEMBER_STATE
jnz rff_trace
rff_action:
RESTORE_REST
testl $3,CS-ARGOFFSET(%rsp) # from kernel_thread?

testl $3, CS-ARGOFFSET(%rsp) # from kernel_thread?
je int_ret_from_sys_call
testl $_TIF_IA32,TI_flags(%rcx)

testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET
jnz int_ret_from_sys_call

RESTORE_TOP_OF_STACK %rdi, -ARGOFFSET
jmp ret_from_sys_call
jmp ret_from_sys_call # go to the SYSRET fastpath

CFI_RESTORE_STATE
rff_trace:
movq %rsp,%rdi
call syscall_trace_leave
GET_THREAD_INFO(%rcx)
jmp rff_action
CFI_ENDPROC
END(ret_from_fork)

Expand Down

0 comments on commit 0ec5e04

Please sign in to comment.