mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
x86/entry/32: Switch INT80 to the new C syscall path
Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/a7e8d8df96838eae3208dd0441023f3ce7a81831.1444091585.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
39e8701f33
commit
150ac78d63
@ -153,13 +153,13 @@
|
|||||||
|
|
||||||
#endif /* CONFIG_X86_32_LAZY_GS */
|
#endif /* CONFIG_X86_32_LAZY_GS */
|
||||||
|
|
||||||
.macro SAVE_ALL
|
.macro SAVE_ALL pt_regs_ax=%eax
|
||||||
cld
|
cld
|
||||||
PUSH_GS
|
PUSH_GS
|
||||||
pushl %fs
|
pushl %fs
|
||||||
pushl %es
|
pushl %es
|
||||||
pushl %ds
|
pushl %ds
|
||||||
pushl %eax
|
pushl \pt_regs_ax
|
||||||
pushl %ebp
|
pushl %ebp
|
||||||
pushl %edi
|
pushl %edi
|
||||||
pushl %esi
|
pushl %esi
|
||||||
@ -370,20 +370,17 @@ ENDPROC(entry_SYSENTER_32)
|
|||||||
# system call handler stub
|
# system call handler stub
|
||||||
ENTRY(entry_INT80_32)
|
ENTRY(entry_INT80_32)
|
||||||
ASM_CLAC
|
ASM_CLAC
|
||||||
pushl %eax # save orig_eax
|
pushl %eax /* pt_regs->orig_ax */
|
||||||
SAVE_ALL
|
SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest, load -ENOSYS into ax */
|
||||||
GET_THREAD_INFO(%ebp)
|
|
||||||
# system call tracing in operation / emulation
|
/*
|
||||||
testl $_TIF_WORK_SYSCALL_ENTRY, TI_flags(%ebp)
|
* User mode is traced as though IRQs are on, and the interrupt gate
|
||||||
jnz syscall_trace_entry
|
* turned them off.
|
||||||
cmpl $(NR_syscalls), %eax
|
*/
|
||||||
jae syscall_badsys
|
TRACE_IRQS_OFF
|
||||||
syscall_call:
|
|
||||||
call *sys_call_table(, %eax, 4)
|
movl %esp, %eax
|
||||||
syscall_after_call:
|
call do_int80_syscall_32
|
||||||
movl %eax, PT_EAX(%esp) # store the return value
|
|
||||||
syscall_exit:
|
|
||||||
jmp syscall_exit_work
|
|
||||||
|
|
||||||
restore_all:
|
restore_all:
|
||||||
TRACE_IRQS_IRET
|
TRACE_IRQS_IRET
|
||||||
@ -491,11 +488,6 @@ syscall_fault:
|
|||||||
jmp resume_userspace
|
jmp resume_userspace
|
||||||
END(syscall_fault)
|
END(syscall_fault)
|
||||||
|
|
||||||
syscall_badsys:
|
|
||||||
movl $-ENOSYS, %eax
|
|
||||||
jmp syscall_after_call
|
|
||||||
END(syscall_badsys)
|
|
||||||
|
|
||||||
sysenter_badsys:
|
sysenter_badsys:
|
||||||
movl $-ENOSYS, %eax
|
movl $-ENOSYS, %eax
|
||||||
jmp sysenter_after_call
|
jmp sysenter_after_call
|
||||||
|
Loading…
Reference in New Issue
Block a user