mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 12:52:30 +00:00
5ac9efa3c5
Tidy the naming convention for compat syscall subs. Hints which describe the purpose of the stub go in front and receive a double underscore to denote that they are generated on-the-fly by the COMPAT_SYSCALL_DEFINEx() macro. For the generic case, this means: t kernel_waitid # common C function (see kernel/exit.c) __do_compat_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) T __se_compat_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long, # casts them to unsigned long and then to # the declared type) T compat_sys_waitid # alias to __se_compat_sys_waitid() # (taking parameters as declared), to # be included in syscall table For x86, the naming is as follows: t kernel_waitid # common C function (see kernel/exit.c) __do_compat_sys_waitid # inlined helper doing the actual work # (takes original parameters as declared) t __se_compat_sys_waitid # sign-extending C function calling inlined # helper (takes parameters of type long, # casts them to unsigned long and then to # the declared type) T __ia32_compat_sys_waitid # IA32_EMULATION 32-bit-ptregs -> C stub, # calls __se_compat_sys_waitid(); to be # included in syscall table T __x32_compat_sys_waitid # x32 64-bit-ptregs -> C stub, calls # __se_compat_sys_waitid(); to be included # in syscall table If only one of IA32_EMULATION and x32 is enabled, __se_compat_sys_waitid() may be inlined into the stub __{ia32,x32}_compat_sys_waitid(). Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20180409105145.5364-3-linux@dominikbrodowski.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
/*
|
|
* syscalls.h - Linux syscall interfaces (arch-specific)
|
|
*
|
|
* Copyright (c) 2008 Jaswinder Singh Rajput
|
|
*
|
|
* This file is released under the GPLv2.
|
|
* See the file COPYING for more details.
|
|
*/
|
|
|
|
#ifndef _ASM_X86_SYSCALLS_H
|
|
#define _ASM_X86_SYSCALLS_H
|
|
|
|
#include <linux/compiler.h>
|
|
#include <linux/linkage.h>
|
|
#include <linux/signal.h>
|
|
#include <linux/types.h>
|
|
|
|
/* Common in X86_32 and X86_64 */
|
|
/* kernel/ioport.c */
|
|
long ksys_ioperm(unsigned long from, unsigned long num, int turn_on);
|
|
|
|
#ifdef CONFIG_X86_32
|
|
/*
|
|
* These definitions are only valid on pure 32-bit systems; x86-64 uses a
|
|
* different syscall calling convention
|
|
*/
|
|
asmlinkage long sys_ioperm(unsigned long, unsigned long, int);
|
|
asmlinkage long sys_iopl(unsigned int);
|
|
|
|
/* kernel/ldt.c */
|
|
asmlinkage long sys_modify_ldt(int, void __user *, unsigned long);
|
|
|
|
/* kernel/signal.c */
|
|
asmlinkage long sys_rt_sigreturn(void);
|
|
|
|
/* kernel/tls.c */
|
|
asmlinkage long sys_set_thread_area(struct user_desc __user *);
|
|
asmlinkage long sys_get_thread_area(struct user_desc __user *);
|
|
|
|
/* X86_32 only */
|
|
|
|
/* kernel/signal.c */
|
|
asmlinkage long sys_sigreturn(void);
|
|
|
|
/* kernel/vm86_32.c */
|
|
struct vm86_struct;
|
|
asmlinkage long sys_vm86old(struct vm86_struct __user *);
|
|
asmlinkage long sys_vm86(unsigned long, unsigned long);
|
|
|
|
#endif /* CONFIG_X86_32 */
|
|
#endif /* _ASM_X86_SYSCALLS_H */
|