aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/entry/entry_32.S34
1 files changed, 13 insertions, 21 deletions
diff --git a/arch/x86/entry/entry_32.S b/arch/x86/entry/entry_32.S
index 36b6beb181f6..02881e528945 100644
--- a/arch/x86/entry/entry_32.S
+++ b/arch/x86/entry/entry_32.S
@@ -153,13 +153,13 @@
153 153
154#endif /* CONFIG_X86_32_LAZY_GS */ 154#endif /* CONFIG_X86_32_LAZY_GS */
155 155
156.macro SAVE_ALL 156.macro SAVE_ALL pt_regs_ax=%eax
157 cld 157 cld
158 PUSH_GS 158 PUSH_GS
159 pushl %fs 159 pushl %fs
160 pushl %es 160 pushl %es
161 pushl %ds 161 pushl %ds
162 pushl %eax 162 pushl \pt_regs_ax
163 pushl %ebp 163 pushl %ebp
164 pushl %edi 164 pushl %edi
165 pushl %esi 165 pushl %esi
@@ -370,20 +370,17 @@ ENDPROC(entry_SYSENTER_32)
370 # system call handler stub 370 # system call handler stub
371ENTRY(entry_INT80_32) 371ENTRY(entry_INT80_32)
372 ASM_CLAC 372 ASM_CLAC
373 pushl %eax # save orig_eax 373 pushl %eax /* pt_regs->orig_ax */
374 SAVE_ALL 374 SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest, load -ENOSYS into ax */
375 GET_THREAD_INFO(%ebp) 375
376 # system call tracing in operation / emulation 376 /*
377 testl $_TIF_WORK_SYSCALL_ENTRY, TI_flags(%ebp) 377 * User mode is traced as though IRQs are on, and the interrupt gate
378 jnz syscall_trace_entry 378 * turned them off.
379 cmpl $(NR_syscalls), %eax 379 */
380 jae syscall_badsys 380 TRACE_IRQS_OFF
381syscall_call: 381
382 call *sys_call_table(, %eax, 4) 382 movl %esp, %eax
383syscall_after_call: 383 call do_int80_syscall_32
384 movl %eax, PT_EAX(%esp) # store the return value
385syscall_exit:
386 jmp syscall_exit_work
387 384
388restore_all: 385restore_all:
389 TRACE_IRQS_IRET 386 TRACE_IRQS_IRET
@@ -491,11 +488,6 @@ syscall_fault:
491 jmp resume_userspace 488 jmp resume_userspace
492END(syscall_fault) 489END(syscall_fault)
493 490
494syscall_badsys:
495 movl $-ENOSYS, %eax
496 jmp syscall_after_call
497END(syscall_badsys)
498
499sysenter_badsys: 491sysenter_badsys:
500 movl $-ENOSYS, %eax 492 movl $-ENOSYS, %eax
501 jmp sysenter_after_call 493 jmp sysenter_after_call