sys_ni.c 7.27 KB
Newer Older
1
// SPDX-License-Identifier: GPL-2.0
Linus Torvalds's avatar
Linus Torvalds committed
2 3 4 5 6 7

#include <linux/linkage.h>
#include <linux/errno.h>

#include <asm/unistd.h>

8 9 10 11
/*  we can't #include <linux/syscalls.h> here,
    but tell gcc to not warn with -Wmissing-prototypes  */
asmlinkage long sys_ni_syscall(void);

Linus Torvalds's avatar
Linus Torvalds committed
12 13 14 15 16 17 18 19 20
/*
 * Non-implemented system calls get redirected here.
 */
asmlinkage long sys_ni_syscall(void)
{
	return -ENOSYS;
}

cond_syscall(sys_quotactl);
21
cond_syscall(sys32_quotactl);
Linus Torvalds's avatar
Linus Torvalds committed
22 23
cond_syscall(sys_acct);
cond_syscall(sys_lookup_dcookie);
Al Viro's avatar
Al Viro committed
24
cond_syscall(compat_sys_lookup_dcookie);
Linus Torvalds's avatar
Linus Torvalds committed
25 26
cond_syscall(sys_swapon);
cond_syscall(sys_swapoff);
27 28
cond_syscall(sys_kexec_load);
cond_syscall(compat_sys_kexec_load);
29
cond_syscall(sys_kexec_file_load);
Linus Torvalds's avatar
Linus Torvalds committed
30
cond_syscall(sys_init_module);
31
cond_syscall(sys_finit_module);
Linus Torvalds's avatar
Linus Torvalds committed
32 33 34 35 36
cond_syscall(sys_delete_module);
cond_syscall(sys_socketpair);
cond_syscall(sys_bind);
cond_syscall(sys_listen);
cond_syscall(sys_accept);
Ulrich Drepper's avatar
Ulrich Drepper committed
37
cond_syscall(sys_accept4);
Linus Torvalds's avatar
Linus Torvalds committed
38 39 40 41 42 43 44 45 46
cond_syscall(sys_connect);
cond_syscall(sys_getsockname);
cond_syscall(sys_getpeername);
cond_syscall(sys_sendto);
cond_syscall(sys_send);
cond_syscall(sys_recvfrom);
cond_syscall(sys_recv);
cond_syscall(sys_socket);
cond_syscall(sys_setsockopt);
47
cond_syscall(compat_sys_setsockopt);
Linus Torvalds's avatar
Linus Torvalds committed
48
cond_syscall(sys_getsockopt);
49
cond_syscall(compat_sys_getsockopt);
Linus Torvalds's avatar
Linus Torvalds committed
50 51
cond_syscall(sys_shutdown);
cond_syscall(sys_sendmsg);
52
cond_syscall(sys_sendmmsg);
53
cond_syscall(compat_sys_sendmsg);
54
cond_syscall(compat_sys_sendmmsg);
Linus Torvalds's avatar
Linus Torvalds committed
55
cond_syscall(sys_recvmsg);
56
cond_syscall(sys_recvmmsg);
57
cond_syscall(compat_sys_recvmsg);
58
cond_syscall(compat_sys_recv);
59
cond_syscall(compat_sys_recvfrom);
60
cond_syscall(compat_sys_recvmmsg);
Linus Torvalds's avatar
Linus Torvalds committed
61 62 63
cond_syscall(sys_socketcall);
cond_syscall(sys_futex);
cond_syscall(compat_sys_futex);
64 65 66 67
cond_syscall(sys_set_robust_list);
cond_syscall(compat_sys_set_robust_list);
cond_syscall(sys_get_robust_list);
cond_syscall(compat_sys_get_robust_list);
Linus Torvalds's avatar
Linus Torvalds committed
68
cond_syscall(sys_epoll_create);
69
cond_syscall(sys_epoll_create1);
Linus Torvalds's avatar
Linus Torvalds committed
70 71
cond_syscall(sys_epoll_ctl);
cond_syscall(sys_epoll_wait);
72
cond_syscall(sys_epoll_pwait);
73
cond_syscall(compat_sys_epoll_pwait);
Linus Torvalds's avatar
Linus Torvalds committed
74 75 76
cond_syscall(sys_semget);
cond_syscall(sys_semop);
cond_syscall(sys_semtimedop);
77
cond_syscall(compat_sys_semtimedop);
Linus Torvalds's avatar
Linus Torvalds committed
78
cond_syscall(sys_semctl);
79
cond_syscall(compat_sys_semctl);
Linus Torvalds's avatar
Linus Torvalds committed
80 81
cond_syscall(sys_msgget);
cond_syscall(sys_msgsnd);
82
cond_syscall(compat_sys_msgsnd);
Linus Torvalds's avatar
Linus Torvalds committed
83
cond_syscall(sys_msgrcv);
84
cond_syscall(compat_sys_msgrcv);
Linus Torvalds's avatar
Linus Torvalds committed
85
cond_syscall(sys_msgctl);
86
cond_syscall(compat_sys_msgctl);
Linus Torvalds's avatar
Linus Torvalds committed
87
cond_syscall(sys_shmget);
88
cond_syscall(sys_shmat);
89
cond_syscall(compat_sys_shmat);
Linus Torvalds's avatar
Linus Torvalds committed
90 91
cond_syscall(sys_shmdt);
cond_syscall(sys_shmctl);
92
cond_syscall(compat_sys_shmctl);
Linus Torvalds's avatar
Linus Torvalds committed
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
cond_syscall(sys_mq_open);
cond_syscall(sys_mq_unlink);
cond_syscall(sys_mq_timedsend);
cond_syscall(sys_mq_timedreceive);
cond_syscall(sys_mq_notify);
cond_syscall(sys_mq_getsetattr);
cond_syscall(compat_sys_mq_open);
cond_syscall(compat_sys_mq_timedsend);
cond_syscall(compat_sys_mq_timedreceive);
cond_syscall(compat_sys_mq_notify);
cond_syscall(compat_sys_mq_getsetattr);
cond_syscall(sys_mbind);
cond_syscall(sys_get_mempolicy);
cond_syscall(sys_set_mempolicy);
cond_syscall(compat_sys_mbind);
cond_syscall(compat_sys_get_mempolicy);
cond_syscall(compat_sys_set_mempolicy);
cond_syscall(sys_add_key);
cond_syscall(sys_request_key);
cond_syscall(sys_keyctl);
cond_syscall(compat_sys_keyctl);
cond_syscall(compat_sys_socketcall);
Robert Love's avatar
Robert Love committed
115
cond_syscall(sys_inotify_init);
Ulrich Drepper's avatar
Ulrich Drepper committed
116
cond_syscall(sys_inotify_init1);
Robert Love's avatar
Robert Love committed
117 118
cond_syscall(sys_inotify_add_watch);
cond_syscall(sys_inotify_rm_watch);
119
cond_syscall(sys_migrate_pages);
120
cond_syscall(sys_move_pages);
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
cond_syscall(sys_chown16);
cond_syscall(sys_fchown16);
cond_syscall(sys_getegid16);
cond_syscall(sys_geteuid16);
cond_syscall(sys_getgid16);
cond_syscall(sys_getgroups16);
cond_syscall(sys_getresgid16);
cond_syscall(sys_getresuid16);
cond_syscall(sys_getuid16);
cond_syscall(sys_lchown16);
cond_syscall(sys_setfsgid16);
cond_syscall(sys_setfsuid16);
cond_syscall(sys_setgid16);
cond_syscall(sys_setgroups16);
cond_syscall(sys_setregid16);
cond_syscall(sys_setresgid16);
cond_syscall(sys_setresuid16);
cond_syscall(sys_setreuid16);
cond_syscall(sys_setuid16);
140 141
cond_syscall(sys_sgetmask);
cond_syscall(sys_ssetmask);
142 143
cond_syscall(sys_vm86old);
cond_syscall(sys_vm86);
144
cond_syscall(sys_modify_ldt);
145
cond_syscall(sys_ipc);
146 147
cond_syscall(compat_sys_ipc);
cond_syscall(compat_sys_sysctl);
148
cond_syscall(sys_flock);
Thomas Petazzoni's avatar
Thomas Petazzoni committed
149 150 151 152 153
cond_syscall(sys_io_setup);
cond_syscall(sys_io_destroy);
cond_syscall(sys_io_submit);
cond_syscall(sys_io_cancel);
cond_syscall(sys_io_getevents);
Al Viro's avatar
Al Viro committed
154 155 156
cond_syscall(compat_sys_io_setup);
cond_syscall(compat_sys_io_submit);
cond_syscall(compat_sys_io_getevents);
157
cond_syscall(sys_sysfs);
158
cond_syscall(sys_syslog);
Christopher Yeoh's avatar
Christopher Yeoh committed
159 160 161 162
cond_syscall(sys_process_vm_readv);
cond_syscall(sys_process_vm_writev);
cond_syscall(compat_sys_process_vm_readv);
cond_syscall(compat_sys_process_vm_writev);
163
cond_syscall(sys_uselib);
164 165 166
cond_syscall(sys_fadvise64);
cond_syscall(sys_fadvise64_64);
cond_syscall(sys_madvise);
167 168 169 170 171 172 173 174 175 176 177 178 179 180
cond_syscall(sys_setuid);
cond_syscall(sys_setregid);
cond_syscall(sys_setgid);
cond_syscall(sys_setreuid);
cond_syscall(sys_setresuid);
cond_syscall(sys_getresuid);
cond_syscall(sys_setresgid);
cond_syscall(sys_getresgid);
cond_syscall(sys_setgroups);
cond_syscall(sys_getgroups);
cond_syscall(sys_setfsuid);
cond_syscall(sys_setfsgid);
cond_syscall(sys_capget);
cond_syscall(sys_capset);
181
cond_syscall(sys_copy_file_range);
Linus Torvalds's avatar
Linus Torvalds committed
182 183 184 185 186

