Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/asm/entry: Rename compat syscall entry points

Rename the following system call entry points:

ia32_cstar_target -> entry_SYSCALL_compat
ia32_syscall -> entry_INT80_compat

The generic naming scheme for x86 system call entry points is:

entry_MNEMONIC_qualifier

where 'qualifier' is one of _32, _64 or _compat.

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
Signed-off-by: Ingo Molnar <mingo@kernel.org>

+15 -15
+2 -2
Documentation/x86/entry_64.txt
··· 18 18 19 19 - system_call: syscall instruction from 64-bit code. 20 20 21 - - ia32_syscall: int 0x80 from 32-bit or 64-bit code; compat syscall 21 + - entry_INT80_compat: int 0x80 from 32-bit or 64-bit code; compat syscall 22 22 either way. 23 23 24 - - ia32_syscall, ia32_sysenter: syscall and sysenter from 32-bit 24 + - entry_INT80_compat, ia32_sysenter: syscall and sysenter from 32-bit 25 25 code 26 26 27 27 - interrupt: An array of entries. Every IDT vector that doesn't
+4 -4
arch/x86/entry/entry_64_compat.S
··· 288 288 * path below. We set up a complete hardware stack frame to share code 289 289 * with the int 0x80 path. 290 290 */ 291 - ENTRY(ia32_cstar_target) 291 + ENTRY(entry_SYSCALL_compat) 292 292 /* 293 293 * Interrupts are off on entry. 294 294 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON, ··· 409 409 410 410 RESTORE_EXTRA_REGS 411 411 jmp cstar_do_call 412 - END(ia32_cstar_target) 412 + END(entry_SYSCALL_compat) 413 413 414 414 ia32_badarg: 415 415 ASM_CLAC ··· 445 445 * Assumes it is only called from user space and entered with interrupts off. 446 446 */ 447 447 448 - ENTRY(ia32_syscall) 448 + ENTRY(entry_INT80_compat) 449 449 /* 450 450 * Interrupts are off on entry. 451 451 * We do not frame this tiny irq-off block with TRACE_IRQS_OFF/ON, ··· 511 511 movl %eax, %eax /* zero extension */ 512 512 RESTORE_EXTRA_REGS 513 513 jmp ia32_do_call 514 - END(ia32_syscall) 514 + END(entry_INT80_compat) 515 515 516 516 .macro PTREGSCALL label, func 517 517 ALIGN
+3 -3
arch/x86/entry/syscall_32.c
··· 10 10 #else 11 11 #define SYM(sym, compat) sym 12 12 #define ia32_sys_call_table sys_call_table 13 - #define __NR_ia32_syscall_max __NR_syscall_max 13 + #define __NR_entry_INT80_compat_max __NR_syscall_max 14 14 #endif 15 15 16 16 #define __SYSCALL_I386(nr, sym, compat) extern asmlinkage void SYM(sym, compat)(void) ; ··· 23 23 24 24 extern asmlinkage void sys_ni_syscall(void); 25 25 26 - __visible const sys_call_ptr_t ia32_sys_call_table[__NR_ia32_syscall_max+1] = { 26 + __visible const sys_call_ptr_t ia32_sys_call_table[__NR_entry_INT80_compat_max+1] = { 27 27 /* 28 28 * Smells like a compiler bug -- it doesn't work 29 29 * when the & below is removed. 30 30 */ 31 - [0 ... __NR_ia32_syscall_max] = &sys_ni_syscall, 31 + [0 ... __NR_entry_INT80_compat_max] = &sys_ni_syscall, 32 32 #include <asm/syscalls_32.h> 33 33 };
+2 -2
arch/x86/include/asm/proto.h
··· 8 8 void system_call(void); 9 9 void syscall_init(void); 10 10 11 - void ia32_syscall(void); 12 - void ia32_cstar_target(void); 11 + void entry_INT80_compat(void); 12 + void entry_SYSCALL_compat(void); 13 13 void ia32_sysenter_target(void); 14 14 15 15 void x86_configure_nx(void);
+1 -1
arch/x86/kernel/asm-offsets_64.c
··· 66 66 DEFINE(__NR_syscall_max, sizeof(syscalls_64) - 1); 67 67 DEFINE(NR_syscalls, sizeof(syscalls_64)); 68 68 69 - DEFINE(__NR_ia32_syscall_max, sizeof(syscalls_ia32) - 1); 69 + DEFINE(__NR_entry_INT80_compat_max, sizeof(syscalls_ia32) - 1); 70 70 DEFINE(IA32_NR_syscalls, sizeof(syscalls_ia32)); 71 71 72 72 return 0;
+1 -1
arch/x86/kernel/cpu/common.c
··· 1207 1207 wrmsrl(MSR_LSTAR, system_call); 1208 1208 1209 1209 #ifdef CONFIG_IA32_EMULATION 1210 - wrmsrl(MSR_CSTAR, ia32_cstar_target); 1210 + wrmsrl(MSR_CSTAR, entry_SYSCALL_compat); 1211 1211 /* 1212 1212 * This only works on Intel CPUs. 1213 1213 * On AMD CPUs these MSRs are 32-bit, CPU truncates MSR_IA32_SYSENTER_EIP.
+1 -1
arch/x86/kernel/traps.c
··· 992 992 set_bit(i, used_vectors); 993 993 994 994 #ifdef CONFIG_IA32_EMULATION 995 - set_system_intr_gate(IA32_SYSCALL_VECTOR, ia32_syscall); 995 + set_system_intr_gate(IA32_SYSCALL_VECTOR, entry_INT80_compat); 996 996 set_bit(IA32_SYSCALL_VECTOR, used_vectors); 997 997 #endif 998 998
+1 -1
arch/x86/xen/xen-asm_64.S
··· 122 122 /* 32-bit compat syscall target */ 123 123 ENTRY(xen_syscall32_target) 124 124 undo_xen_syscall 125 - jmp ia32_cstar_target 125 + jmp entry_SYSCALL_compat 126 126 ENDPROC(xen_syscall32_target) 127 127 128 128 /* 32-bit compat sysenter target */