*/
.globl ret_from_sys_call
ret_from_sys_call:
- movl $_TIF_WORK_MASK,%edi
+ movl $_TIF_ALLWORK_MASK,%edi
/* edi: flagmask */
sysret_check:
GET_THREAD_INFO(%rcx)
jmp sysret_check
/* Handle a signal */
+ /* edx: work flags (arg3) */
sysret_signal:
sti
- testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
- jz 1f
-
- /* Really a signal */
- /* edx: work flags (arg3) */
leaq do_notify_resume(%rip),%rax
leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
xorl %esi,%esi # oldset -> arg2
call ptregscall_common
-1: movl $_TIF_NEED_RESCHED,%edi
jmp sysret_check
/* Do syscall tracing */
jmp retint_check
retint_signal:
- testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
- jz retint_swapgs
sti
SAVE_REST
movq $-1,ORIG_RAX(%rsp)
call do_notify_resume
RESTORE_REST
cli
- movl $_TIF_NEED_RESCHED,%edi
GET_THREAD_INFO(%rcx)
jmp retint_check
cli
GET_THREAD_INFO(%rcx)
movl threadinfo_flags(%rcx),%edx
+ testl $_TIF_WORK_MASK,%edx
+ jz paranoid_swapgs
testl $_TIF_NEED_RESCHED,%edx
jnz paranoid_resched
- testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx
- jnz paranoid_signal
- jmp paranoid_swapgs
-paranoid_resched:
- sti
- call schedule
- jmp paranoid_exit
-paranoid_signal:
sti
xorl %esi,%esi /* oldset */
movq %rsp,%rdi /* &pt_regs */
call do_notify_resume
jmp paranoid_exit
+paranoid_resched:
+ sti
+ call schedule
+ jmp paranoid_exit
CFI_ENDPROC
ENTRY(int3)