/* arch-specific weak syscall entries */
cond_syscall(sys_pciconfig_read);
cond_syscall(sys_pciconfig_write);
cond_syscall(sys_pciconfig_iobase);
Al Viro's avatar
Al Viro committed
187
cond_syscall(compat_sys_s390_ipc);
Linus Torvalds's avatar
Linus Torvalds committed
188
cond_syscall(ppc_rtas);
189 190
cond_syscall(sys_spu_run);
cond_syscall(sys_spu_create);
191
cond_syscall(sys_subpage_prot);
192 193
cond_syscall(sys_s390_pci_mmio_read);
cond_syscall(sys_s390_pci_mmio_write);
194 195 196 197 198 199 200 201

/* mmu depending weak syscall entries */
cond_syscall(sys_mprotect);
cond_syscall(sys_msync);
cond_syscall(sys_mlock);
cond_syscall(sys_munlock);
cond_syscall(sys_mlockall);
cond_syscall(sys_munlockall);
202
cond_syscall(sys_mlock2);
203 204 205 206
cond_syscall(sys_mincore);
cond_syscall(sys_madvise);
cond_syscall(sys_mremap);
cond_syscall(sys_remap_file_pages);
207
cond_syscall(compat_sys_move_pages);
208
cond_syscall(compat_sys_migrate_pages);
209 210 211 212 213

