diff options
Diffstat (limited to 'arch/x86_64/kernel/entry.S')
-rw-r--r-- | arch/x86_64/kernel/entry.S | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 053d6e80c31f..12a307100929 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -197,7 +197,7 @@ ENTRY(system_call) | |||
197 | */ | 197 | */ |
198 | .globl ret_from_sys_call | 198 | .globl ret_from_sys_call |
199 | ret_from_sys_call: | 199 | ret_from_sys_call: |
200 | movl $_TIF_WORK_MASK,%edi | 200 | movl $_TIF_ALLWORK_MASK,%edi |
201 | /* edi: flagmask */ | 201 | /* edi: flagmask */ |
202 | sysret_check: | 202 | sysret_check: |
203 | GET_THREAD_INFO(%rcx) | 203 | GET_THREAD_INFO(%rcx) |
@@ -223,18 +223,13 @@ sysret_careful: | |||
223 | jmp sysret_check | 223 | jmp sysret_check |
224 | 224 | ||
225 | /* Handle a signal */ | 225 | /* Handle a signal */ |
226 | /* edx: work flags (arg3) */ | ||
226 | sysret_signal: | 227 | sysret_signal: |
227 | sti | 228 | sti |
228 | testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx | ||
229 | jz 1f | ||
230 | |||
231 | /* Really a signal */ | ||
232 | /* edx: work flags (arg3) */ | ||
233 | leaq do_notify_resume(%rip),%rax | 229 | leaq do_notify_resume(%rip),%rax |
234 | leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 | 230 | leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 |
235 | xorl %esi,%esi # oldset -> arg2 | 231 | xorl %esi,%esi # oldset -> arg2 |
236 | call ptregscall_common | 232 | call ptregscall_common |
237 | 1: movl $_TIF_NEED_RESCHED,%edi | ||
238 | jmp sysret_check | 233 | jmp sysret_check |
239 | 234 | ||
240 | /* Do syscall tracing */ | 235 | /* Do syscall tracing */ |
@@ -490,8 +485,6 @@ retint_careful: | |||
490 | jmp retint_check | 485 | jmp retint_check |
491 | 486 | ||
492 | retint_signal: | 487 | retint_signal: |
493 | testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx | ||
494 | jz retint_swapgs | ||
495 | sti | 488 | sti |
496 | SAVE_REST | 489 | SAVE_REST |
497 | movq $-1,ORIG_RAX(%rsp) | 490 | movq $-1,ORIG_RAX(%rsp) |
@@ -500,7 +493,6 @@ retint_signal: | |||
500 | call do_notify_resume | 493 | call do_notify_resume |
501 | RESTORE_REST | 494 | RESTORE_REST |
502 | cli | 495 | cli |
503 | movl $_TIF_NEED_RESCHED,%edi | ||
504 | GET_THREAD_INFO(%rcx) | 496 | GET_THREAD_INFO(%rcx) |
505 | jmp retint_check | 497 | jmp retint_check |
506 | 498 | ||
@@ -829,21 +821,19 @@ paranoid_userspace: | |||
829 | cli | 821 | cli |
830 | GET_THREAD_INFO(%rcx) | 822 | GET_THREAD_INFO(%rcx) |
831 | movl threadinfo_flags(%rcx),%edx | 823 | movl threadinfo_flags(%rcx),%edx |
824 | testl $_TIF_WORK_MASK,%edx | ||
825 | jz paranoid_swapgs | ||
832 | testl $_TIF_NEED_RESCHED,%edx | 826 | testl $_TIF_NEED_RESCHED,%edx |
833 | jnz paranoid_resched | 827 | jnz paranoid_resched |
834 | testl $(_TIF_SIGPENDING|_TIF_NOTIFY_RESUME|_TIF_SINGLESTEP),%edx | ||
835 | jnz paranoid_signal | ||
836 | jmp paranoid_swapgs | ||
837 | paranoid_resched: | ||
838 | sti | ||
839 | call schedule | ||
840 | jmp paranoid_exit | ||
841 | paranoid_signal: | ||
842 | sti | 828 | sti |
843 | xorl %esi,%esi /* oldset */ | 829 | xorl %esi,%esi /* oldset */ |
844 | movq %rsp,%rdi /* &pt_regs */ | 830 | movq %rsp,%rdi /* &pt_regs */ |
845 | call do_notify_resume | 831 | call do_notify_resume |
846 | jmp paranoid_exit | 832 | jmp paranoid_exit |
833 | paranoid_resched: | ||
834 | sti | ||
835 | call schedule | ||
836 | jmp paranoid_exit | ||
847 | CFI_ENDPROC | 837 | CFI_ENDPROC |
848 | 838 | ||
849 | ENTRY(int3) | 839 | ENTRY(int3) |