3 ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 ; System call name/number master file (or rather, slave, from LINUX).
5 ; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h.
7 ; Columns: number audit type nargs name alt{name,tag,rtyp}/comments
8 ; number system call number, must be in order
9 ; audit the audit event associated with the system call
10 ; A value of AUE_NULL means no auditing, but it also means that
11 ; there is no audit event for the call at this time. For the
12 ; case where the event exists, but we don't want auditing, the
13 ; event should be #defined to AUE_NULL in audit_kevents.h.
14 ; type one of STD, NOPROTO, UNIMPL
15 ; name pseudo-prototype of syscall routine
16 ; If one of the following alts is different, then all appear:
17 ; altname name of system call if different
18 ; alttag name of args struct tag if different from [o]`name'"_args"
19 ; altrtyp return type if not int (bogus - syscalls always return int)
20 ; for UNIMPL, name continues with comments
24 ; UNIMPL not implemented, placeholder only
25 ; NOPROTO same as STD except do not create structure or
26 ; function prototype in sys/sysproto.h. Does add a
27 ; definition to syscall.h besides adding a sysent.
29 #include <sys/param.h>
30 #include <sys/sysent.h>
31 #include <sys/sysproto.h>
32 #include <compat/linux/linux_sysproto.h>
33 #include <i386/linux/linux.h>
34 #include <i386/linux/linux_proto.h>
36 ; Isn't pretty, but there seems to be no other way to trap nosys
37 #define nosys linux_nosys
39 ; #ifdef's, etc. may be included, and are copied to the output files.
41 0 AUE_NULL UNIMPL setup
137 17 AUE_NULL UNIMPL break
141 struct linux_stat *up
152 int linux_getpid(void);
158 char *filesystemtype,
174 int linux_getuid16(void);
176 25 AUE_SETTIMEOFDAY STD {
177 int linux_stime(void);
195 struct linux_stat *up
199 int linux_pause(void);
204 struct l_utimbuf *times
207 31 AUE_NULL UNIMPL stty
208 32 AUE_NULL UNIMPL gtty
220 35 AUE_NULL UNIMPL ftime
221 36 AUE_SYNC NOPROTO {
259 struct l_times_argv *buf
262 44 AUE_NULL UNIMPL prof
274 int linux_getgid16(void);
283 int linux_geteuid16(void);
286 int linux_getegid16(void);
288 51 AUE_ACCT NOPROTO {
299 53 AUE_NULL UNIMPL lock
314 56 AUE_NULL UNIMPL mpx
315 57 AUE_SETPGRP NOPROTO {
321 58 AUE_NULL UNIMPL ulimit
323 int linux_olduname(void);
325 60 AUE_UMASK NOPROTO {
330 61 AUE_CHROOT NOPROTO {
341 63 AUE_DUP2 NOPROTO {
348 int linux_getppid(void);
350 65 AUE_GETPGRP NOPROTO {
353 66 AUE_SETSID NOPROTO {
364 int linux_sgetmask(void);
371 70 AUE_SETREUID STD {
372 int linux_setreuid16(
377 71 AUE_SETREGID STD {
378 int linux_setregid16(
384 int linux_sigsuspend(
391 int linux_sigpending(
396 int linux_sethostname(
401 75 AUE_SETRLIMIT STD {
404 struct l_rlimit *rlim
407 76 AUE_GETRLIMIT STD {
408 int linux_old_getrlimit(
410 struct l_rlimit *rlim
413 77 AUE_GETRUSAGE NOPROTO {
416 struct rusage *rusage
419 78 AUE_NULL NOPROTO {
425 79 AUE_SETTIMEOFDAY NOPROTO {
431 80 AUE_GETGROUPS STD {
432 int linux_getgroups16(
437 81 AUE_SETGROUPS STD {
438 int linux_setgroups16(
444 int linux_old_select(
445 struct l_old_select_argv *ptr
461 85 AUE_READLINK STD {
473 87 AUE_SWAPON NOPROTO {
487 89 AUE_GETDIRENTRIES STD {
490 struct l_dirent *dent,
497 struct l_mmap_argv *ptr
500 91 AUE_MUNMAP NOPROTO {
506 92 AUE_TRUNCATE STD {
512 93 AUE_FTRUNCATE STD {
518 94 AUE_FCHMOD NOPROTO {
524 95 AUE_FCHOWN NOPROTO {
531 96 AUE_GETPRIORITY STD {
532 int linux_getpriority(
537 97 AUE_SETPRIORITY NOPROTO {
544 98 AUE_PROFILE UNIMPL profil
548 struct l_statfs_buf *buf
551 100 AUE_FSTATFS STD {
554 struct l_statfs_buf *buf
565 int linux_socketcall(
577 104 AUE_SETITIMER STD {
580 struct l_itimerval *itv,
581 struct l_itimerval *oitv
584 105 AUE_GETITIMER STD {
587 struct l_itimerval *itv
593 struct l_newstat *buf
599 struct l_newstat *buf
605 struct l_newstat *buf
610 int linux_uname(void);
618 int linux_vhangup(void);
620 112 AUE_NULL UNIMPL idle
622 int linux_vm86old(void);
632 115 AUE_SWAPOFF STD {
633 int linux_swapoff(void);
637 struct l_sysinfo *info
650 118 AUE_FSYNC NOPROTO {
655 119 AUE_SIGRETURN STD {
657 struct l_sigframe *sfp
670 int linux_setdomainname(
677 struct l_new_utsname *buf
681 int linux_modify_ldt(
687 124 AUE_ADJTIME STD {
688 int linux_adjtimex(void);
690 125 AUE_MPROTECT STD {
697 126 AUE_SIGPROCMASK STD {
698 int linux_sigprocmask(
704 127 AUE_NULL UNIMPL create_module
706 int linux_init_module(void);
709 int linux_delete_module(void);
711 130 AUE_NULL UNIMPL get_kernel_syms
712 131 AUE_QUOTACTL STD {
713 int linux_quotactl(void);
715 132 AUE_GETPGID NOPROTO {
720 133 AUE_FCHDIR NOPROTO {
725 134 AUE_BDFLUSH STD {
726 int linux_bdflush(void);
735 136 AUE_PERSONALITY STD {
736 int linux_personality(
740 137 AUE_NULL UNIMPL afs_syscall
741 138 AUE_SETFSUID STD {
742 int linux_setfsuid16(
746 139 AUE_SETFSGID STD {
747 int linux_setfsgid16(
760 141 AUE_GETDIRENTRIES STD {
774 struct l_timeval *timeout
777 143 AUE_FLOCK NOPROTO {
790 145 AUE_READV NOPROTO {
797 146 AUE_WRITEV NOPROTO {
816 struct l___sysctl_args *args
819 150 AUE_MLOCK NOPROTO {
825 151 AUE_MUNLOCK NOPROTO {
831 152 AUE_MLOCKALL NOPROTO {
836 153 AUE_MUNLOCKALL NOPROTO {
837 int munlockall(void);
839 154 AUE_SCHED_SETPARAM STD {
840 int linux_sched_setparam(
842 struct sched_param *param
845 155 AUE_SCHED_GETPARAM STD {
846 int linux_sched_getparam(
848 struct sched_param *param
851 156 AUE_SCHED_SETSCHEDULER STD {
852 int linux_sched_setscheduler(
855 struct sched_param *param
858 157 AUE_SCHED_GETSCHEDULER STD {
859 int linux_sched_getscheduler(
863 158 AUE_NULL NOPROTO {
864 int sched_yield(void);
866 159 AUE_SCHED_GET_PRIORITY_MAX STD {
867 int linux_sched_get_priority_max(
871 160 AUE_SCHED_GET_PRIORITY_MIN STD {
872 int linux_sched_get_priority_min(
876 161 AUE_SCHED_RR_GET_INTERVAL STD {
877 int linux_sched_rr_get_interval(
879 struct l_timespec *interval
884 const struct l_timespec *rqtp,
885 struct l_timespec *rmtp
897 164 AUE_SETRESUID STD {
898 int linux_setresuid16(
904 165 AUE_GETRESUID STD {
905 int linux_getresuid16(
912 int linux_vm86(void);
914 167 AUE_NULL UNIMPL query_module
915 168 AUE_POLL NOPROTO {
922 169 AUE_NULL UNIMPL nfsservctl
923 170 AUE_SETRESGID STD {
924 int linux_setresgid16(
930 171 AUE_GETRESGID STD {
931 int linux_getresgid16(
947 int linux_rt_sigreturn(
948 struct l_ucontext *ucp
952 int linux_rt_sigaction(
960 int linux_rt_sigprocmask(
968 int linux_rt_sigpending(
974 int linux_rt_sigtimedwait(
977 struct l_timeval *timeout,
982 int linux_rt_sigqueueinfo(
989 int linux_rt_sigsuspend(
1002 181 AUE_PWRITE STD {
1017 183 AUE_GETCWD STD {
1023 184 AUE_CAPGET STD {
1025 struct l_user_cap_header *hdrp,
1026 struct l_user_cap_data *datap
1029 185 AUE_CAPSET STD {
1031 struct l_user_cap_header *hdrp,
1032 struct l_user_cap_data *datap
1036 int linux_sigaltstack(
1041 187 AUE_SENDFILE STD {
1049 188 AUE_GETPMSG UNIMPL getpmsg
1050 189 AUE_PUTPMSG UNIMPL putpmsg
1052 int linux_vfork(void);
1055 191 AUE_GETRLIMIT STD {
1056 int linux_getrlimit(
1058 struct l_rlimit *rlim
1071 193 AUE_TRUNCATE STD {
1072 int linux_truncate64(
1077 194 AUE_FTRUNCATE STD {
1078 int linux_ftruncate64(
1085 const char *filename,
1086 struct l_stat64 *statbuf
1091 const char *filename,
1092 struct l_stat64 *statbuf
1098 struct l_stat64 *statbuf
1101 198 AUE_LCHOWN STD {
1108 199 AUE_GETUID STD {
1109 int linux_getuid(void);
1111 200 AUE_GETGID STD {
1112 int linux_getgid(void);
1114 201 AUE_GETEUID NOPROTO {
1117 202 AUE_GETEGID NOPROTO {
1120 203 AUE_SETREUID NOPROTO {
1126 204 AUE_SETREGID NOPROTO {
1132 205 AUE_GETGROUPS STD {
1133 int linux_getgroups(
1138 206 AUE_SETGROUPS STD {
1139 int linux_setgroups(
1144 207 AUE_FCHOWN NODEF fchown fchown fchown_args int
1145 208 AUE_SETRESUID NOPROTO {
1152 209 AUE_GETRESUID NOPROTO {
1159 210 AUE_SETRESGID NOPROTO {
1166 211 AUE_GETRESGID NOPROTO {
1180 213 AUE_SETUID NOPROTO {
1185 214 AUE_SETGID NOPROTO {
1190 215 AUE_SETFSUID STD {
1195 216 AUE_SETFSGID STD {
1200 217 AUE_PIVOT_ROOT STD {
1201 int linux_pivot_root(
1206 218 AUE_MINCORE STD {
1213 219 AUE_MADVISE STD {
1220 220 AUE_GETDIRENTRIES STD {
1221 int linux_getdents64(
1237 long linux_gettid(void);
1239 225 AUE_NULL UNIMPL linux_readahead
1241 int linux_setxattr(void);
1244 int linux_lsetxattr(void);
1247 int linux_fsetxattr(void);
1250 int linux_getxattr(void);
1253 int linux_lgetxattr(void);
1256 int linux_fgetxattr(void);
1259 int linux_listxattr(void);
1262 int linux_llistxattr(void);
1265 int linux_flistxattr(void);
1268 int linux_removexattr(void);
1271 int linux_lremovexattr(void);
1274 int linux_fremovexattr(void);
1282 239 AUE_SENDFILE STD {
1283 int linux_sendfile64(
1291 int linux_sys_futex(
1295 struct l_timespec *timeout,
1301 int linux_sched_setaffinity(
1304 l_ulong *user_mask_ptr
1308 int linux_sched_getaffinity(
1311 l_ulong *user_mask_ptr
1315 int linux_set_thread_area(
1316 struct l_user_desc *desc
1320 int linux_get_thread_area(
1321 struct l_user_desc *desc
1324 245 AUE_NULL UNIMPL linux_io_setup
1325 246 AUE_NULL UNIMPL linux_io_destroy
1326 247 AUE_NULL UNIMPL linux_io_getevents
1327 248 AUE_NULL UNIMPL linux_io_submit
1328 249 AUE_NULL UNIMPL linux_io_cancel
1330 int linux_fadvise64(
1339 int linux_exit_group(
1344 int linux_lookup_dcookie(void);
1347 int linux_epoll_create(
1352 int linux_epoll_ctl(
1356 struct epoll_event *event
1360 int linux_epoll_wait(
1362 struct epoll_event *events,
1368 int linux_remap_file_pages(void);
1371 int linux_set_tid_address(
1376 int linux_timer_create(
1378 struct sigevent *evp,
1383 int linux_timer_settime(
1386 const struct itimerspec *new,
1387 struct itimerspec *old
1391 int linux_timer_gettime(
1393 struct itimerspec *setting
1397 int linux_timer_getoverrun(
1402 int linux_timer_delete(
1406 264 AUE_CLOCK_SETTIME STD {
1407 int linux_clock_settime(
1409 struct l_timespec *tp
1413 int linux_clock_gettime(
1415 struct l_timespec *tp
1419 int linux_clock_getres(
1421 struct l_timespec *tp
1425 int linux_clock_nanosleep(
1428 struct l_timespec *rqtp,
1429 struct l_timespec *rmtp
1432 268 AUE_STATFS STD {
1436 struct l_statfs64_buf *buf
1439 269 AUE_FSTATFS STD {
1440 int linux_fstatfs64(
1443 struct l_statfs64_buf *buf
1453 271 AUE_UTIMES STD {
1456 struct l_timeval *tptr
1460 int linux_fadvise64_64(
1467 273 AUE_NULL UNIMPL vserver
1469 int linux_mbind(void);
1472 int linux_get_mempolicy(void);
1475 int linux_set_mempolicy(void);
1483 struct mq_attr *attr
1487 int linux_mq_unlink(
1492 int linux_mq_timedsend(
1494 const char *msg_ptr,
1496 unsigned int msg_prio,
1497 const struct l_timespec *abs_timeout
1501 int linux_mq_timedreceive(
1505 unsigned int msg_prio,
1506 const struct l_timespec *abs_timeout
1510 int linux_mq_notify(
1512 const struct l_timespec *abs_timeout
1516 int linux_mq_getsetattr(
1518 const struct mq_attr *attr,
1519 struct mq_attr *oattr
1523 int linux_kexec_load(void);
1537 int linux_add_key(void);
1540 int linux_request_key(void);
1543 int linux_keyctl(void);
1547 int linux_ioprio_set(void);
1550 int linux_ioprio_get(void);
1553 int linux_inotify_init(void);
1556 int linux_inotify_add_watch(void);
1559 int linux_inotify_rm_watch(void);
1563 int linux_migrate_pages(void);
1565 295 AUE_OPEN_RWTC STD {
1568 const char *filename,
1573 296 AUE_MKDIRAT STD {
1576 const char *pathname,
1580 297 AUE_MKNODAT STD {
1583 const char *filename,
1588 298 AUE_FCHOWNAT STD {
1591 const char *filename,
1597 299 AUE_FUTIMESAT STD {
1598 int linux_futimesat(
1601 struct l_timeval *utimes
1604 300 AUE_FSTATAT STD {
1605 int linux_fstatat64(
1608 struct l_stat64 *statbuf,
1612 301 AUE_UNLINKAT STD {
1615 const char *pathname,
1619 302 AUE_RENAMEAT STD {
1622 const char *oldname,
1627 303 AUE_LINKAT STD {
1630 const char *oldname,
1632 const char *newname,
1636 304 AUE_SYMLINKAT STD {
1637 int linux_symlinkat(
1638 const char *oldname,
1643 305 AUE_READLINKAT STD {
1644 int linux_readlinkat(
1651 306 AUE_FCHMODAT STD {
1654 const char *filename,
1658 307 AUE_FACCESSAT STD {
1659 int linux_faccessat(
1661 const char *filename,
1665 308 AUE_SELECT STD {
1670 l_fd_set *exceptfds,
1671 struct l_timespec *tsp,
1679 struct l_timespec *tsp,
1685 int linux_unshare(void);
1689 int linux_set_robust_list(
1690 struct linux_robust_list_head *head,
1695 int linux_get_robust_list(
1697 struct linux_robust_list_head **head,
1702 int linux_splice(void);
1705 int linux_sync_file_range(
1713 int linux_tee(void);
1716 int linux_vmsplice(void);
1720 int linux_move_pages(void);
1731 int linux_epoll_pwait(
1733 struct epoll_event *events,
1741 320 AUE_FUTIMESAT STD {
1742 int linux_utimensat(
1744 const char *pathname,
1745 const struct l_timespec *times,
1750 int linux_signalfd(void);
1753 int linux_timerfd_create(
1765 int linux_fallocate(
1774 int linux_timerfd_settime(
1777 const struct l_itimerspec *new_value,
1778 struct l_itimerspec *old_value
1782 int linux_timerfd_gettime(
1784 struct l_itimerspec *old_value
1789 int linux_signalfd4(void);
1798 int linux_epoll_create1(
1816 int linux_inotify_init1(void);
1839 int linux_rt_tgsigqueueinfo(
1847 int linux_perf_event_open(void);
1853 struct l_mmsghdr *msg,
1856 struct l_timespec *timeout
1860 int linux_fanotify_init(void);
1863 int linux_fanotify_mark(void);
1867 int linux_prlimit64(
1876 int linux_name_to_handle_at(void);
1879 int linux_open_by_handle_at(void);
1882 int linux_clock_adjtime(void);
1893 struct l_mmsghdr *msg,
1899 int linux_setns(void);
1901 ; Linux 3.2 (glibc 2.15):
1903 int linux_process_vm_readv(
1905 const struct iovec *lvec,
1907 const struct iovec *rvec,
1913 int linux_process_vm_writev(
1915 const struct iovec *lvec,
1917 const struct iovec *rvec,
1922 ; Linux 3.5 (no glibc wrapper):
1932 ; Linux 3.8 (no glibc wrapper):
1934 int linux_finit_module(
1942 int linux_sched_setattr(
1949 int linux_sched_getattr(
1958 int linux_renameat2(
1960 const char *oldname,
1962 const char *newname,
1975 int linux_getrandom(
1982 int linux_memfd_create(
1983 const char *uname_ptr,
1999 const char *filename,
2005 ; Linux 4.3: sockets now direct system calls:
2006 359 AUE_SOCKET STD {
2013 360 AUE_SOCKETPAIR STD {
2014 int linux_socketpair(
2028 362 AUE_CONNECT STD {
2035 363 AUE_LISTEN STD {
2041 364 AUE_ACCEPT STD {
2045 l_uintptr_t namelen,
2049 365 AUE_GETSOCKOPT STD {
2050 int linux_getsockopt(
2058 366 AUE_SETSOCKOPT STD {
2059 int linux_setsockopt(
2067 367 AUE_GETSOCKNAME STD {
2068 int linux_getsockname(
2074 368 AUE_GETPEERNAME STD {
2075 int linux_getpeername(
2081 369 AUE_SENDTO STD {
2091 370 AUE_SENDMSG STD {
2098 371 AUE_RECVFROM STD {
2108 372 AUE_RECVMSG STD {
2123 int linux_userfaultfd(
2129 int linux_membarrier(
2144 int linux_copy_file_range(
2157 const struct iovec *vec,
2167 const struct iovec *vec,
2176 int linux_pkey_mprotect(
2184 int linux_pkey_alloc(
2190 int linux_pkey_free(
2198 const char *pathname,
2205 int linux_arch_prctl(
2212 int linux_io_pgetevents(void);
2215 int linux_rseq(void);
2217 387-392 AUE_NULL UNIMPL nosys
2244 struct l_shmid_ds *buf
2268 struct l_msgbuf *msgp,
2276 struct l_msgbuf *msgp,
2286 struct l_msqid_ds *buf
2291 int linux_clock_gettime64(void);
2294 int linux_clock_settime64(void);
2297 int linux_clock_adjtime64(void);
2300 int linux_clock_getres_time64(void);
2303 int linux_clock_nanosleep_time64(void);
2306 int linux_timer_gettime64(void);
2309 int linux_timer_settime64(void);
2312 int linux_timerfd_gettime64(void);
2315 int linux_timerfd_settime64(void);
2318 int linux_utimensat_time64(void);
2321 int linux_pselect6_time64(void);
2324 int linux_ppoll_time64(void);
2326 415 AUE_NULL UNIMPL nosys
2328 int linux_io_pgetevents_time64(void);
2331 int linux_recvmmsg_time64(void);
2334 int linux_mq_timedsend_time64(void);
2337 int linux_mq_timedreceive_time64(void);
2340 int linux_semtimedop_time64(void);
2343 int linux_rt_sigtimedwait_time64(void);
2346 int linux_futex_time64(void);
2349 int linux_sched_rr_get_interval_time64(void);
2352 int linux_pidfd_send_signal(
2360 int linux_io_uring_setup(void);
2363 int linux_io_uring_enter(void);
2366 int linux_io_uring_register(void);
2368 ; please, keep this line at the end.
2369 428 AUE_NULL UNIMPL nosys