diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-09 06:51:45 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-04-09 10:47:28 -0400 |
commit | c76fc98260751e71c884dc1a18a07e427ef033b5 (patch) | |
tree | 130f14e4f66f69ab94b81740766c72971377957e | |
parent | d5a00528b58cdb2c71206e18bd021e34c4eab878 (diff) |
syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention
Make the code in syscall_wrapper.h more readable by naming the stub macros
similar to the stub they provide. While at it, fix a stray newline at the
end of the __IA32_COMPAT_SYS_STUBx macro.
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-5-linux@dominikbrodowski.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/include/asm/syscall_wrapper.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h index a598013e08e9..e046a405743d 100644 --- a/arch/x86/include/asm/syscall_wrapper.h +++ b/arch/x86/include/asm/syscall_wrapper.h | |||
@@ -28,7 +28,7 @@ | |||
28 | * kernel/sys_ni.c and SYS_NI in kernel/time/posix-stubs.c to cover this | 28 | * kernel/sys_ni.c and SYS_NI in kernel/time/posix-stubs.c to cover this |
29 | * case as well. | 29 | * case as well. |
30 | */ | 30 | */ |
31 | #define COMPAT_SC_IA32_STUBx(x, name, ...) \ | 31 | #define __IA32_COMPAT_SYS_STUBx(x, name, ...) \ |
32 | asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs);\ | 32 | asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs);\ |
33 | ALLOW_ERROR_INJECTION(__ia32_compat_sys##name, ERRNO); \ | 33 | ALLOW_ERROR_INJECTION(__ia32_compat_sys##name, ERRNO); \ |
34 | asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs)\ | 34 | asmlinkage long __ia32_compat_sys##name(const struct pt_regs *regs)\ |
@@ -36,7 +36,7 @@ | |||
36 | return __se_compat_sys##name(SC_IA32_REGS_TO_ARGS(x,__VA_ARGS__));\ | 36 | return __se_compat_sys##name(SC_IA32_REGS_TO_ARGS(x,__VA_ARGS__));\ |
37 | } \ | 37 | } \ |
38 | 38 | ||
39 | #define SC_IA32_WRAPPERx(x, name, ...) \ | 39 | #define __IA32_SYS_STUBx(x, name, ...) \ |
40 | asmlinkage long __ia32_sys##name(const struct pt_regs *regs); \ | 40 | asmlinkage long __ia32_sys##name(const struct pt_regs *regs); \ |
41 | ALLOW_ERROR_INJECTION(__ia32_sys##name, ERRNO); \ | 41 | ALLOW_ERROR_INJECTION(__ia32_sys##name, ERRNO); \ |
42 | asmlinkage long __ia32_sys##name(const struct pt_regs *regs) \ | 42 | asmlinkage long __ia32_sys##name(const struct pt_regs *regs) \ |
@@ -64,8 +64,8 @@ | |||
64 | SYSCALL_ALIAS(__ia32_sys_##name, sys_ni_posix_timers) | 64 | SYSCALL_ALIAS(__ia32_sys_##name, sys_ni_posix_timers) |
65 | 65 | ||
66 | #else /* CONFIG_IA32_EMULATION */ | 66 | #else /* CONFIG_IA32_EMULATION */ |
67 | #define COMPAT_SC_IA32_STUBx(x, name, ...) | 67 | #define __IA32_COMPAT_SYS_STUBx(x, name, ...) |
68 | #define SC_IA32_WRAPPERx(x, fullname, name, ...) | 68 | #define __IA32_SYS_STUBx(x, fullname, name, ...) |
69 | #endif /* CONFIG_IA32_EMULATION */ | 69 | #endif /* CONFIG_IA32_EMULATION */ |
70 | 70 | ||
71 | 71 | ||
@@ -75,7 +75,7 @@ | |||
75 | * of the x86-64-style parameter ordering of x32 syscalls. The syscalls common | 75 | * of the x86-64-style parameter ordering of x32 syscalls. The syscalls common |
76 | * with x86_64 obviously do not need such care. | 76 | * with x86_64 obviously do not need such care. |
77 | */ | 77 | */ |
78 | #define COMPAT_SC_X32_STUBx(x, name, ...) \ | 78 | #define __X32_COMPAT_SYS_STUBx(x, name, ...) \ |
79 | asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ | 79 | asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ |
80 | ALLOW_ERROR_INJECTION(__x32_compat_sys##name, ERRNO); \ | 80 | ALLOW_ERROR_INJECTION(__x32_compat_sys##name, ERRNO); \ |
81 | asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ | 81 | asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ |
@@ -84,7 +84,7 @@ | |||
84 | } \ | 84 | } \ |
85 | 85 | ||
86 | #else /* CONFIG_X86_X32 */ | 86 | #else /* CONFIG_X86_X32 */ |
87 | #define COMPAT_SC_X32_STUBx(x, name, ...) | 87 | #define __X32_COMPAT_SYS_STUBx(x, name, ...) |
88 | #endif /* CONFIG_X86_X32 */ | 88 | #endif /* CONFIG_X86_X32 */ |
89 | 89 | ||
90 | 90 | ||
@@ -97,8 +97,8 @@ | |||
97 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 97 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
98 | static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ | 98 | static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ |
99 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ | 99 | static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
100 | COMPAT_SC_IA32_STUBx(x, name, __VA_ARGS__) \ | 100 | __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ |
101 | COMPAT_SC_X32_STUBx(x, name, __VA_ARGS__) \ | 101 | __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ |
102 | static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ | 102 | static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
103 | { \ | 103 | { \ |
104 | return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ | 104 | return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ |
@@ -163,7 +163,7 @@ | |||
163 | { \ | 163 | { \ |
164 | return __se_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ | 164 | return __se_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ |
165 | } \ | 165 | } \ |
166 | SC_IA32_WRAPPERx(x, name, __VA_ARGS__) \ | 166 | __IA32_SYS_STUBx(x, name, __VA_ARGS__) \ |
167 | static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ | 167 | static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
168 | { \ | 168 | { \ |
169 | long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\ | 169 | long ret = __do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\ |