aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/entry_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/entry_64.S')
-rw-r--r--arch/x86/kernel/entry_64.S23
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 07d69f262337..466b9284ed2f 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -168,13 +168,13 @@ ENTRY(ret_from_fork)
168 CFI_ADJUST_CFA_OFFSET -4 168 CFI_ADJUST_CFA_OFFSET -4
169 call schedule_tail 169 call schedule_tail
170 GET_THREAD_INFO(%rcx) 170 GET_THREAD_INFO(%rcx)
171 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),threadinfo_flags(%rcx) 171 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
172 jnz rff_trace 172 jnz rff_trace
173rff_action: 173rff_action:
174 RESTORE_REST 174 RESTORE_REST
175 testl $3,CS-ARGOFFSET(%rsp) # from kernel_thread? 175 testl $3,CS-ARGOFFSET(%rsp) # from kernel_thread?
176 je int_ret_from_sys_call 176 je int_ret_from_sys_call
177 testl $_TIF_IA32,threadinfo_flags(%rcx) 177 testl $_TIF_IA32,TI_flags(%rcx)
178 jnz int_ret_from_sys_call 178 jnz int_ret_from_sys_call
179 RESTORE_TOP_OF_STACK %rdi,ARGOFFSET 179 RESTORE_TOP_OF_STACK %rdi,ARGOFFSET
180 jmp ret_from_sys_call 180 jmp ret_from_sys_call
@@ -243,7 +243,8 @@ ENTRY(system_call_after_swapgs)
243 movq %rcx,RIP-ARGOFFSET(%rsp) 243 movq %rcx,RIP-ARGOFFSET(%rsp)
244 CFI_REL_OFFSET rip,RIP-ARGOFFSET 244 CFI_REL_OFFSET rip,RIP-ARGOFFSET
245 GET_THREAD_INFO(%rcx) 245 GET_THREAD_INFO(%rcx)
246 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%rcx) 246 testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \
247 TI_flags(%rcx)
247 jnz tracesys 248 jnz tracesys
248 cmpq $__NR_syscall_max,%rax 249 cmpq $__NR_syscall_max,%rax
249 ja badsys 250 ja badsys
@@ -262,7 +263,7 @@ sysret_check:
262 GET_THREAD_INFO(%rcx) 263 GET_THREAD_INFO(%rcx)
263 DISABLE_INTERRUPTS(CLBR_NONE) 264 DISABLE_INTERRUPTS(CLBR_NONE)
264 TRACE_IRQS_OFF 265 TRACE_IRQS_OFF
265 movl threadinfo_flags(%rcx),%edx 266 movl TI_flags(%rcx),%edx
266 andl %edi,%edx 267 andl %edi,%edx
267 jnz sysret_careful 268 jnz sysret_careful
268 CFI_REMEMBER_STATE 269 CFI_REMEMBER_STATE
@@ -347,10 +348,10 @@ int_ret_from_sys_call:
347int_with_check: 348int_with_check:
348 LOCKDEP_SYS_EXIT_IRQ 349 LOCKDEP_SYS_EXIT_IRQ
349 GET_THREAD_INFO(%rcx) 350 GET_THREAD_INFO(%rcx)
350 movl threadinfo_flags(%rcx),%edx 351 movl TI_flags(%rcx),%edx
351 andl %edi,%edx 352 andl %edi,%edx
352 jnz int_careful 353 jnz int_careful
353 andl $~TS_COMPAT,threadinfo_status(%rcx) 354 andl $~TS_COMPAT,TI_status(%rcx)
354 jmp retint_swapgs 355 jmp retint_swapgs
355 356
356 /* Either reschedule or signal or syscall exit tracking needed. */ 357 /* Either reschedule or signal or syscall exit tracking needed. */
@@ -558,7 +559,7 @@ retint_with_reschedule:
558 movl $_TIF_WORK_MASK,%edi 559 movl $_TIF_WORK_MASK,%edi
559retint_check: 560retint_check:
560 LOCKDEP_SYS_EXIT_IRQ 561 LOCKDEP_SYS_EXIT_IRQ
561 movl threadinfo_flags(%rcx),%edx 562 movl TI_flags(%rcx),%edx
562 andl %edi,%edx 563 andl %edi,%edx
563 CFI_REMEMBER_STATE 564 CFI_REMEMBER_STATE
564 jnz retint_careful 565 jnz retint_careful
@@ -654,9 +655,9 @@ retint_signal:
654 /* Returning to kernel space. Check if we need preemption */ 655 /* Returning to kernel space. Check if we need preemption */
655 /* rcx: threadinfo. interrupts off. */ 656 /* rcx: threadinfo. interrupts off. */
656ENTRY(retint_kernel) 657ENTRY(retint_kernel)
657 cmpl $0,threadinfo_preempt_count(%rcx) 658 cmpl $0,TI_preempt_count(%rcx)
658 jnz retint_restore_args 659 jnz retint_restore_args
659 bt $TIF_NEED_RESCHED,threadinfo_flags(%rcx) 660 bt $TIF_NEED_RESCHED,TI_flags(%rcx)
660 jnc retint_restore_args 661 jnc retint_restore_args
661 bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */ 662 bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */
662 jnc retint_restore_args 663 jnc retint_restore_args
@@ -819,7 +820,7 @@ paranoid_restore\trace:
819 jmp irq_return 820 jmp irq_return
820paranoid_userspace\trace: 821paranoid_userspace\trace:
821 GET_THREAD_INFO(%rcx) 822 GET_THREAD_INFO(%rcx)
822 movl threadinfo_flags(%rcx),%ebx 823 movl TI_flags(%rcx),%ebx
823 andl $_TIF_WORK_MASK,%ebx 824 andl $_TIF_WORK_MASK,%ebx
824 jz paranoid_swapgs\trace 825 jz paranoid_swapgs\trace
825 movq %rsp,%rdi /* &pt_regs */ 826 movq %rsp,%rdi /* &pt_regs */
@@ -917,7 +918,7 @@ error_exit:
917 testl %eax,%eax 918 testl %eax,%eax
918 jne retint_kernel 919 jne retint_kernel
919 LOCKDEP_SYS_EXIT_IRQ 920 LOCKDEP_SYS_EXIT_IRQ
920 movl threadinfo_flags(%rcx),%edx 921 movl TI_flags(%rcx),%edx
921 movl $_TIF_WORK_MASK,%edi 922 movl $_TIF_WORK_MASK,%edi
922 andl %edi,%edx 923 andl %edi,%edx
923 jnz retint_careful 924 jnz retint_careful