OpenCloudOS-Kernel/arch/x86/entry
Masahiro Yamada 2e958a8a51 x86/entry/x32: Rename __x32_compat_sys_* to __x64_compat_sys_*
The SYSCALL macros are mapped to symbols as follows:

  __SYSCALL_COMMON(nr, sym)  -->  __x64_<sym>
  __SYSCALL_X32(nr, sym)     -->  __x32_<sym>

Originally, the syscalls in the x32 special range (512-547) were all
compat.

This assumption is now broken after the following commits:

  55db9c0e85 ("net: remove compat_sys_{get,set}sockopt")
  5f764d624a ("fs: remove the compat readv/writev syscalls")
  598b3cec83 ("fs: remove compat_sys_vmsplice")
  c3973b401e ("mm: remove compat_process_vm_{readv,writev}")

Those commits redefined __x32_sys_* to __x64_sys_* because there is no stub
like __x32_sys_*.

Defining them as follows is more sensible and cleaner.

  __SYSCALL_COMMON(nr, sym)  -->  __x64_<sym>
  __SYSCALL_X32(nr, sym)     -->  __x64_<sym>

This works because both x86_64 and x32 use the same ABI (RDI, RSI, RDX,
R10, R8, R9)

The ugly #define __x32_sys_* will go away.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210517073815.97426-2-masahiroy@kernel.org
2021-05-20 15:03:58 +02:00
..
syscalls Add Landlock, a new LSM from Mickaël Salaün <mic@linux.microsoft.com> 2021-05-01 18:50:44 -07:00
vdso A single fix for the x86 VDSO build infrastructure to address a compiler 2021-04-26 10:17:34 -07:00
vsyscall x86/mm: Convert mmu context ia32_compat into a proper flags field 2020-10-26 13:46:47 +01:00
Makefile x86/entry: Actually disable stack protector 2020-07-19 13:07:10 +02:00
calling.h x86/entry: Split PUSH_AND_CLEAR_REGS into two submacros 2021-05-12 10:49:15 +02:00
common.c x86/entry: Reverse arguments to do_syscall_64() 2021-05-12 10:49:14 +02:00
entry_32.S - turn the stack canary into a normal __percpu variable on 32-bit which 2021-04-27 17:45:09 -07:00
entry_64.S x86/entry: Reverse arguments to do_syscall_64() 2021-05-12 10:49:14 +02:00
entry_64_compat.S x86/sev-es: Introduce ip_within_syscall_gap() helper 2021-03-08 14:22:17 +01:00
syscall_32.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_64.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_x32.c x86/entry/x32: Rename __x32_compat_sys_* to __x64_compat_sys_* 2021-05-20 15:03:58 +02:00
thunk_32.S x86/entry: Remove unused THUNKs 2020-08-26 12:41:54 +02:00
thunk_64.S x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument 2021-01-19 11:06:14 +01:00