/* block-layer dependent */
cond_syscall(sys_bdflush);
cond_syscall(sys_ioprio_set);
cond_syscall(sys_ioprio_get);
214 215 216

/* New file descriptors */
cond_syscall(sys_signalfd);
Ulrich Drepper's avatar
Ulrich Drepper committed
217
cond_syscall(sys_signalfd4);
218
cond_syscall(compat_sys_signalfd);
219
cond_syscall(compat_sys_signalfd4);
Davide Libenzi's avatar
Davide Libenzi committed
220 221 222 223 224
cond_syscall(sys_timerfd_create);
cond_syscall(sys_timerfd_settime);
cond_syscall(sys_timerfd_gettime);
cond_syscall(compat_sys_timerfd_settime);
cond_syscall(compat_sys_timerfd_gettime);
225
cond_syscall(sys_eventfd);
Ulrich Drepper's avatar
Ulrich Drepper committed
226
cond_syscall(sys_eventfd2);
227
cond_syscall(sys_memfd_create);
228
cond_syscall(sys_userfaultfd);
229 230

/* performance counters: */
231
cond_syscall(sys_perf_event_open);
232 233 234

/* fanotify! */
cond_syscall(sys_fanotify_init);
235
cond_syscall(sys_fanotify_mark);
236
cond_syscall(compat_sys_fanotify_mark);
237 238 239

/* open by handle */
cond_syscall(sys_name_to_handle_at);
240 241
cond_syscall(sys_open_by_handle_at);
cond_syscall(compat_sys_open_by_handle_at);
242 243 244

/* compare kernel pointers */
cond_syscall(sys_kcmp);
Kees Cook's avatar
Kees Cook committed
245 246 247

/* operate on Secure Computing state */
cond_syscall(sys_seccomp);
248 249 250

/* access BPF programs and maps */
cond_syscall(sys_bpf);
251 252 253

/* execveat */
cond_syscall(sys_execveat);
254 255 256

/* membarrier */
cond_syscall(sys_membarrier);
257 258 259 260 261

/* memory protection keys */
cond_syscall(sys_pkey_mprotect);
cond_syscall(sys_pkey_alloc);
cond_syscall(sys_pkey_free);