There is no real reason to have a separate ASM entry point implementation for the legacy INT 0x80 syscall emulation on 64-bit. IDTENTRY provides all the functionality needed with the only difference that it does not: - save the syscall number (AX) into pt_regs::orig_ax - set pt_regs::ax to -ENOSYS Both can be done safely in the C code of an IDTENTRY before invoking any of the syscall related functions which depend on this convention. Aside of ASM code reduction this prepares for detecting and handling a local APIC injected vector 0x80. [ kirill.shutemov: More verbose comments ] Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: <stable@vger.kernel.org> # v6.0+
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ASM_X86_PROTO_H
|
|
#define _ASM_X86_PROTO_H
|
|
|
|
#include <asm/ldt.h>
|
|
|
|
struct task_struct;
|
|
|
|
/* misc architecture specific prototypes */
|
|
|
|
void syscall_init(void);
|
|
|
|
#ifdef CONFIG_X86_64
|
|
void entry_SYSCALL_64(void);
|
|
void entry_SYSCALL_64_safe_stack(void);
|
|
void entry_SYSRETQ_unsafe_stack(void);
|
|
void entry_SYSRETQ_end(void);
|
|
long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2);
|
|
#endif
|
|
|
|
#ifdef CONFIG_X86_32
|
|
void entry_INT80_32(void);
|
|
void entry_SYSENTER_32(void);
|
|
void __begin_SYSENTER_singlestep_region(void);
|
|
void __end_SYSENTER_singlestep_region(void);
|
|
#endif
|
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
void entry_SYSENTER_compat(void);
|
|
void __end_entry_SYSENTER_compat(void);
|
|
void entry_SYSCALL_compat(void);
|
|
void entry_SYSCALL_compat_safe_stack(void);
|
|
void entry_SYSRETL_compat_unsafe_stack(void);
|
|
void entry_SYSRETL_compat_end(void);
|
|
#else /* !CONFIG_IA32_EMULATION */
|
|
#define entry_SYSCALL_compat NULL
|
|
#define entry_SYSENTER_compat NULL
|
|
#endif
|
|
|
|
void x86_configure_nx(void);
|
|
|
|
extern int reboot_force;
|
|
|
|
long do_arch_prctl_common(int option, unsigned long arg2);
|
|
|
|
#endif /* _ASM_X86_PROTO_H */
|