|
6 | 6 | #ifndef _ASM_X86_SYSCALL_WRAPPER_H
|
7 | 7 | #define _ASM_X86_SYSCALL_WRAPPER_H
|
8 | 8 |
|
| 9 | +struct pt_regs; |
| 10 | + |
9 | 11 | /* Mapping of registers to parameters for syscalls on x86-64 and x32 */
|
10 | 12 | #define SC_X86_64_REGS_TO_ARGS(x, ...) \
|
11 | 13 | __MAP(x,__SC_ARGS \
|
|
64 | 66 | SYSCALL_ALIAS(__ia32_sys_##sname, __x64_sys_##sname); \
|
65 | 67 | asmlinkage long __x64_sys_##sname(const struct pt_regs *__unused)
|
66 | 68 |
|
67 |
| -#define COND_SYSCALL(name) \ |
68 |
| - cond_syscall(__x64_sys_##name); \ |
69 |
| - cond_syscall(__ia32_sys_##name) |
| 69 | +#define COND_SYSCALL(name) \ |
| 70 | + asmlinkage __weak long __x64_sys_##name(const struct pt_regs *__unused) \ |
| 71 | + { \ |
| 72 | + return sys_ni_syscall(); \ |
| 73 | + } \ |
| 74 | + asmlinkage __weak long __ia32_sys_##name(const struct pt_regs *__unused)\ |
| 75 | + { \ |
| 76 | + return sys_ni_syscall(); \ |
| 77 | + } |
70 | 78 |
|
71 | 79 | #define SYS_NI(name) \
|
72 | 80 | SYSCALL_ALIAS(__x64_sys_##name, sys_ni_posix_timers); \
|
|
218 | 226 | #endif
|
219 | 227 |
|
220 | 228 | #ifndef COND_SYSCALL
|
221 |
| -#define COND_SYSCALL(name) cond_syscall(__x64_sys_##name) |
| 229 | +#define COND_SYSCALL(name) \ |
| 230 | + asmlinkage __weak long __x64_sys_##name(const struct pt_regs *__unused) \ |
| 231 | + { \ |
| 232 | + return sys_ni_syscall(); \ |
| 233 | + } |
222 | 234 | #endif
|
223 | 235 |
|
224 | 236 | #ifndef SYS_NI
|
|
230 | 242 | * For VSYSCALLS, we need to declare these three syscalls with the new
|
231 | 243 | * pt_regs-based calling convention for in-kernel use.
|
232 | 244 | */
|
233 |
| -struct pt_regs; |
234 | 245 | asmlinkage long __x64_sys_getcpu(const struct pt_regs *regs);
|
235 | 246 | asmlinkage long __x64_sys_gettimeofday(const struct pt_regs *regs);
|
236 | 247 | asmlinkage long __x64_sys_time(const struct pt_regs *regs);
|
|
0 commit comments