File tree Expand file tree Collapse file tree 1 file changed +13
-21
lines changed Expand file tree Collapse file tree 1 file changed +13
-21
lines changed Original file line number Diff line number Diff line change 153
153
154
154
#endif /* CONFIG_X86_32_LAZY_GS */
155
155
156
- .macro SAVE_ALL
156
+ .macro SAVE_ALL pt_regs_ax = %eax
157
157
cld
158
158
PUSH_GS
159
159
pushl %fs
160
160
pushl %es
161
161
pushl %ds
162
- pushl %eax
162
+ pushl \pt_regs_ax
163
163
pushl %ebp
164
164
pushl %edi
165
165
pushl %esi
@@ -370,20 +370,17 @@ ENDPROC(entry_SYSENTER_32)
370
370
# system call handler stub
371
371
ENTRY(entry_INT80_32)
372
372
ASM_CLAC
373
- pushl %eax # save orig_eax
374
- SAVE_ALL
375
- GET_THREAD_INFO(%ebp )
376
- # system call tracing in operation / emulation
377
- testl $_TIF_WORK_SYSCALL_ENTRY, TI_flags(%ebp )
378
- jnz syscall_trace_entry
379
- cmpl $(NR_syscalls), %eax
380
- jae syscall_badsys
381
- syscall_call:
382
- call *sys_call_table(, %eax , 4 )
383
- syscall_after_call:
384
- movl %eax , PT_EAX(%esp ) # store the return value
385
- syscall_exit:
386
- jmp syscall_exit_work
373
+ pushl %eax /* pt_regs->orig_ax */
374
+ SAVE_ALL pt_regs_ax = $-ENOSYS /* save rest, load -ENOSYS into ax */
375
+
376
+ /*
377
+ * User mode is traced as though IRQs are on, and the interrupt gate
378
+ * turned them off.
379
+ */
380
+ TRACE_IRQS_OFF
381
+
382
+ movl %esp , %eax
383
+ call do_int80_syscall_32
387
384
388
385
restore_all:
389
386
TRACE_IRQS_IRET
@@ -491,11 +488,6 @@ syscall_fault:
491
488
jmp resume_userspace
492
489
END(syscall_fault)
493
490
494
- syscall_badsys:
495
- movl $-ENOSYS, %eax
496
- jmp syscall_after_call
497
- END(syscall_badsys)
498
-
499
491
sysenter_badsys:
500
492
movl $-ENOSYS, %eax
501
493
jmp sysenter_after_call
You can’t perform that action at this time.
0 commit comments