blob: 5f49c8ce52e1c411a8734403a3cf53ab5850a8d3 [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 Hughes2b499042020-02-13 14:21:55 -08008# arch_list ::= "all" | arches
9# arches ::= arch | arch "," arches
Elliott Hughes704772b2022-10-10 17:06:43 +000010# arch ::= "arm" | "arm64" | "riscv64" | "x86" | "x86_64" | "lp32" | "lp64"
Elliott Hughes5e522792013-09-24 00:30:25 -070011#
12# Note:
Elliott Hughesa51916b2013-04-03 10:08:09 -070013# - syscall_name corresponds to the name of the syscall, which may differ from
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080014# the exported function name (example: the exit syscall is implemented by the _exit()
15# function, which is not the same as the standard C exit() function which calls it)
Elliott Hughes5e522792013-09-24 00:30:25 -070016#
H.J. Lu6fe4e872013-10-04 10:03:17 -070017# - alias_list is optional comma separated list of function aliases.
18#
Elliott Hughes5e522792013-09-24 00:30:25 -070019# - The call_id parameter, given that func_name and syscall_name have
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080020# been provided, allows the user to specify dispatch style syscalls.
21# For example, socket() syscall on i386 actually becomes:
22# socketcall(__NR_socket, 1, *(rest of args on stack)).
23#
Elliott Hughes5e522792013-09-24 00:30:25 -070024# - Each parameter type is assumed to be stored in 32 bits.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025#
Elliott Hughes782c4852019-04-16 12:31:00 -070026# This file is processed by a python script named gensyscalls.py, run via
27# genrules in Android.bp.
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080028
Elliott Hughes8dc9f462023-02-03 23:10:04 +000029# Calls that have historical 16-bit variants camping on the best names (CONFIG_UID16).
30uid_t getuid:getuid32() lp32
31uid_t getuid:getuid() lp64
32gid_t getgid:getgid32() lp32
33gid_t getgid:getgid() lp64
34uid_t geteuid:geteuid32() lp32
35uid_t geteuid:geteuid() lp64
36gid_t getegid:getegid32() lp32
37gid_t getegid:getegid() lp64
38uid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) lp32
39uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) lp64
40gid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) lp32
41gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) lp64
42int getgroups:getgroups32(int, gid_t*) lp32
43int getgroups:getgroups(int, gid_t*) lp64
44int setgid:setgid32(gid_t) lp32
45int setgid:setgid(gid_t) lp64
46int setuid:setuid32(uid_t) lp32
47int setuid:setuid(uid_t) lp64
48int setreuid:setreuid32(uid_t, uid_t) lp32
49int setreuid:setreuid(uid_t, uid_t) lp64
50int setresuid:setresuid32(uid_t, uid_t, uid_t) lp32
51int setresuid:setresuid(uid_t, uid_t, uid_t) lp64
52int setresgid:setresgid32(gid_t, gid_t, gid_t) lp32
53int setresgid:setresgid(gid_t, gid_t, gid_t) lp64
54int setfsgid:setfsgid32(gid_t) lp32
55int setfsgid:setfsgid(gid_t) lp64
56int setfsuid:setfsuid32(uid_t) lp32
57int setfsuid:setfsuid(uid_t) lp64
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080058
Elliott Hughes8dc9f462023-02-03 23:10:04 +000059ssize_t readahead(int, off64_t, size_t) all
60pid_t getpgid(pid_t) all
61pid_t getppid() all
62pid_t getsid(pid_t) all
63pid_t setsid() all
64int kill(pid_t, int) all
65int tgkill(pid_t tgid, pid_t tid, int sig) all
66
67void* __brk:brk(void*) all
68int __execve:execve(const char*, char* const*, char* const*) all
69int __ptrace:ptrace(int request, int pid, void* addr, void* data) all
Elliott Hughes0f461e32014-01-09 10:17:03 -080070
71# <sys/resource.h>
72int getrusage(int, struct rusage*) all
Elliott Hughes8f0e42f2016-11-29 15:10:29 -080073int __getpriority:getpriority(int, id_t) all
74int setpriority(int, id_t, int) all
Elliott Hughes0f461e32014-01-09 10:17:03 -080075# On LP64, rlimit and rlimit64 are the same.
76# On 32-bit systems we use prlimit64 to implement the rlimit64 functions.
Elliott Hughes2b499042020-02-13 14:21:55 -080077int getrlimit:ugetrlimit(int, struct rlimit*) lp32
Elliott Hughes8251d442018-11-09 13:55:21 -080078int getrlimit|getrlimit64(int, struct rlimit*) lp64
79int setrlimit(int, const struct rlimit*) lp32
80int setrlimit|setrlimit64(int, const struct rlimit*) lp64
81int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) lp64
82int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) lp32
Elliott Hughes0f461e32014-01-09 10:17:03 -080083
Elliott Hughes2b499042020-02-13 14:21:55 -080084int setgroups:setgroups32(int, const gid_t*) lp32
85int setgroups:setgroups(int, const gid_t*) lp64
Elliott Hughes5e522792013-09-24 00:30:25 -070086int setpgid(pid_t, pid_t) all
Elliott Hughes2b499042020-02-13 14:21:55 -080087int setregid:setregid32(gid_t, gid_t) lp32
88int setregid:setregid(gid_t, gid_t) lp64
Elliott Hughes5e522792013-09-24 00:30:25 -070089int chroot(const char*) all
Elliott Hughes9c07aee2014-07-18 15:55:41 -070090int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all
Elliott Hughes4906e562013-10-04 14:55:30 -070091long __arch_prctl:arch_prctl(int, unsigned long) x86_64
Elliott Hughes5e522792013-09-24 00:30:25 -070092int capget(cap_user_header_t header, cap_user_data_t data) all
93int capset(cap_user_header_t header, const cap_user_data_t data) all
94int sigaltstack(const stack_t*, stack_t*) all
95int acct(const char* filepath) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080096
97# file descriptors
Elliott Hughes5e522792013-09-24 00:30:25 -070098ssize_t read(int, void*, size_t) all
99ssize_t write(int, const void*, size_t) all
Elliott Hughes8251d442018-11-09 13:55:21 -0800100ssize_t pread64(int, void*, size_t, off64_t) lp32
101ssize_t pread64|pread(int, void*, size_t, off_t) lp64
102ssize_t pwrite64(int, void*, size_t, off64_t) lp32
103ssize_t pwrite64|pwrite(int, void*, size_t, off_t) lp64
Elliott Hughes6f4594d2015-08-26 13:27:43 -0700104
105# On LP32, preadv/pwritev don't use off64_t --- they use pairs of 32-bit
Elliott Hughescf59e192021-10-13 18:25:21 -0700106# arguments to avoid problems on architectures like arm32 where 64-bit arguments
Elliott Hughes6f4594d2015-08-26 13:27:43 -0700107# must be in a register pair starting with an even-numbered register.
108# See linux/fs/read_write.c and https://lwn.net/Articles/311630/.
Elliott Hughescf59e192021-10-13 18:25:21 -0700109# Note that there's an unused always-0 second long even on LP64!
110ssize_t __preadv64:preadv(int, const struct iovec*, int, long, long) all
111ssize_t __pwritev64:pwritev(int, const struct iovec*, int, long, long) all
112ssize_t __preadv64v2:preadv2(int, const struct iovec*, int, long, long, int) all
113ssize_t __pwritev64v2:pwritev2(int, const struct iovec*, int, long, long, int) all
Elliott Hughes6f4594d2015-08-26 13:27:43 -0700114
Elliott Hughes50080a22019-06-19 12:47:53 -0700115int __close:close(int) all
Maciej Żenczykowskib65e1052022-01-21 11:19:55 -0800116int close_range(unsigned int, unsigned int, int) all
zijunzhaoc2e412e2022-04-22 18:08:09 +0000117ssize_t copy_file_range(int, off64_t*, int, off64_t*, size_t, unsigned int) all
Elliott Hughes7086ad62014-06-19 16:39:01 -0700118pid_t __getpid:getpid() all
Elliott Hughes3d24d2b2019-08-05 13:53:01 -0700119int memfd_create(const char*, unsigned) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700120int munmap(void*, size_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700121void* __mremap:mremap(void*, size_t, size_t, int, void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700122int msync(const void*, size_t, int) all
123int mprotect(const void*, size_t, int) all
Yabin Cuiefbb6fb2014-12-03 11:11:50 -0800124int madvise(void*, size_t, int) all
Elliott Hughes39899f52021-04-06 16:38:37 -0700125ssize_t process_madvise(int, const struct iovec*, size_t, int, unsigned int) all
Elliott Hughes3d24d2b2019-08-05 13:53:01 -0700126int mlock(const void* addr, size_t len) all
127int mlock2(const void* addr, size_t len, int flags) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700128int munlock(const void* addr, size_t len) all
129int mlockall(int flags) all
130int munlockall() all
131int mincore(void* start, size_t length, unsigned char* vec) all
132int __ioctl:ioctl(int, int, void*) all
Josh Gao753361a2016-11-29 14:26:15 -0800133ssize_t readv(int, const struct iovec*, int) all
134ssize_t writev(int, const struct iovec*, int) all
Elliott Hughes8251d442018-11-09 13:55:21 -0800135int __fcntl64:fcntl64(int, int, void*) lp32
Josh Gao97271922019-11-06 13:15:00 -0800136int __fcntl:fcntl(int, int, void*) lp64
Elliott Hughes5e522792013-09-24 00:30:25 -0700137int flock(int, int) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700138int __fchmod:fchmod(int, mode_t) all
Josh Gao1fad5282020-04-29 17:00:13 -0700139int __pipe2:pipe2(int*, int) all
Josh Gao97271922019-11-06 13:15:00 -0800140int __dup:dup(int) all
141int __dup3:dup3(int, int, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700142int fsync(int) all
143int fdatasync(int) all
Elliott Hughes2b499042020-02-13 14:21:55 -0800144int fchown:fchown32(int, uid_t, gid_t) lp32
145int fchown:fchown(int, uid_t, gid_t) lp64
Elliott Hughes5e522792013-09-24 00:30:25 -0700146void sync(void) all
Elliott Hughes896362e2017-08-24 16:31:49 -0700147int syncfs(int) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700148int __fsetxattr:fsetxattr(int, const char*, const void*, size_t, int) all
149ssize_t __fgetxattr:fgetxattr(int, const char*, void*, size_t) all
150ssize_t __flistxattr:flistxattr(int, char*, size_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700151int fremovexattr(int, const char*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800152
Elliott Hughes2b499042020-02-13 14:21:55 -0800153int __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) all
Chris Dearman50432122014-02-05 16:59:23 -0800154
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700155int __openat:openat(int, const char*, int, mode_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700156int __faccessat:faccessat(int, const char*, int) all
157int __fchmodat:fchmodat(int, const char*, mode_t) all
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700158int fchownat(int, const char*, uid_t, gid_t, int) all
Elliott Hughes8251d442018-11-09 13:55:21 -0800159int fstatat64|fstatat:fstatat64(int, const char*, struct stat*, int) lp32
Elliott Hughesde1cf852021-09-07 09:17:14 -0700160int fstatat64|fstatat:newfstatat(int, const char*, struct stat*, int) lp64
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700161int linkat(int, const char*, int, const char*, int) all
162int mkdirat(int, const char*, mode_t) all
163int mknodat(int, const char*, mode_t, dev_t) all
164int readlinkat(int, const char*, char*, size_t) all
Elliott Hughes05b675e2019-04-17 13:01:06 -0700165int renameat2(int, const char*, int, const char*, unsigned) all
Elliott Hughesf8fcfbc2013-10-22 13:28:46 -0700166int symlinkat(const char*, int, const char*) all
167int unlinkat(int, const char*, int) all
168int utimensat(int, const char*, const struct timespec times[2], int) all
169
Elliott Hughesa6519d62013-10-17 16:56:40 -0700170# Paired off_t/off64_t system calls. On 64-bit systems,
171# sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are
172# aliases. On 32-bit systems, we have two different system calls.
173# That means that every system call in this section should take three lines.
Elliott Hughes8251d442018-11-09 13:55:21 -0800174off_t lseek(int, off_t, int) lp32
175int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) lp32
176off_t lseek|lseek64(int, off_t, int) lp64
177int ftruncate64(int, off64_t) lp32
178int ftruncate|ftruncate64(int, off_t) lp64
179ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) lp32
180ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) lp32
181ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) lp64
182int truncate(const char*, off_t) lp32
183int truncate64(const char*, off64_t) lp32
184int truncate|truncate64(const char*, off_t) lp64
Serban Constantinescued76a932013-12-12 09:36:27 +0000185# (mmap only gets two lines because we only used the 64-bit variant on 32-bit systems.)
Elliott Hughes8251d442018-11-09 13:55:21 -0800186void* __mmap2:mmap2(void*, size_t, int, int, int, long) lp32
187void* mmap|mmap64(void*, size_t, int, int, int, off_t) lp64
Elliott Hughesf64b8ea2014-02-03 16:20:46 -0800188# (fallocate only gets two lines because there is no 32-bit variant.)
Elliott Hughes8251d442018-11-09 13:55:21 -0800189int fallocate64:fallocate(int, int, off64_t, off64_t) lp32
190int fallocate|fallocate64(int, int, off_t, off_t) lp64
Elliott Hughesa6519d62013-10-17 16:56:40 -0700191
Elliott Hughesb587f332014-09-10 17:39:00 -0700192# posix_fadvise64 is awkward: arm has shuffled arguments,
193# the POSIX functions don't set errno, and no architecture has posix_fadvise.
194int __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm
Elliott Hughes9990b392014-09-11 10:10:08 -0700195int __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86
Elliott Hughes2b499042020-02-13 14:21:55 -0800196int __fadvise64:fadvise64(int, off64_t, off64_t, int) lp64
Elliott Hughesb587f332014-09-10 17:39:00 -0700197
Elliott Hughes8251d442018-11-09 13:55:21 -0800198int __fstatfs64:fstatfs64(int, size_t, struct statfs*) lp32
199int __fstatfs:fstatfs(int, struct statfs*) lp64
200int __statfs64:statfs64(const char*, size_t, struct statfs*) lp32
201int __statfs:statfs(const char*, struct statfs*) lp64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800202
Elliott Hughesde1cf852021-09-07 09:17:14 -0700203int fstat64|fstat:fstat64(int, struct stat*) lp32
204int fstat64|fstat:fstat(int, struct stat*) lp64
Elliott Hughesdb1ea342014-01-17 18:42:49 -0800205
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800206# file system
Elliott Hughes5e522792013-09-24 00:30:25 -0700207int chdir(const char*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700208int mount(const char*, const char*, const char*, unsigned long, const void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700209int umount2(const char*, int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700210int __getcwd:getcwd(char* buf, size_t size) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700211int fchdir(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700212int setxattr(const char*, const char*, const void*, size_t, int) all
213int lsetxattr(const char*, const char*, const void*, size_t, int) all
214ssize_t getxattr(const char*, const char*, void*, size_t) all
215ssize_t lgetxattr(const char*, const char*, void*, size_t) all
216ssize_t listxattr(const char*, char*, size_t) all
217ssize_t llistxattr(const char*, char*, size_t) all
218int removexattr(const char*, const char*) all
219int lremovexattr(const char*, const char*) all
Elliott Hughes733cedd2020-02-21 23:21:28 -0800220int statx(int, const char*, int, unsigned, struct statx*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700221int swapon(const char*, int) all
222int swapoff(const char*) all
Stephen Smalley5eb686d2012-01-13 07:45:16 -0500223
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800224# time
Elliott Hughes5e522792013-09-24 00:30:25 -0700225int settimeofday(const struct timeval*, const struct timezone*) all
226clock_t times(struct tms*) all
227int nanosleep(const struct timespec*, struct timespec*) all
Haruki Hasegawa18160252014-10-13 00:50:47 +0900228int clock_settime(clockid_t, const struct timespec*) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700229int __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all
Elliott Hughes51d158f2020-01-06 14:29:06 -0800230int getitimer(int, struct itimerval*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700231int setitimer(int, const struct itimerval*, struct itimerval*) all
Elliott Hughes4b558f52014-03-04 15:58:02 -0800232int __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all
233int __timer_settime:timer_settime(__kernel_timer_t, int, const struct itimerspec*, struct itimerspec*) all
234int __timer_gettime:timer_gettime(__kernel_timer_t, struct itimerspec*) all
235int __timer_getoverrun:timer_getoverrun(__kernel_timer_t) all
236int __timer_delete:timer_delete(__kernel_timer_t) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700237int timerfd_create(clockid_t, int) all
238int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all
239int timerfd_gettime(int, struct itimerspec*) all
Greg Hackmann3f3f6c52016-01-27 17:13:51 -0800240int adjtimex(struct timex*) all
Elliott Hughes5f26c6b2016-02-03 13:19:10 -0800241int clock_adjtime(clockid_t, struct timex*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800242
243# signals
Elliott Hughes8251d442018-11-09 13:55:21 -0800244int __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) lp32
Elliott Hughes1f5af922013-10-15 18:01:56 -0700245int __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800246int __rt_sigpending:rt_sigpending(sigset64_t*, size_t) all
247int __rt_sigprocmask:rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t) all
248int __rt_sigsuspend:rt_sigsuspend(const sigset64_t*, size_t) all
249int __rt_sigtimedwait:rt_sigtimedwait(const sigset64_t*, siginfo_t*, const timespec*, size_t) all
Elliott Hughes50080a22019-06-19 12:47:53 -0700250int __rt_sigqueueinfo:rt_sigqueueinfo(pid_t, int, siginfo_t*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800251int __signalfd4:signalfd4(int, const sigset64_t*, size_t, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800252
253# sockets
Elliott Hughes2b499042020-02-13 14:21:55 -0800254int __socket:socket(int, int, int) arm,lp64
Josh Gaob107eab2020-04-29 17:17:56 -0700255int __socketpair:socketpair(int, int, int, int*) arm,lp64
Bram Bonnébca8a442021-04-08 09:34:36 +0000256int bind(int, struct sockaddr*, socklen_t) arm,lp64
Elliott Hughes2b499042020-02-13 14:21:55 -0800257int __connect:connect(int, struct sockaddr*, socklen_t) arm,lp64
258int listen(int, int) arm,lp64
259int __accept4:accept4(int, struct sockaddr*, socklen_t*, int) arm,lp64
260int getsockname(int, struct sockaddr*, socklen_t*) arm,lp64
261int getpeername(int, struct sockaddr*, socklen_t*) arm,lp64
262ssize_t __sendto:sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,lp64
263ssize_t recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,lp64
264int shutdown(int, int) arm,lp64
265int setsockopt(int, int, int, const void*, socklen_t) arm,lp64
266int getsockopt(int, int, int, void*, socklen_t*) arm,lp64
267ssize_t __recvmsg:recvmsg(int, struct msghdr*, unsigned int) arm,lp64
268ssize_t __sendmsg:sendmsg(int, const struct msghdr*, unsigned int) arm,lp64
269int __recvmmsg:recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*) arm,lp64
270int __sendmmsg:sendmmsg(int, struct mmsghdr*, unsigned int, int) arm,lp64
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800271
272# sockets for x86. These are done as an "indexed" call to socketcall syscall.
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700273int __socket:socketcall:1(int, int, int) x86
Bram Bonnébca8a442021-04-08 09:34:36 +0000274int bind:socketcall:2(int, struct sockaddr*, int) x86
Sreeram Ramachandranceb5bd72014-05-12 11:19:16 -0700275int __connect:socketcall:3(int, struct sockaddr*, socklen_t) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700276int listen:socketcall:4(int, int) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700277int getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86
278int getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86
Josh Gaob107eab2020-04-29 17:17:56 -0700279int __socketpair:socketcall:8(int, int, int, int*) x86
Elliott Hughes51d158f2020-01-06 14:29:06 -0800280ssize_t __sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86
281ssize_t recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86
Elliott Hughes5e522792013-09-24 00:30:25 -0700282int shutdown:socketcall:13(int, int) x86
283int setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86
284int getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700285int __sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86
Josh Gao97271922019-11-06 13:15:00 -0800286int __recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86
Sreeram Ramachandran903b7882014-05-19 13:39:57 -0700287int __accept4:socketcall:18(int, struct sockaddr*, socklen_t*, int) x86
Josh Gao97271922019-11-06 13:15:00 -0800288int __recvmmsg:socketcall:19(int, struct mmsghdr*, unsigned int, int, const struct timespec*) x86
Elliott Hughes5c6a3f92019-06-13 14:24:45 -0700289int __sendmmsg:socketcall:20(int, struct mmsghdr*, unsigned int, int) x86
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800290
291# scheduler & real-time
Elliott Hughes5e522792013-09-24 00:30:25 -0700292int sched_setscheduler(pid_t pid, int policy, const struct sched_param* param) all
293int sched_getscheduler(pid_t pid) all
294int sched_yield(void) all
295int sched_setparam(pid_t pid, const struct sched_param* param) all
296int sched_getparam(pid_t pid, struct sched_param* param) all
297int sched_get_priority_max(int policy) all
298int sched_get_priority_min(int policy) all
299int sched_rr_get_interval(pid_t pid, struct timespec* interval) all
300int sched_setaffinity(pid_t pid, size_t setsize, const cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800301int setns(int, int) all
302int unshare(int) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700303int __sched_getaffinity:sched_getaffinity(pid_t pid, size_t setsize, cpu_set_t* set) all
Elliott Hughes887e1142014-01-02 12:05:50 -0800304int __getcpu:getcpu(unsigned*, unsigned*, void*) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800305
306# other
Elliott Hughes5e522792013-09-24 00:30:25 -0700307int uname(struct utsname*) all
308mode_t umask(mode_t) all
Elliott Hughes1f5af922013-10-15 18:01:56 -0700309int __reboot:reboot(int, int, int, void*) all
Elliott Hughes5e522792013-09-24 00:30:25 -0700310int init_module(void*, unsigned long, const char*) all
311int delete_module(const char*, unsigned int) all
312int klogctl:syslog(int, char*, int) all
313int sysinfo(struct sysinfo*) all
314int personality(unsigned long) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800315
Alessio Balsini5afe3f82021-11-11 18:43:00 +0000316int bpf(int, union bpf_attr *, unsigned int) all
317
Elliott Hughes3f525d42014-06-24 16:32:01 -0700318ssize_t tee(int, int, size_t, unsigned int) all
319ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int) all
320ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int) all
321
Josh Gaoa38331d2020-04-29 17:06:14 -0700322int __epoll_create1:epoll_create1(int) all
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700323int epoll_ctl(int, int op, int, struct epoll_event*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800324int __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 -0800325
Josh Gao7de41242020-04-29 17:08:46 -0700326int __eventfd:eventfd2(unsigned int, int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800327
Evgenii Stepanov3031a7e2022-05-12 15:50:47 -0700328void __exit_group:exit_group(int) all
Elliott Hughes6b53c232013-10-24 22:36:58 -0700329void __exit:exit(int) all
330
Elliott Hughescac7b9d2013-10-23 09:48:29 -0700331int inotify_init1(int) all
332int inotify_add_watch(int, const char*, unsigned int) all
333int inotify_rm_watch(int, unsigned int) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800334
Elliott Hughes11952072013-10-24 15:15:14 -0700335int __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all
Elliott Hughes5905d6f2018-01-30 15:09:51 -0800336int __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t) all
The Android Open Source Project1dc9e472009-03-03 19:28:35 -0800337
Elliott Hughesbe57a402015-06-10 17:24:20 -0700338ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
339ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all
340
Elliott Hugheseafad492016-04-05 23:01:42 -0700341int quotactl(int, const char*, int, char*) all
342
Elliott Hughes36d61882013-11-19 13:31:58 -0800343int __set_tid_address:set_tid_address(int*) all
344
Greg Hackmanne2faf072016-03-03 08:37:53 -0800345int setdomainname(const char*, size_t) all
Elliott Hughesb86a4c72014-11-07 16:07:13 -0800346int sethostname(const char*, size_t) all
347
Elliott Hughesde1cf852021-09-07 09:17:14 -0700348int __sync_file_range:sync_file_range(int, off64_t, off64_t, unsigned int) x86,lp64
Elliott Hughes7f72ad42016-04-05 11:56:03 -0700349int __sync_file_range2:sync_file_range2(int, unsigned int, off64_t, off64_t) arm
350
Elliott Hughes6b53c232013-10-24 22:36:58 -0700351pid_t wait4(pid_t, int*, int, struct rusage*) all
Elliott Hughes51d158f2020-01-06 14:29:06 -0800352int __waitid:waitid(int, pid_t, siginfo_t*, int, void*) all
Elliott Hughes6b53c232013-10-24 22:36:58 -0700353
Elliott Hughesa6519d62013-10-17 16:56:40 -0700354# ARM-specific
Elliott Hughes5e522792013-09-24 00:30:25 -0700355int __set_tls:__ARM_NR_set_tls(void*) arm
356int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm
Raghu Gandham1fa0d842012-01-27 17:51:42 -0800357
Elliott Hughes704772b2022-10-10 17:06:43 +0000358# riscv64-specific
Elliott Hughes74d97652023-07-12 16:30:55 -0700359int __riscv_flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64
Elliott Hughes704772b2022-10-10 17:06:43 +0000360
Elliott Hughesdcbef062014-05-12 16:11:06 -0700361# x86-specific
362int __set_thread_area:set_thread_area(void*) x86
Elliott Hughes625993d2014-07-15 16:53:13 -0700363
364# vdso stuff.
Elliott Hughes21809782017-12-11 11:40:40 -0800365int __clock_getres:clock_getres(clockid_t, struct timespec*) all
Elliott Hughes51d158f2020-01-06 14:29:06 -0800366int __clock_gettime:clock_gettime(clockid_t, struct timespec*) all
367int __gettimeofday:gettimeofday(struct timeval*, struct timezone*) all
Elliott Hughes8465e962017-09-27 16:33:35 -0700368
369# <sys/random.h>
370ssize_t getrandom(void*, size_t, unsigned) all
Josh Gao3de19152021-02-22 18:09:48 -0800371
372# <sys/pidfd.h>
373int __pidfd_open:pidfd_open(pid_t, unsigned int) all
374int __pidfd_getfd:pidfd_getfd(int, int, unsigned int) all
375int pidfd_send_signal(int, int, siginfo_t*, unsigned int) all