Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | |
| 2 | #include <linux/linkage.h> |
| 3 | #include <linux/errno.h> |
| 4 | |
| 5 | #include <asm/unistd.h> |
| 6 | |
Adrian Bunk | 0732a55 | 2007-10-16 23:29:25 -0700 | [diff] [blame] | 7 | /* we can't #include <linux/syscalls.h> here, |
| 8 | but tell gcc to not warn with -Wmissing-prototypes */ |
| 9 | asmlinkage long sys_ni_syscall(void); |
| 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | /* |
| 12 | * Non-implemented system calls get redirected here. |
| 13 | */ |
| 14 | asmlinkage long sys_ni_syscall(void) |
| 15 | { |
| 16 | return -ENOSYS; |
| 17 | } |
| 18 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | cond_syscall(sys_quotactl); |
Vasily Tarasov | b716395 | 2007-07-15 23:41:12 -0700 | [diff] [blame] | 20 | cond_syscall(sys32_quotactl); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | cond_syscall(sys_acct); |
| 22 | cond_syscall(sys_lookup_dcookie); |
Al Viro | d5dc77b | 2013-02-25 18:42:04 -0500 | [diff] [blame] | 23 | cond_syscall(compat_sys_lookup_dcookie); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | cond_syscall(sys_swapon); |
| 25 | cond_syscall(sys_swapoff); |
Eric W. Biederman | dc009d9 | 2005-06-25 14:57:52 -0700 | [diff] [blame] | 26 | cond_syscall(sys_kexec_load); |
| 27 | cond_syscall(compat_sys_kexec_load); |
Vivek Goyal | f089568 | 2014-08-08 14:25:55 -0700 | [diff] [blame] | 28 | cond_syscall(sys_kexec_file_load); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | cond_syscall(sys_init_module); |
Kees Cook | 34e1169 | 2012-10-16 07:31:07 +1030 | [diff] [blame] | 30 | cond_syscall(sys_finit_module); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | cond_syscall(sys_delete_module); |
| 32 | cond_syscall(sys_socketpair); |
| 33 | cond_syscall(sys_bind); |
| 34 | cond_syscall(sys_listen); |
| 35 | cond_syscall(sys_accept); |
Ulrich Drepper | de11def | 2008-11-19 15:36:14 -0800 | [diff] [blame] | 36 | cond_syscall(sys_accept4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | cond_syscall(sys_connect); |
| 38 | cond_syscall(sys_getsockname); |
| 39 | cond_syscall(sys_getpeername); |
| 40 | cond_syscall(sys_sendto); |
| 41 | cond_syscall(sys_send); |
| 42 | cond_syscall(sys_recvfrom); |
| 43 | cond_syscall(sys_recv); |
| 44 | cond_syscall(sys_socket); |
| 45 | cond_syscall(sys_setsockopt); |
David S. Miller | f3baa48 | 2007-10-29 00:54:39 -0700 | [diff] [blame] | 46 | cond_syscall(compat_sys_setsockopt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | cond_syscall(sys_getsockopt); |
David S. Miller | f3baa48 | 2007-10-29 00:54:39 -0700 | [diff] [blame] | 48 | cond_syscall(compat_sys_getsockopt); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | cond_syscall(sys_shutdown); |
| 50 | cond_syscall(sys_sendmsg); |
Anton Blanchard | 228e548 | 2011-05-02 20:21:35 +0000 | [diff] [blame] | 51 | cond_syscall(sys_sendmmsg); |
David S. Miller | f3baa48 | 2007-10-29 00:54:39 -0700 | [diff] [blame] | 52 | cond_syscall(compat_sys_sendmsg); |
Anton Blanchard | 228e548 | 2011-05-02 20:21:35 +0000 | [diff] [blame] | 53 | cond_syscall(compat_sys_sendmmsg); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | cond_syscall(sys_recvmsg); |
Arnaldo Carvalho de Melo | a2e2725 | 2009-10-12 23:40:10 -0700 | [diff] [blame] | 55 | cond_syscall(sys_recvmmsg); |
David S. Miller | f3baa48 | 2007-10-29 00:54:39 -0700 | [diff] [blame] | 56 | cond_syscall(compat_sys_recvmsg); |
Stephen Rothwell | 1ef2119 | 2010-09-03 13:19:04 +1000 | [diff] [blame] | 57 | cond_syscall(compat_sys_recv); |
Andrew Morton | dedcf29 | 2009-09-18 09:52:13 +0000 | [diff] [blame] | 58 | cond_syscall(compat_sys_recvfrom); |
Arnaldo Carvalho de Melo | a2e2725 | 2009-10-12 23:40:10 -0700 | [diff] [blame] | 59 | cond_syscall(compat_sys_recvmmsg); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | cond_syscall(sys_socketcall); |
| 61 | cond_syscall(sys_futex); |
| 62 | cond_syscall(compat_sys_futex); |
Ingo Molnar | 0771dfe | 2006-03-27 01:16:22 -0800 | [diff] [blame] | 63 | cond_syscall(sys_set_robust_list); |
| 64 | cond_syscall(compat_sys_set_robust_list); |
| 65 | cond_syscall(sys_get_robust_list); |
| 66 | cond_syscall(compat_sys_get_robust_list); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | cond_syscall(sys_epoll_create); |
Wang Chen | 5df439e | 2008-07-25 01:45:23 -0700 | [diff] [blame] | 68 | cond_syscall(sys_epoll_create1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | cond_syscall(sys_epoll_ctl); |
| 70 | cond_syscall(sys_epoll_wait); |
Randy Dunlap | 39af114 | 2006-10-16 09:01:46 -0700 | [diff] [blame] | 71 | cond_syscall(sys_epoll_pwait); |
Atsushi Nemoto | 5f17156 | 2008-07-21 14:21:37 -0700 | [diff] [blame] | 72 | cond_syscall(compat_sys_epoll_pwait); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | cond_syscall(sys_semget); |
| 74 | cond_syscall(sys_semop); |
| 75 | cond_syscall(sys_semtimedop); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 76 | cond_syscall(compat_sys_semtimedop); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | cond_syscall(sys_semctl); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 78 | cond_syscall(compat_sys_semctl); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | cond_syscall(sys_msgget); |
| 80 | cond_syscall(sys_msgsnd); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 81 | cond_syscall(compat_sys_msgsnd); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | cond_syscall(sys_msgrcv); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 83 | cond_syscall(compat_sys_msgrcv); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | cond_syscall(sys_msgctl); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 85 | cond_syscall(compat_sys_msgctl); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | cond_syscall(sys_shmget); |
Stephen Rothwell | 7d87e14c | 2005-05-01 08:59:12 -0700 | [diff] [blame] | 87 | cond_syscall(sys_shmat); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 88 | cond_syscall(compat_sys_shmat); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | cond_syscall(sys_shmdt); |
| 90 | cond_syscall(sys_shmctl); |
Kevin Cernekee | be84bfc | 2011-05-17 10:39:58 -0700 | [diff] [blame] | 91 | cond_syscall(compat_sys_shmctl); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | cond_syscall(sys_mq_open); |
| 93 | cond_syscall(sys_mq_unlink); |
| 94 | cond_syscall(sys_mq_timedsend); |
| 95 | cond_syscall(sys_mq_timedreceive); |
| 96 | cond_syscall(sys_mq_notify); |
| 97 | cond_syscall(sys_mq_getsetattr); |
| 98 | cond_syscall(compat_sys_mq_open); |
| 99 | cond_syscall(compat_sys_mq_timedsend); |
| 100 | cond_syscall(compat_sys_mq_timedreceive); |
| 101 | cond_syscall(compat_sys_mq_notify); |
| 102 | cond_syscall(compat_sys_mq_getsetattr); |
| 103 | cond_syscall(sys_mbind); |
| 104 | cond_syscall(sys_get_mempolicy); |
| 105 | cond_syscall(sys_set_mempolicy); |
| 106 | cond_syscall(compat_sys_mbind); |
| 107 | cond_syscall(compat_sys_get_mempolicy); |
| 108 | cond_syscall(compat_sys_set_mempolicy); |
| 109 | cond_syscall(sys_add_key); |
| 110 | cond_syscall(sys_request_key); |
| 111 | cond_syscall(sys_keyctl); |
| 112 | cond_syscall(compat_sys_keyctl); |
| 113 | cond_syscall(compat_sys_socketcall); |
Robert Love | 0eeca28 | 2005-07-12 17:06:03 -0400 | [diff] [blame] | 114 | cond_syscall(sys_inotify_init); |
Ulrich Drepper | 4006553 | 2008-07-23 21:29:32 -0700 | [diff] [blame] | 115 | cond_syscall(sys_inotify_init1); |
Robert Love | 0eeca28 | 2005-07-12 17:06:03 -0400 | [diff] [blame] | 116 | cond_syscall(sys_inotify_add_watch); |
| 117 | cond_syscall(sys_inotify_rm_watch); |
Christoph Lameter | 3974388 | 2006-01-08 01:00:51 -0800 | [diff] [blame] | 118 | cond_syscall(sys_migrate_pages); |
Christoph Lameter | 742755a | 2006-06-23 02:03:55 -0700 | [diff] [blame] | 119 | cond_syscall(sys_move_pages); |
Matt Mackall | e585e47 | 2006-01-08 01:05:24 -0800 | [diff] [blame] | 120 | cond_syscall(sys_chown16); |
| 121 | cond_syscall(sys_fchown16); |
| 122 | cond_syscall(sys_getegid16); |
| 123 | cond_syscall(sys_geteuid16); |
| 124 | cond_syscall(sys_getgid16); |
| 125 | cond_syscall(sys_getgroups16); |
| 126 | cond_syscall(sys_getresgid16); |
| 127 | cond_syscall(sys_getresuid16); |
| 128 | cond_syscall(sys_getuid16); |
| 129 | cond_syscall(sys_lchown16); |
| 130 | cond_syscall(sys_setfsgid16); |
| 131 | cond_syscall(sys_setfsuid16); |
| 132 | cond_syscall(sys_setgid16); |
| 133 | cond_syscall(sys_setgroups16); |
| 134 | cond_syscall(sys_setregid16); |
| 135 | cond_syscall(sys_setresgid16); |
| 136 | cond_syscall(sys_setresuid16); |
| 137 | cond_syscall(sys_setreuid16); |
| 138 | cond_syscall(sys_setuid16); |
Fabian Frederick | f618776 | 2014-06-04 16:11:12 -0700 | [diff] [blame] | 139 | cond_syscall(sys_sgetmask); |
| 140 | cond_syscall(sys_ssetmask); |
Matt Mackall | 64ca900 | 2006-01-08 01:05:26 -0800 | [diff] [blame] | 141 | cond_syscall(sys_vm86old); |
| 142 | cond_syscall(sys_vm86); |
Christoph Hellwig | baed7fc | 2010-03-10 15:21:18 -0800 | [diff] [blame] | 143 | cond_syscall(sys_ipc); |
Stephen Rothwell | 7fd105e | 2006-02-20 18:28:08 -0800 | [diff] [blame] | 144 | cond_syscall(compat_sys_ipc); |
| 145 | cond_syscall(compat_sys_sysctl); |
Thomas Petazzoni | bfcd17a | 2008-08-06 15:12:22 +0200 | [diff] [blame] | 146 | cond_syscall(sys_flock); |
Thomas Petazzoni | ebf3f09 | 2008-10-15 22:05:12 -0700 | [diff] [blame] | 147 | cond_syscall(sys_io_setup); |
| 148 | cond_syscall(sys_io_destroy); |
| 149 | cond_syscall(sys_io_submit); |
| 150 | cond_syscall(sys_io_cancel); |
| 151 | cond_syscall(sys_io_getevents); |
Fabian Frederick | 6af9f7b | 2014-04-03 14:48:25 -0700 | [diff] [blame] | 152 | cond_syscall(sys_sysfs); |
Heiko Carstens | f627a74 | 2009-01-14 14:13:58 +0100 | [diff] [blame] | 153 | cond_syscall(sys_syslog); |
Christopher Yeoh | fcf6340 | 2011-10-31 17:06:39 -0700 | [diff] [blame] | 154 | cond_syscall(sys_process_vm_readv); |
| 155 | cond_syscall(sys_process_vm_writev); |
| 156 | cond_syscall(compat_sys_process_vm_readv); |
| 157 | cond_syscall(compat_sys_process_vm_writev); |
Josh Triplett | 69369a7 | 2014-04-03 14:48:27 -0700 | [diff] [blame] | 158 | cond_syscall(sys_uselib); |
Josh Triplett | d3ac21c | 2014-08-17 19:41:09 -0500 | [diff] [blame] | 159 | cond_syscall(sys_fadvise64); |
| 160 | cond_syscall(sys_fadvise64_64); |
| 161 | cond_syscall(sys_madvise); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | |
| 163 | /* arch-specific weak syscall entries */ |
| 164 | cond_syscall(sys_pciconfig_read); |
| 165 | cond_syscall(sys_pciconfig_write); |
| 166 | cond_syscall(sys_pciconfig_iobase); |
Al Viro | 56e41d3 | 2013-01-21 23:15:25 -0500 | [diff] [blame] | 167 | cond_syscall(compat_sys_s390_ipc); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 168 | cond_syscall(ppc_rtas); |
Arnd Bergmann | 67207b9 | 2005-11-15 15:53:48 -0500 | [diff] [blame] | 169 | cond_syscall(sys_spu_run); |
| 170 | cond_syscall(sys_spu_create); |
Paul Mackerras | fa28237 | 2008-01-24 08:35:13 +1100 | [diff] [blame] | 171 | cond_syscall(sys_subpage_prot); |
Alexey Ishchuk | 4eafad7 | 2014-11-14 14:27:58 +0100 | [diff] [blame] | 172 | cond_syscall(sys_s390_pci_mmio_read); |
| 173 | cond_syscall(sys_s390_pci_mmio_write); |
Hyok S. Choi | 3016b42 | 2006-04-10 22:53:06 -0700 | [diff] [blame] | 174 | |
| 175 | /* mmu depending weak syscall entries */ |
| 176 | cond_syscall(sys_mprotect); |
| 177 | cond_syscall(sys_msync); |
| 178 | cond_syscall(sys_mlock); |
| 179 | cond_syscall(sys_munlock); |
| 180 | cond_syscall(sys_mlockall); |
| 181 | cond_syscall(sys_munlockall); |
| 182 | cond_syscall(sys_mincore); |
| 183 | cond_syscall(sys_madvise); |
| 184 | cond_syscall(sys_mremap); |
| 185 | cond_syscall(sys_remap_file_pages); |
Christoph Lameter | 1b2db9f | 2006-06-23 02:03:56 -0700 | [diff] [blame] | 186 | cond_syscall(compat_sys_move_pages); |
Stephen Rothwell | 3fd5939 | 2006-11-02 22:07:24 -0800 | [diff] [blame] | 187 | cond_syscall(compat_sys_migrate_pages); |
David Howells | 9361401 | 2006-09-30 20:45:40 +0200 | [diff] [blame] | 188 | |
| 189 | /* block-layer dependent */ |
| 190 | cond_syscall(sys_bdflush); |
| 191 | cond_syscall(sys_ioprio_set); |
| 192 | cond_syscall(sys_ioprio_get); |
Davide Libenzi | fba2afa | 2007-05-10 22:23:13 -0700 | [diff] [blame] | 193 | |
| 194 | /* New file descriptors */ |
| 195 | cond_syscall(sys_signalfd); |
Ulrich Drepper | 9deb27b | 2008-07-23 21:29:24 -0700 | [diff] [blame] | 196 | cond_syscall(sys_signalfd4); |
Heiko Carstens | 8df767d | 2007-05-12 10:37:02 -0700 | [diff] [blame] | 197 | cond_syscall(compat_sys_signalfd); |
Ingo Molnar | 9b81361 | 2008-07-25 13:02:37 +0200 | [diff] [blame] | 198 | cond_syscall(compat_sys_signalfd4); |
Davide Libenzi | 4d672e7 | 2008-02-04 22:27:26 -0800 | [diff] [blame] | 199 | cond_syscall(sys_timerfd_create); |
| 200 | cond_syscall(sys_timerfd_settime); |
| 201 | cond_syscall(sys_timerfd_gettime); |
| 202 | cond_syscall(compat_sys_timerfd_settime); |
| 203 | cond_syscall(compat_sys_timerfd_gettime); |
Davide Libenzi | e1ad746 | 2007-05-10 22:23:19 -0700 | [diff] [blame] | 204 | cond_syscall(sys_eventfd); |
Ulrich Drepper | b087498e | 2008-07-23 21:29:25 -0700 | [diff] [blame] | 205 | cond_syscall(sys_eventfd2); |
David Herrmann | 9183df2 | 2014-08-08 14:25:29 -0700 | [diff] [blame] | 206 | cond_syscall(sys_memfd_create); |
Thomas Gleixner | 0793a61 | 2008-12-04 20:12:29 +0100 | [diff] [blame] | 207 | |
| 208 | /* performance counters: */ |
Ingo Molnar | cdd6c48 | 2009-09-21 12:02:48 +0200 | [diff] [blame] | 209 | cond_syscall(sys_perf_event_open); |
Eric Paris | 11637e4 | 2009-12-17 21:24:25 -0500 | [diff] [blame] | 210 | |
| 211 | /* fanotify! */ |
| 212 | cond_syscall(sys_fanotify_init); |
Eric Paris | bbaa416 | 2009-12-17 21:24:26 -0500 | [diff] [blame] | 213 | cond_syscall(sys_fanotify_mark); |
Al Viro | 91c2e0b | 2013-03-05 20:10:59 -0500 | [diff] [blame] | 214 | cond_syscall(compat_sys_fanotify_mark); |
Aneesh Kumar K.V | 990d6c2 | 2011-01-29 18:43:26 +0530 | [diff] [blame] | 215 | |
| 216 | /* open by handle */ |
| 217 | cond_syscall(sys_name_to_handle_at); |
Aneesh Kumar K.V | becfd1f | 2011-01-29 18:43:26 +0530 | [diff] [blame] | 218 | cond_syscall(sys_open_by_handle_at); |
| 219 | cond_syscall(compat_sys_open_by_handle_at); |
Cyrill Gorcunov | d97b46a | 2012-05-31 16:26:44 -0700 | [diff] [blame] | 220 | |
| 221 | /* compare kernel pointers */ |
| 222 | cond_syscall(sys_kcmp); |
Kees Cook | 48dc92b | 2014-06-25 16:08:24 -0700 | [diff] [blame] | 223 | |
| 224 | /* operate on Secure Computing state */ |
| 225 | cond_syscall(sys_seccomp); |
Alexei Starovoitov | 749730c | 2014-09-26 00:16:58 -0700 | [diff] [blame] | 226 | |
| 227 | /* access BPF programs and maps */ |
| 228 | cond_syscall(sys_bpf); |
David Drysdale | 51f39a1 | 2014-12-12 16:57:29 -0800 | [diff] [blame] | 229 | |
| 230 | /* execveat */ |
| 231 | cond_syscall(sys_execveat); |