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 linux32_sysent.c, linux32_proto.h and linux32_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 <amd64/linux32/linux.h>
34 #include <amd64/linux32/linux32_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);
192 28 AUE_FSTAT UNIMPL fstat
194 int linux_pause(void);
199 struct l_utimbuf *times
202 31 AUE_NULL UNIMPL stty
203 32 AUE_NULL UNIMPL gtty
215 35 AUE_NULL UNIMPL ftime
216 36 AUE_SYNC NOPROTO {
254 struct l_times_argv *buf
257 44 AUE_NULL UNIMPL prof
269 int linux_getgid16(void);
278 int linux_geteuid16(void);
281 int linux_getegid16(void);
283 51 AUE_ACCT NOPROTO {
294 53 AUE_NULL UNIMPL lock
309 56 AUE_NULL UNIMPL mpx
310 57 AUE_SETPGRP NOPROTO {
316 58 AUE_NULL UNIMPL ulimit
318 int linux_olduname(void);
320 60 AUE_UMASK NOPROTO {
325 61 AUE_CHROOT NOPROTO {
336 63 AUE_DUP2 NOPROTO {
343 int linux_getppid(void);
345 65 AUE_GETPGRP NOPROTO {
348 66 AUE_SETSID NOPROTO {
359 int linux_sgetmask(void);
366 70 AUE_SETREUID STD {
367 int linux_setreuid16(
372 71 AUE_SETREGID STD {
373 int linux_setregid16(
379 int linux_sigsuspend(
386 int linux_sigpending(
391 int linux_sethostname(
396 75 AUE_SETRLIMIT STD {
399 struct l_rlimit *rlim
402 76 AUE_GETRLIMIT STD {
403 int linux_old_getrlimit(
405 struct l_rlimit *rlim
408 77 AUE_GETRUSAGE STD {
411 struct l_rusage *rusage
415 int linux_gettimeofday(
416 struct l_timeval *tp,
420 79 AUE_SETTIMEOFDAY STD {
421 int linux_settimeofday(
422 struct l_timeval *tp,
426 80 AUE_GETGROUPS STD {
427 int linux_getgroups16(
432 81 AUE_SETGROUPS STD {
433 int linux_setgroups16(
439 int linux_old_select(
440 struct l_old_select_argv *ptr
453 struct linux_lstat *up
456 85 AUE_READLINK STD {
463 86 AUE_USELIB UNIMPL linux_uselib
464 87 AUE_SWAPON NOPROTO {
478 89 AUE_GETDIRENTRIES STD {
481 struct l_dirent *dent,
488 struct l_mmap_argv *ptr
491 91 AUE_MUNMAP NOPROTO {
497 92 AUE_TRUNCATE STD {
503 93 AUE_FTRUNCATE STD {
509 94 AUE_FCHMOD NOPROTO {
515 95 AUE_FCHOWN NOPROTO {
522 96 AUE_GETPRIORITY STD {
523 int linux_getpriority(
528 97 AUE_SETPRIORITY NOPROTO {
535 98 AUE_PROFILE UNIMPL profil
539 struct l_statfs_buf *buf
542 100 AUE_FSTATFS STD {
545 struct l_statfs_buf *buf
548 101 AUE_NULL UNIMPL ioperm
550 int linux_socketcall(
562 104 AUE_SETITIMER STD {
565 struct l_itimerval *itv,
566 struct l_itimerval *oitv
569 105 AUE_GETITIMER STD {
572 struct l_itimerval *itv
578 struct l_newstat *buf
584 struct l_newstat *buf
590 struct l_newstat *buf
595 int linux_uname(void);
603 int linux_vhangup(void);
605 112 AUE_NULL UNIMPL idle
606 113 AUE_NULL UNIMPL vm86old
612 struct l_rusage *rusage
615 115 AUE_SWAPOFF STD {
616 int linux_swapoff(void);
620 struct l_sysinfo *info
633 118 AUE_FSYNC NOPROTO {
638 119 AUE_SIGRETURN STD {
640 struct l_sigframe *sfp
653 int linux_setdomainname(
660 struct l_new_utsname *buf
663 123 AUE_NULL UNIMPL modify_ldt
664 124 AUE_ADJTIME STD {
665 int linux_adjtimex(void);
667 125 AUE_MPROTECT STD {
674 126 AUE_SIGPROCMASK STD {
675 int linux_sigprocmask(
681 127 AUE_NULL UNIMPL create_module
683 int linux_init_module(void);
686 int linux_delete_module(void);
688 130 AUE_NULL UNIMPL get_kernel_syms
689 131 AUE_QUOTACTL STD {
690 int linux_quotactl(void);
692 132 AUE_GETPGID NOPROTO {
697 133 AUE_FCHDIR NOPROTO {
702 134 AUE_BDFLUSH STD {
703 int linux_bdflush(void);
712 136 AUE_PERSONALITY STD {
713 int linux_personality(
717 137 AUE_NULL UNIMPL afs_syscall
718 138 AUE_SETFSUID STD {
719 int linux_setfsuid16(
723 139 AUE_SETFSGID STD {
724 int linux_setfsgid16(
737 141 AUE_GETDIRENTRIES STD {
751 struct l_timeval *timeout
754 143 AUE_FLOCK NOPROTO {
770 struct l_iovec32 *iovp,
777 struct l_iovec32 *iovp,
793 struct l___sysctl_args *args
796 150 AUE_MLOCK NOPROTO {
802 151 AUE_MUNLOCK NOPROTO {
808 152 AUE_MLOCKALL NOPROTO {
813 153 AUE_MUNLOCKALL NOPROTO {
814 int munlockall(void);
816 154 AUE_SCHED_SETPARAM STD {
817 int linux_sched_setparam(
819 struct sched_param *param
822 155 AUE_SCHED_GETPARAM STD {
823 int linux_sched_getparam(
825 struct sched_param *param
828 156 AUE_SCHED_SETSCHEDULER STD {
829 int linux_sched_setscheduler(
832 struct sched_param *param
835 157 AUE_SCHED_GETSCHEDULER STD {
836 int linux_sched_getscheduler(
840 158 AUE_NULL NOPROTO {
841 int sched_yield(void);
843 159 AUE_SCHED_GET_PRIORITY_MAX STD {
844 int linux_sched_get_priority_max(
848 160 AUE_SCHED_GET_PRIORITY_MIN STD {
849 int linux_sched_get_priority_min(
853 161 AUE_SCHED_RR_GET_INTERVAL STD {
854 int linux_sched_rr_get_interval(
856 struct l_timespec *interval
861 const struct l_timespec *rqtp,
862 struct l_timespec *rmtp
874 164 AUE_SETRESUID STD {
875 int linux_setresuid16(
881 165 AUE_GETRESUID STD {
882 int linux_getresuid16(
888 166 AUE_NULL UNIMPL vm86
889 167 AUE_NULL UNIMPL query_module
890 168 AUE_POLL NOPROTO {
897 169 AUE_NULL UNIMPL nfsservctl
898 170 AUE_SETRESGID STD {
899 int linux_setresgid16(
905 171 AUE_GETRESGID STD {
906 int linux_getresgid16(
922 int linux_rt_sigreturn(
923 struct l_ucontext *ucp
927 int linux_rt_sigaction(
935 int linux_rt_sigprocmask(
943 int linux_rt_sigpending(
949 int linux_rt_sigtimedwait(
952 struct l_timeval *timeout,
957 int linux_rt_sigqueueinfo(
964 int linux_rt_sigsuspend(
1000 184 AUE_CAPGET STD {
1002 struct l_user_cap_header *hdrp,
1003 struct l_user_cap_data *datap
1006 185 AUE_CAPSET STD {
1008 struct l_user_cap_header *hdrp,
1009 struct l_user_cap_data *datap
1013 int linux_sigaltstack(
1018 187 AUE_SENDFILE STD {
1026 188 AUE_GETPMSG UNIMPL getpmsg
1027 189 AUE_PUTPMSG UNIMPL putpmsg
1029 int linux_vfork(void);
1032 191 AUE_GETRLIMIT STD {
1033 int linux_getrlimit(
1035 struct l_rlimit *rlim
1048 193 AUE_TRUNCATE STD {
1049 int linux_truncate64(
1055 194 AUE_FTRUNCATE STD {
1056 int linux_ftruncate64(
1064 const char *filename,
1065 struct l_stat64 *statbuf
1070 const char *filename,
1071 struct l_stat64 *statbuf
1077 struct l_stat64 *statbuf
1080 198 AUE_LCHOWN STD {
1087 199 AUE_GETUID STD {
1088 int linux_getuid(void);
1090 200 AUE_GETGID STD {
1091 int linux_getgid(void);
1093 201 AUE_GETEUID NOPROTO {
1096 202 AUE_GETEGID NOPROTO {
1099 203 AUE_SETREUID NOPROTO {
1105 204 AUE_SETREGID NOPROTO {
1111 205 AUE_GETGROUPS STD {
1112 int linux_getgroups(
1117 206 AUE_SETGROUPS STD {
1118 int linux_setgroups(
1123 207 AUE_FCHOWN NODEF fchown fchown fchown_args int
1124 208 AUE_SETRESUID NOPROTO {
1131 209 AUE_GETRESUID NOPROTO {
1138 210 AUE_SETRESGID NOPROTO {
1145 211 AUE_GETRESGID NOPROTO {
1159 213 AUE_SETUID NOPROTO {
1164 214 AUE_SETGID NOPROTO {
1169 215 AUE_SETFSUID STD {
1174 216 AUE_SETFSGID STD {
1179 217 AUE_PIVOT_ROOT STD {
1180 int linux_pivot_root(
1185 218 AUE_MINCORE STD {
1192 219 AUE_MADVISE STD {
1199 220 AUE_GETDIRENTRIES STD {
1200 int linux_getdents64(
1216 long linux_gettid(void);
1218 225 AUE_NULL UNIMPL linux_readahead
1229 int linux_lsetxattr(
1238 int linux_fsetxattr(
1255 int linux_lgetxattr(
1263 int linux_fgetxattr(
1271 int linux_listxattr(
1278 int linux_llistxattr(
1285 int linux_flistxattr(
1292 int linux_removexattr(
1298 int linux_lremovexattr(
1304 int linux_fremovexattr(
1315 239 AUE_SENDFILE STD {
1316 int linux_sendfile64(
1324 int linux_sys_futex(
1328 struct l_timespec *timeout,
1334 int linux_sched_setaffinity(
1337 l_ulong *user_mask_ptr
1341 int linux_sched_getaffinity(
1344 l_ulong *user_mask_ptr
1348 int linux_set_thread_area(
1349 struct l_user_desc *desc
1352 244 AUE_NULL UNIMPL linux_get_thread_area
1353 245 AUE_NULL UNIMPL linux_io_setup
1354 246 AUE_NULL UNIMPL linux_io_destroy
1355 247 AUE_NULL UNIMPL linux_io_getevents
1356 248 AUE_NULL UNIMPL linux_io_submit
1357 249 AUE_NULL UNIMPL linux_io_cancel
1359 int linux_fadvise64(
1369 int linux_exit_group(
1374 int linux_lookup_dcookie(void);
1377 int linux_epoll_create(
1382 int linux_epoll_ctl(
1386 struct epoll_event *event
1390 int linux_epoll_wait(
1392 struct epoll_event *events,
1398 int linux_remap_file_pages(void);
1401 int linux_set_tid_address(
1406 int linux_timer_create(
1408 struct sigevent *evp,
1413 int linux_timer_settime(
1416 const struct itimerspec *new,
1417 struct itimerspec *old
1421 int linux_timer_gettime(
1423 struct itimerspec *setting
1427 int linux_timer_getoverrun(
1432 int linux_timer_delete(
1436 264 AUE_CLOCK_SETTIME STD {
1437 int linux_clock_settime(
1439 struct l_timespec *tp
1443 int linux_clock_gettime(
1445 struct l_timespec *tp
1449 int linux_clock_getres(
1451 struct l_timespec *tp
1455 int linux_clock_nanosleep(
1458 struct l_timespec *rqtp,
1459 struct l_timespec *rmtp
1462 268 AUE_STATFS STD {
1466 struct l_statfs64_buf *buf
1469 269 AUE_FSTATFS STD {
1470 int linux_fstatfs64(
1473 struct l_statfs64_buf *buf
1483 271 AUE_UTIMES STD {
1486 struct l_timeval *tptr
1490 int linux_fadvise64_64(
1499 273 AUE_NULL UNIMPL vserver
1501 int linux_mbind(void);
1504 int linux_get_mempolicy(void);
1507 int linux_set_mempolicy(void);
1515 struct mq_attr *attr
1519 int linux_mq_unlink(
1524 int linux_mq_timedsend(
1526 const char *msg_ptr,
1529 const struct l_timespec *abs_timeout
1533 int linux_mq_timedreceive(
1538 const struct l_timespec *abs_timeout
1542 int linux_mq_notify(
1544 const struct l_timespec *abs_timeout
1548 int linux_mq_getsetattr(
1550 const struct mq_attr *attr,
1551 struct mq_attr *oattr
1555 int linux_kexec_load(void);
1563 struct l_rusage *rusage
1569 int linux_add_key(void);
1572 int linux_request_key(void);
1575 int linux_keyctl(void);
1579 int linux_ioprio_set(void);
1582 int linux_ioprio_get(void);
1585 int linux_inotify_init(void);
1588 int linux_inotify_add_watch(void);
1591 int linux_inotify_rm_watch(void);
1595 int linux_migrate_pages(void);
1597 295 AUE_OPEN_RWTC STD {
1600 const char *filename,
1605 296 AUE_MKDIRAT STD {
1608 const char *pathname,
1612 297 AUE_MKNODAT STD {
1615 const char *filename,
1620 298 AUE_FCHOWNAT STD {
1623 const char *filename,
1629 299 AUE_FUTIMESAT STD {
1630 int linux_futimesat(
1633 struct l_timeval *utimes
1636 300 AUE_FSTATAT STD {
1637 int linux_fstatat64(
1640 struct l_stat64 *statbuf,
1644 301 AUE_UNLINKAT STD {
1647 const char *pathname,
1651 302 AUE_RENAMEAT STD {
1654 const char *oldname,
1659 303 AUE_LINKAT STD {
1662 const char *oldname,
1664 const char *newname,
1668 304 AUE_SYMLINKAT STD {
1669 int linux_symlinkat(
1670 const char *oldname,
1675 305 AUE_READLINKAT STD {
1676 int linux_readlinkat(
1683 306 AUE_FCHMODAT STD {
1686 const char *filename,
1690 307 AUE_FACCESSAT STD {
1691 int linux_faccessat(
1693 const char *filename,
1697 308 AUE_SELECT STD {
1702 l_fd_set *exceptfds,
1703 struct l_timespec *tsp,
1711 struct l_timespec *tsp,
1717 int linux_unshare(void);
1721 int linux_set_robust_list(
1722 struct linux_robust_list_head *head,
1727 int linux_get_robust_list(
1729 struct linux_robust_list_head **head,
1744 int linux_sync_file_range(
1754 int linux_tee(void);
1757 int linux_vmsplice(void);
1761 int linux_move_pages(void);
1772 int linux_epoll_pwait(
1774 struct epoll_event *events,
1782 320 AUE_FUTIMESAT STD {
1783 int linux_utimensat(
1785 const char *pathname,
1786 const struct l_timespec *times,
1791 int linux_signalfd(void);
1794 int linux_timerfd_create(
1806 int linux_fallocate(
1817 int linux_timerfd_settime(
1820 const struct l_itimerspec *new_value,
1821 struct l_itimerspec *old_value
1825 int linux_timerfd_gettime(
1827 struct l_itimerspec *old_value
1832 int linux_signalfd4(void);
1841 int linux_epoll_create1(
1859 int linux_inotify_init1(void);
1882 int linux_rt_tgsigqueueinfo(
1890 int linux_perf_event_open(void);
1896 struct l_mmsghdr *msg,
1899 struct l_timespec *timeout
1903 int linux_fanotify_init(void);
1906 int linux_fanotify_mark(void);
1910 int linux_prlimit64(
1919 int linux_name_to_handle_at(void);
1922 int linux_open_by_handle_at(void);
1925 int linux_clock_adjtime(void);
1936 struct l_mmsghdr *msg,
1942 int linux_setns(void);
1944 ; Linux 3.2 (glibc 2.15):
1946 int linux_process_vm_readv(
1948 const struct iovec *lvec,
1950 const struct iovec *rvec,
1956 int linux_process_vm_writev(
1958 const struct iovec *lvec,
1960 const struct iovec *rvec,
1965 ; Linux 3.5 (no glibc wrapper):
1975 ; Linux 3.8 (no glibc wrapper):
1977 int linux_finit_module(
1985 int linux_sched_setattr(
1992 int linux_sched_getattr(
2001 int linux_renameat2(
2003 const char *oldname,
2005 const char *newname,
2018 int linux_getrandom(
2025 int linux_memfd_create(
2026 const char *uname_ptr,
2042 const char *filename,
2048 ; Linux 4.3: sockets now direct system calls:
2049 359 AUE_SOCKET STD {
2056 360 AUE_SOCKETPAIR STD {
2057 int linux_socketpair(
2071 362 AUE_CONNECT STD {
2078 363 AUE_LISTEN STD {
2084 364 AUE_ACCEPT STD {
2088 l_uintptr_t namelen,
2092 365 AUE_GETSOCKOPT STD {
2093 int linux_getsockopt(
2101 366 AUE_SETSOCKOPT STD {
2102 int linux_setsockopt(
2110 367 AUE_GETSOCKNAME STD {
2111 int linux_getsockname(
2117 368 AUE_GETPEERNAME STD {
2118 int linux_getpeername(
2124 369 AUE_SENDTO STD {
2134 370 AUE_SENDMSG STD {
2141 371 AUE_RECVFROM STD {
2151 372 AUE_RECVMSG STD {
2166 int linux_userfaultfd(
2172 int linux_membarrier(
2187 int linux_copy_file_range(
2200 const struct iovec *vec,
2210 const struct iovec *vec,
2219 int linux_pkey_mprotect(
2227 int linux_pkey_alloc(
2233 int linux_pkey_free(
2241 const char *pathname,
2248 int linux_arch_prctl(
2255 int linux_io_pgetevents(void);
2258 int linux_rseq(void);
2260 387-392 AUE_NULL UNIMPL nosys
2287 struct l_shmid_ds *buf
2311 struct l_msgbuf *msgp,
2319 struct l_msgbuf *msgp,
2329 struct l_msqid_ds *buf
2334 int linux_clock_gettime64(void);
2337 int linux_clock_settime64(void);
2340 int linux_clock_adjtime64(void);
2343 int linux_clock_getres_time64(void);
2346 int linux_clock_nanosleep_time64(void);
2349 int linux_timer_gettime64(void);
2352 int linux_timer_settime64(void);
2355 int linux_timerfd_gettime64(void);
2358 int linux_timerfd_settime64(void);
2361 int linux_utimensat_time64(void);
2364 int linux_pselect6_time64(void);
2367 int linux_ppoll_time64(void);
2369 415 AUE_NULL UNIMPL nosys
2371 int linux_io_pgetevents_time64(void);
2374 int linux_recvmmsg_time64(void);
2377 int linux_mq_timedsend_time64(void);
2380 int linux_mq_timedreceive_time64(void);
2383 int linux_semtimedop_time64(void);
2386 int linux_rt_sigtimedwait_time64(void);
2389 int linux_futex_time64(void);
2392 int linux_sched_rr_get_interval_time64(void);
2395 int linux_pidfd_send_signal(
2403 int linux_io_uring_setup(void);
2406 int linux_io_uring_enter(void);
2409 int linux_io_uring_register(void);
2411 ; please, keep this line at the end.
2412 428 AUE_NULL UNIMPL nosys