blob: 21ebdbd8ef6821e7d3af8bd8e6a078192a907cf9 [file] [log] [blame]
Elliott Hughes5e522792013-09-24 00:30:25 -07001# This file is used to automatically generate bionic's system call stubs.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08002#
Elliott Hughes5e522792013-09-24 00:30:25 -07003# Each non-blank, non-comment line has the following format:
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08004#
H.J. Lu6fe4e872013-10-04 10:03:17 -07005# return_type func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08006#
Elliott Hughes5e522792013-09-24 00:30:25 -07007# where:
Elliott Hughes8251d442018-11-09 13:55:21 -08008# arch_list ::= "all" | "lp32" | "lp64" | arch+
Chris Dearman50432122014-02-05 16:59:23 -08009# arch ::= "arm" | "arm64" | "mips" | "mips64" | "x86" | "x86_64"
Elliott Hughes5e522792013-09-24 00:30:25 -070010#
11# Note:
Elliott Hughesa51916b2013-04-03 10:08:09 -070012# - syscall_name corresponds to the name of the syscall, which may differ from
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080013# the exported function name (example: the exit syscall is implemented by the _exit()
14# function, which is not the same as the standard C exit() function which calls it)
Elliott Hughes5e522792013-09-24 00:30:25 -070015#
H.J. Lu6fe4e872013-10-04 10:03:17 -070016# - alias_list is optional comma separated list of function aliases.
17#
Elliott Hughes5e522792013-09-24 00:30:25 -070018# - The call_id parameter, given that func_name and syscall_name have
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080019# been provided, allows the user to specify dispatch style syscalls.
20# For example, socket() syscall on i386 actually becomes:
21# socketcall(__NR_socket, 1, *(rest of args on stack)).
22#
Elliott Hughes5e522792013-09-24 00:30:25 -070023# - Each parameter type is assumed to be stored in 32 bits.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#
Elliott Hughes782c4852019-04-16 12:31:00 -070025# This file is processed by a python script named gensyscalls.py, run via
26# genrules in Android.bp.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080027
Elliott Hughes5e522792013-09-24 00:30:25 -070028int execve(const char*, char* const*, char* const*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029
Elliott Hughes5e522792013-09-24 00:30:25 -070030uid_t getuid:getuid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080031uid_t getuid:getuid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070032gid_t getgid:getgid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080033gid_t getgid:getgid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070034uid_t geteuid:geteuid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080035uid_t geteuid:geteuid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070036gid_t getegid:getegid32() arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080037gid_t getegid:getegid() arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070038uid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080039uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070040gid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080041gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070042ssize_t readahead(int, off64_t, size_t) all
43int getgroups:getgroups32(int, gid_t*) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080044int getgroups:getgroups(int, gid_t*) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070045pid_t getpgid(pid_t) all
46pid_t getppid() all
47pid_t getsid(pid_t) all
48pid_t setsid() all
49int setgid:setgid32(gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080050int setgid:setgid(gid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070051int setuid:setuid32(uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080052int setuid:setuid(uid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070053int setreuid:setreuid32(uid_t, uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080054int setreuid:setreuid(uid_t, uid_t) arm64,mips,mips64,x86_64
Elliott Hughes232163c2013-10-09 17:35:36 -070055int setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080056int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070057int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080058int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070059void* __brk:brk(void*) all
Christopher Ferrised459702013-12-02 17:44:53 -080060int kill(pid_t, int) all
Christopher Ferrised459702013-12-02 17:44:53 -080061int tgkill(pid_t tgid, pid_t tid, int sig) all
Elliott Hughes5e522792013-09-24 00:30:25 -070062int __ptrace:ptrace(int request, int pid, void* addr, void* data) all
Elliott Hughes0f461e32014-01-09 10:17:03 -080063
64# <sys/resource.h>
65int getrusage(int, struct rusage*) all
Elliott Hughes8f0e42f2016-11-29 15:10:29 -080066int __getpriority:getpriority(int, id_t) all
67int setpriority(int, id_t, int) all
Elliott Hughes0f461e32014-01-09 10:17:03 -080068# On LP64, rlimit and rlimit64 are the same.
69# On 32-bit systems we use prlimit64 to implement the rlimit64 functions.
70int getrlimit:ugetrlimit(int, struct rlimit*) arm,x86
71int getrlimit(int, struct rlimit*) mips
Elliott Hughes8251d442018-11-09 13:55:21 -080072int getrlimit|getrlimit64(int, struct rlimit*) lp64
73int setrlimit(int, const struct rlimit*) lp32
74int setrlimit|setrlimit64(int, const struct rlimit*) lp64
75int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) lp64
76int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) lp32
Elliott Hughes0f461e32014-01-09 10:17:03 -080077
Elliott Hughes5e522792013-09-24 00:30:25 -070078int setgroups:setgroups32(int, const gid_t*) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080079int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070080int setpgid(pid_t, pid_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -070081int setregid:setregid32(gid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -080082int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070083int chroot(const char*) all
Elliott Hughes9c07aee2014-07-18 15:55:41 -070084int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
Elliott Hughes4906e562013-10-04 14:55:30 -070085long __arch_prctl:arch_prctl(int, unsigned long) x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070086int capget(cap_user_header_t header, cap_user_data_t data) all
87int capset(cap_user_header_t header, const cap_user_data_t data) all
88int sigaltstack(const stack_t*, stack_t*) all
89int acct(const char* filepath) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080090
91# file descriptors
Elliott Hughes5e522792013-09-24 00:30:25 -070092ssize_t read(int, void*, size_t) all
93ssize_t write(int, const void*, size_t) all
Elliott Hughes8251d442018-11-09 13:55:21 -080094ssize_t pread64(int, void*, size_t, off64_t) lp32
95ssize_t pread64|pread(int, void*, size_t, off_t) lp64
96ssize_t pwrite64(int, void*, size_t, off64_t) lp32
97ssize_t pwrite64|pwrite(int, void*, size_t, off_t) lp64
Elliott Hughes6f4594d2015-08-26 13:27:43 -070098
99# On LP32, preadv/pwritev don't use off64_t --- they use pairs of 32-bit
100# arguments to avoid problems on architectures like ARM where 64-bit arguments
101# must be in a register pair starting with an even-numbered register.
102# See linux/fs/read_write.c and https://lwn.net/Articles/311630/.
Elliott Hughes8251d442018-11-09 13:55:21 -0800103ssize_t __preadv64:preadv(int, const struct iovec*, int, long, long) lp32
104ssize_t preadv|preadv64(int, const struct iovec*, int, off_t) lp64
105ssize_t __pwritev64:pwritev(int, const struct iovec*, int, long, long) lp32
106ssize_t pwritev|pwritev64(int, const struct iovec*, int, off_t) lp64
Elliott Hughes6f4594d2015-08-26 13:27:43 -0700107
Elliott Hughes50080a22019-06-19 12:47:53 -0700108int __close:close(int) all
Elliott Hughes7086ad62014-06-19 16:39:01 -0700109pid_t __getpid:getpid() all
Elliott Hughes3d24d2b2019-08-05 13:53:01 -0700110int memfd_create(const char*, unsigned) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700111int munmap(void*, size_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700112void* __mremap:mremap(void*, size_t, size_t, int, void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700113int msync(const void*, size_t, int) all
114int mprotect(const void*, size_t, int) all
Yabin Cuiefbb6fb2014-12-03 11:11:50 -0800115int madvise(void*, size_t, int) all
Elliott Hughes3d24d2b2019-08-05 13:53:01 -0700116int mlock(const void* addr, size_t len) all
117int mlock2(const void* addr, size_t len, int flags) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700118int munlock(const void* addr, size_t len) all
119int mlockall(int flags) all
120int munlockall() all
121int mincore(void* start, size_t length, unsigned char* vec) all
122int __ioctl:ioctl(int, int, void*) all
Josh Gao753361a2016-11-29 14:26:15 -0800123ssize_t readv(int, const struct iovec*, int) all
124ssize_t writev(int, const struct iovec*, int) all
Elliott Hughes8251d442018-11-09 13:55:21 -0800125int __fcntl64:fcntl64(int, int, void*) lp32
126int fcntl(int, int, void*) lp64
Elliott Hughes5e522792013-09-24 00:30:25 -0700127int flock(int, int) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700128int __fchmod:fchmod(int, mode_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700129int dup(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700130int pipe2(int*, int) all
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700131int dup3(int, int, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700132int fsync(int) all
133int fdatasync(int) all
134int fchown:fchown32(int, uid_t, gid_t) arm,x86
Chris Dearman50432122014-02-05 16:59:23 -0800135int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -0700136void sync(void) all
Elliott Hughes896362e2017-08-24 16:31:49 -0700137int syncfs(int) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700138int __fsetxattr:fsetxattr(int, const char*, const void*, size_t, int) all
139ssize_t __fgetxattr:fgetxattr(int, const char*, void*, size_t) all
140ssize_t __flistxattr:flistxattr(int, char*, size_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700141int fremovexattr(int, const char*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800142
Elliott Hughes3d5cb302014-06-06 11:44:55 -0700143int __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) arm,arm64,mips,mips64,x86,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800144
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700145int __openat:openat(int, const char*, int, mode_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700146int __faccessat:faccessat(int, const char*, int) all
147int __fchmodat:fchmodat(int, const char*, mode_t) all
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700148int fchownat(int, const char*, uid_t, gid_t, int) all
Elliott Hughes8251d442018-11-09 13:55:21 -0800149int fstatat64|fstatat:fstatat64(int, const char*, struct stat*, int) lp32
Miodrag Dinica301e732017-06-12 10:52:12 +0200150int fstatat64|fstatat:newfstatat(int, const char*, struct stat*, int) arm64,x86_64
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700151int linkat(int, const char*, int, const char*, int) all
152int mkdirat(int, const char*, mode_t) all
153int mknodat(int, const char*, mode_t, dev_t) all
154int readlinkat(int, const char*, char*, size_t) all
155int renameat(int, const char*, int, const char*) all
Elliott Hughes05b675e2019-04-17 13:01:06 -0700156int renameat2(int, const char*, int, const char*, unsigned) all
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700157int symlinkat(const char*, int, const char*) all
158int unlinkat(int, const char*, int) all
159int utimensat(int, const char*, const struct timespec times[2], int) all
160
Elliott Hughesa6519d62013-10-17 16:56:40 -0700161# Paired off_t/off64_t system calls. On 64-bit systems,
162# sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are
163# aliases. On 32-bit systems, we have two different system calls.
164# That means that every system call in this section should take three lines.
Elliott Hughes8251d442018-11-09 13:55:21 -0800165off_t lseek(int, off_t, int) lp32
166int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) lp32
167off_t lseek|lseek64(int, off_t, int) lp64
168int ftruncate64(int, off64_t) lp32
169int ftruncate|ftruncate64(int, off_t) lp64
170ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) lp32
171ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) lp32
172ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) lp64
173int truncate(const char*, off_t) lp32
174int truncate64(const char*, off64_t) lp32
175int truncate|truncate64(const char*, off_t) lp64
Serban Constantinescued76a932013-12-12 09:36:27 +0000176# (mmap only gets two lines because we only used the 64-bit variant on 32-bit systems.)
Elliott Hughes8251d442018-11-09 13:55:21 -0800177void* __mmap2:mmap2(void*, size_t, int, int, int, long) lp32
178void* mmap|mmap64(void*, size_t, int, int, int, off_t) lp64
Elliott Hughesf64b8ea2014-02-03 16:20:46 -0800179# (fallocate only gets two lines because there is no 32-bit variant.)
Elliott Hughes8251d442018-11-09 13:55:21 -0800180int fallocate64:fallocate(int, int, off64_t, off64_t) lp32
181int fallocate|fallocate64(int, int, off_t, off_t) lp64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700182
Elliott Hughesb587f332014-09-10 17:39:00 -0700183# posix_fadvise64 is awkward: arm has shuffled arguments,
184# the POSIX functions don't set errno, and no architecture has posix_fadvise.
185int __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm
Elliott Hughes9990b392014-09-11 10:10:08 -0700186int __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86
187int __fadvise64:fadvise64(int, off64_t, off64_t, int) arm64,mips,mips64,x86_64
Elliott Hughesb587f332014-09-10 17:39:00 -0700188
Elliott Hughes8251d442018-11-09 13:55:21 -0800189int __fstatfs64:fstatfs64(int, size_t, struct statfs*) lp32
190int __fstatfs:fstatfs(int, struct statfs*) lp64
191int __statfs64:statfs64(const char*, size_t, struct statfs*) lp32
192int __statfs:statfs(const char*, struct statfs*) lp64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800193
Elliott Hughes8251d442018-11-09 13:55:21 -0800194int fstat64|fstat:fstat64(int, struct stat*) lp32
Miodrag Dinica301e732017-06-12 10:52:12 +0200195int fstat64|fstat:fstat(int, struct stat*) arm64,x86_64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800196
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800197# file system
Elliott Hughes5e522792013-09-24 00:30:25 -0700198int chdir(const char*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700199int mount(const char*, const char*, const char*, unsigned long, const void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700200int umount2(const char*, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700201int __getcwd:getcwd(char* buf, size_t size) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700202int fchdir(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700203int setxattr(const char*, const char*, const void*, size_t, int) all
204int lsetxattr(const char*, const char*, const void*, size_t, int) all
205ssize_t getxattr(const char*, const char*, void*, size_t) all
206ssize_t lgetxattr(const char*, const char*, void*, size_t) all
207ssize_t listxattr(const char*, char*, size_t) all
208ssize_t llistxattr(const char*, char*, size_t) all
209int removexattr(const char*, const char*) all
210int lremovexattr(const char*, const char*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700211int swapon(const char*, int) all
212int swapoff(const char*) all
Stephen Smalley5eb686d2012-01-13 07:45:16 -0500213
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800214# time
Elliott Hughes5e522792013-09-24 00:30:25 -0700215int settimeofday(const struct timeval*, const struct timezone*) all
216clock_t times(struct tms*) all
217int nanosleep(const struct timespec*, struct timespec*) all
Haruki Hasegawa18160252014-10-13 00:50:47 +0900218int clock_settime(clockid_t, const struct timespec*) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700219int __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700220int getitimer(int, const struct itimerval*) all
221int setitimer(int, const struct itimerval*, struct itimerval*) all
Elliott Hughes4b558f52014-03-04 15:58:02 -0800222int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all
223int __timer_settime:timer_settime(__kernel_timer_t, int, const struct itimerspec*, struct itimerspec*) all
224int __timer_gettime:timer_gettime(__kernel_timer_t, struct itimerspec*) all
225int __timer_getoverrun:timer_getoverrun(__kernel_timer_t) all
226int __timer_delete:timer_delete(__kernel_timer_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700227int timerfd_create(clockid_t, int) all
228int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all
229int timerfd_gettime(int, struct itimerspec*) all
Greg Hackmann3f3f6c52016-01-27 17:13:51 -0800230int adjtimex(struct timex*) all
Elliott Hughes5f26c6b2016-02-03 13:19:10 -0800231int clock_adjtime(clockid_t, struct timex*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800232
233# signals
Elliott Hughes8251d442018-11-09 13:55:21 -0800234int __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) lp32
Elliott Hughes1f5af922013-10-15 18:01:56 -0700235int __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800236int __rt_sigpending:rt_sigpending(sigset64_t*, size_t) all
237int __rt_sigprocmask:rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t) all
238int __rt_sigsuspend:rt_sigsuspend(const sigset64_t*, size_t) all
239int __rt_sigtimedwait:rt_sigtimedwait(const sigset64_t*, siginfo_t*, const timespec*, size_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700240int __rt_sigqueueinfo:rt_sigqueueinfo(pid_t, int, siginfo_t*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800241int __signalfd4:signalfd4(int, const sigset64_t*, size_t, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800242
243# sockets
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700244int __socket:socket(int, int, int) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800245int socketpair(int, int, int, int*) arm,arm64,mips,mips64,x86_64
Elliott Hughes2b9605f2016-08-16 13:37:24 -0700246int bind(int, struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
Sreeram Ramachandranceb5bd72014-05-12 11:19:16 -0700247int __connect:connect(int, struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800248int listen(int, int) arm,arm64,mips,mips64,x86_64
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700249int __accept4:accept4(int, struct sockaddr*, socklen_t*, int) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800250int getsockname(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
251int getpeername(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700252int __sendto:sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
Chris Dearman50432122014-02-05 16:59:23 -0800253int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
254int shutdown(int, int) arm,arm64,mips,mips64,x86_64
255int setsockopt(int, int, int, const void*, socklen_t) arm,arm64,mips,mips64,x86_64
256int getsockopt(int, int, int, void*, socklen_t*) arm,arm64,mips,mips64,x86_64
Elliott Hughes2b9605f2016-08-16 13:37:24 -0700257ssize_t recvmsg(int, struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700258ssize_t __sendmsg:sendmsg(int, const struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
Guillaume Ranquet6ff0c752014-02-10 13:11:29 +0100259int recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*) arm,arm64,mips,mips64,x86_64
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700260int __sendmmsg:sendmmsg(int, struct mmsghdr*, unsigned int, int) arm,arm64,mips,mips64,x86_64
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800261
262# sockets for x86. These are done as an "indexed" call to socketcall syscall.
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700263int __socket:socketcall:1(int, int, int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700264int bind:socketcall:2(int, struct sockaddr*, int) x86
Sreeram Ramachandranceb5bd72014-05-12 11:19:16 -0700265int __connect:socketcall:3(int, struct sockaddr*, socklen_t) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700266int listen:socketcall:4(int, int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700267int getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86
268int getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86
269int socketpair:socketcall:8(int, int, int, int*) x86
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700270int __sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700271int recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86
272int shutdown:socketcall:13(int, int) x86
273int setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86
274int getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700275int __sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700276int recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700277int __accept4:socketcall:18(int, struct sockaddr*, socklen_t*, int) x86
Guillaume Ranquet6ff0c752014-02-10 13:11:29 +0100278int recvmmsg:socketcall:19(int, struct mmsghdr*, unsigned int, int, const struct timespec*) x86
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700279int __sendmmsg:socketcall:20(int, struct mmsghdr*, unsigned int, int) x86
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800280
281# scheduler & real-time
Elliott Hughes5e522792013-09-24 00:30:25 -0700282int sched_setscheduler(pid_t pid, int policy, const struct sched_param* param) all
283int sched_getscheduler(pid_t pid) all
284int sched_yield(void) all
285int sched_setparam(pid_t pid, const struct sched_param* param) all
286int sched_getparam(pid_t pid, struct sched_param* param) all
287int sched_get_priority_max(int policy) all
288int sched_get_priority_min(int policy) all
289int sched_rr_get_interval(pid_t pid, struct timespec* interval) all
290int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800291int setns(int, int) all
292int unshare(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700293int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800294int __getcpu:getcpu(unsigned*, unsigned*, void*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800295
296# other
Elliott Hughes5e522792013-09-24 00:30:25 -0700297int uname(struct utsname*) all
298mode_t umask(mode_t) all
Elliott Hughes1f5af922013-10-15 18:01:56 -0700299int __reboot:reboot(int, int, int, void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700300int init_module(void*, unsigned long, const char*) all
301int delete_module(const char*, unsigned int) all
302int klogctl:syslog(int, char*, int) all
303int sysinfo(struct sysinfo*) all
304int personality(unsigned long) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800305
Elliott Hughes3f525d42014-06-24 16:32:01 -0700306ssize_t tee(int, int, size_t, unsigned int) all
307ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int) all
308ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int) all
309
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700310int epoll_create1(int) all
311int epoll_ctl(int, int op, int, struct epoll_event*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800312int __epoll_pwait:epoll_pwait(int, struct epoll_event*, int, int, const sigset64_t*, size_t) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800313
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700314int eventfd:eventfd2(unsigned int, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800315
Elliott Hughes9f525642014-04-08 17:14:01 -0700316void _exit|_Exit:exit_group(int) all
Elliott Hughes6b53c232013-10-24 22:36:58 -0700317void __exit:exit(int) all
318
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700319int inotify_init1(int) all
320int inotify_add_watch(int, const char*, unsigned int) all
321int inotify_rm_watch(int, unsigned int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800322
Elliott Hughes11952072013-10-24 15:15:14 -0700323int __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800324int __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800325
Elliott Hughesbe57a402015-06-10 17:24:20 -0700326ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
327ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
328
Elliott Hugheseafad492016-04-05 23:01:42 -0700329int quotactl(int, const char*, int, char*) all
330
Elliott Hughes36d61882013-11-19 13:31:58 -0800331int __set_tid_address:set_tid_address(int*) all
332
Elliott Hughes79310992014-07-30 15:05:09 -0700333int setfsgid(gid_t) all
334int setfsuid(uid_t) all
335
Greg Hackmanne2faf072016-03-03 08:37:53 -0800336int setdomainname(const char*, size_t) all
Elliott Hughesb86a4c72014-11-07 16:07:13 -0800337int sethostname(const char*, size_t) all
338
Elliott Hughes7f72ad42016-04-05 11:56:03 -0700339int __sync_file_range:sync_file_range(int, off64_t, off64_t, unsigned int) arm64,mips,mips64,x86,x86_64
340int __sync_file_range2:sync_file_range2(int, unsigned int, off64_t, off64_t) arm
341
Elliott Hughes6b53c232013-10-24 22:36:58 -0700342pid_t wait4(pid_t, int*, int, struct rusage*) all
343int __waitid:waitid(int, pid_t, struct siginfo_t*, int, void*) all
344
Elliott Hughesa6519d62013-10-17 16:56:40 -0700345# ARM-specific
Elliott Hughes5e522792013-09-24 00:30:25 -0700346int __set_tls:__ARM_NR_set_tls(void*) arm
347int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm
Raghu Gandham1fa0d842012-01-27 17:51:42 -0800348
349# MIPS-specific
Miodrag Dinica301e732017-06-12 10:52:12 +0200350int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips
Elliott Hughesdcbef062014-05-12 16:11:06 -0700351int __set_tls:set_thread_area(void*) mips,mips64
352
353# x86-specific
354int __set_thread_area:set_thread_area(void*) x86
Elliott Hughes625993d2014-07-15 16:53:13 -0700355
356# vdso stuff.
Elliott Hughes21809782017-12-11 11:40:40 -0800357int __clock_getres:clock_getres(clockid_t, struct timespec*) all
Goran Ferenc996f6de2017-05-30 16:00:41 +0200358int __clock_gettime:clock_gettime(clockid_t, timespec*) all
359int __gettimeofday:gettimeofday(timeval*, timezone*) all
Elliott Hughes8465e962017-09-27 16:33:35 -0700360
361# <sys/random.h>
362ssize_t getrandom(void*, size_t, unsigned) all