Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 1 | # This file is used to automatically generate bionic's system call stubs. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 2 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 3 | # Each non-blank, non-comment line has the following format: |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 4 | # |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 5 | # func_name[|alias_list][:syscall_name[:socketcall_id]]([parameter_list]) arch_list |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 6 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 7 | # where: |
Elliott Hughes | 2b49904 | 2020-02-13 14:21:55 -0800 | [diff] [blame] | 8 | # arch_list ::= "all" | arches |
| 9 | # arches ::= arch | arch "," arches |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 10 | # arch ::= "arm" | "arm64" | "riscv64" | "x86" | "x86_64" | "lp32" | "lp64" |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 11 | # |
| 12 | # Note: |
Elliott Hughes | a51916b | 2013-04-03 10:08:09 -0700 | [diff] [blame] | 13 | # - syscall_name corresponds to the name of the syscall, which may differ from |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 14 | # 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 Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 16 | # |
H.J. Lu | 6fe4e87 | 2013-10-04 10:03:17 -0700 | [diff] [blame] | 17 | # - alias_list is optional comma separated list of function aliases. |
| 18 | # |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 19 | # - No return type is specified. |
| 20 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 21 | # - The call_id parameter, given that func_name and syscall_name have |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 22 | # been provided, allows the user to specify dispatch style syscalls. |
| 23 | # For example, socket() syscall on i386 actually becomes: |
| 24 | # socketcall(__NR_socket, 1, *(rest of args on stack)). |
| 25 | # |
Elliott Hughes | 5e52279 | 2013-09-24 00:30:25 -0700 | [diff] [blame] | 26 | # - Each parameter type is assumed to be stored in 32 bits. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 27 | # |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 28 | # This file is processed by a python script named gensyscalls.py, run via |
| 29 | # genrules in Android.bp. |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 30 | |
Elliott Hughes | 8dc9f46 | 2023-02-03 23:10:04 +0000 | [diff] [blame] | 31 | # Calls that have historical 16-bit variants camping on the best names (CONFIG_UID16). |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 32 | getuid:getuid32() lp32 |
| 33 | getuid:getuid() lp64 |
| 34 | getgid:getgid32() lp32 |
| 35 | getgid:getgid() lp64 |
| 36 | geteuid:geteuid32() lp32 |
| 37 | geteuid:geteuid() lp64 |
| 38 | getegid:getegid32() lp32 |
| 39 | getegid:getegid() lp64 |
| 40 | getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) lp32 |
| 41 | getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) lp64 |
| 42 | getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) lp32 |
| 43 | getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) lp64 |
| 44 | getgroups:getgroups32(int, gid_t*) lp32 |
| 45 | getgroups:getgroups(int, gid_t*) lp64 |
| 46 | setgid:setgid32(gid_t) lp32 |
| 47 | setgid:setgid(gid_t) lp64 |
| 48 | setuid:setuid32(uid_t) lp32 |
| 49 | setuid:setuid(uid_t) lp64 |
| 50 | setreuid:setreuid32(uid_t, uid_t) lp32 |
| 51 | setreuid:setreuid(uid_t, uid_t) lp64 |
| 52 | setresuid:setresuid32(uid_t, uid_t, uid_t) lp32 |
| 53 | setresuid:setresuid(uid_t, uid_t, uid_t) lp64 |
| 54 | setresgid:setresgid32(gid_t, gid_t, gid_t) lp32 |
| 55 | setresgid:setresgid(gid_t, gid_t, gid_t) lp64 |
| 56 | setfsgid:setfsgid32(gid_t) lp32 |
| 57 | setfsgid:setfsgid(gid_t) lp64 |
| 58 | setfsuid:setfsuid32(uid_t) lp32 |
| 59 | setfsuid:setfsuid(uid_t) lp64 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 60 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 61 | readahead(int, off64_t, size_t) all |
| 62 | getpgid(pid_t) all |
| 63 | getppid() all |
| 64 | getsid(pid_t) all |
| 65 | setsid() all |
| 66 | kill(pid_t, int) all |
| 67 | tgkill(pid_t tgid, pid_t tid, int sig) all |
Elliott Hughes | 8dc9f46 | 2023-02-03 23:10:04 +0000 | [diff] [blame] | 68 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 69 | __brk:brk(void*) all |
| 70 | execve(const char*, char* const*, char* const*) all |
| 71 | __ptrace:ptrace(int request, int pid, void* addr, void* data) all |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 72 | |
| 73 | # <sys/resource.h> |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 74 | getrusage(int, struct rusage*) all |
| 75 | __getpriority:getpriority(int, id_t) all |
| 76 | setpriority(int, id_t, int) all |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 77 | # On LP64, rlimit and rlimit64 are the same. |
| 78 | # On 32-bit systems we use prlimit64 to implement the rlimit64 functions. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 79 | getrlimit:ugetrlimit(int, struct rlimit*) lp32 |
| 80 | getrlimit|getrlimit64(int, struct rlimit*) lp64 |
| 81 | setrlimit(int, const struct rlimit*) lp32 |
| 82 | setrlimit|setrlimit64(int, const struct rlimit*) lp64 |
| 83 | prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) lp64 |
| 84 | prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) lp32 |
Elliott Hughes | 0f461e3 | 2014-01-09 10:17:03 -0800 | [diff] [blame] | 85 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 86 | setgroups:setgroups32(int, const gid_t*) lp32 |
| 87 | setgroups:setgroups(int, const gid_t*) lp64 |
| 88 | setpgid(pid_t, pid_t) all |
| 89 | setregid:setregid32(gid_t, gid_t) lp32 |
| 90 | setregid:setregid(gid_t, gid_t) lp64 |
| 91 | chroot(const char*) all |
| 92 | prctl(int, unsigned long, unsigned long, unsigned long, unsigned long) all |
| 93 | capget(cap_user_header_t header, cap_user_data_t data) all |
| 94 | capset(cap_user_header_t header, const cap_user_data_t data) all |
| 95 | sigaltstack(const stack_t*, stack_t*) all |
| 96 | acct(const char* filepath) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 97 | |
| 98 | # file descriptors |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 99 | read(int, void*, size_t) all |
| 100 | write(int, const void*, size_t) all |
| 101 | pread64(int, void*, size_t, off64_t) lp32 |
| 102 | pread64|pread(int, void*, size_t, off_t) lp64 |
| 103 | pwrite64(int, void*, size_t, off64_t) lp32 |
| 104 | pwrite64|pwrite(int, void*, size_t, off_t) lp64 |
Elliott Hughes | 6f4594d | 2015-08-26 13:27:43 -0700 | [diff] [blame] | 105 | |
| 106 | # On LP32, preadv/pwritev don't use off64_t --- they use pairs of 32-bit |
Elliott Hughes | cf59e19 | 2021-10-13 18:25:21 -0700 | [diff] [blame] | 107 | # arguments to avoid problems on architectures like arm32 where 64-bit arguments |
Elliott Hughes | 6f4594d | 2015-08-26 13:27:43 -0700 | [diff] [blame] | 108 | # must be in a register pair starting with an even-numbered register. |
| 109 | # See linux/fs/read_write.c and https://lwn.net/Articles/311630/. |
Elliott Hughes | cf59e19 | 2021-10-13 18:25:21 -0700 | [diff] [blame] | 110 | # Note that there's an unused always-0 second long even on LP64! |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 111 | __preadv64:preadv(int, const struct iovec*, int, long, long) all |
| 112 | __pwritev64:pwritev(int, const struct iovec*, int, long, long) all |
| 113 | __preadv64v2:preadv2(int, const struct iovec*, int, long, long, int) all |
| 114 | __pwritev64v2:pwritev2(int, const struct iovec*, int, long, long, int) all |
Elliott Hughes | 6f4594d | 2015-08-26 13:27:43 -0700 | [diff] [blame] | 115 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 116 | __close:close(int) all |
| 117 | close_range(unsigned int, unsigned int, int) all |
| 118 | copy_file_range(int, off64_t*, int, off64_t*, size_t, unsigned int) all |
| 119 | __getpid:getpid() all |
| 120 | memfd_create(const char*, unsigned) all |
| 121 | munmap(void*, size_t) all |
| 122 | msync(const void*, size_t, int) all |
| 123 | mprotect(const void*, size_t, int) all |
| 124 | madvise(void*, size_t, int) all |
| 125 | process_madvise(int, const struct iovec*, size_t, int, unsigned int) all |
| 126 | mlock(const void* addr, size_t len) all |
| 127 | mlock2(const void* addr, size_t len, int flags) all |
| 128 | munlock(const void* addr, size_t len) all |
| 129 | mlockall(int flags) all |
| 130 | mseal(void*, size_t, unsigned long) lp64 |
| 131 | munlockall() all |
| 132 | mincore(void* start, size_t length, unsigned char* vec) all |
| 133 | __ioctl:ioctl(int, int, void*) all |
| 134 | readv(int, const struct iovec*, int) all |
| 135 | writev(int, const struct iovec*, int) all |
| 136 | __fcntl64:fcntl64(int, int, void*) lp32 |
| 137 | __fcntl:fcntl(int, int, void*) lp64 |
| 138 | flock(int, int) all |
| 139 | __fchmod:fchmod(int, mode_t) all |
| 140 | __pipe2:pipe2(int*, int) all |
| 141 | __dup:dup(int) all |
| 142 | __dup3:dup3(int, int, int) all |
| 143 | fsync(int) all |
| 144 | fdatasync(int) all |
| 145 | fchown:fchown32(int, uid_t, gid_t) lp32 |
| 146 | fchown:fchown(int, uid_t, gid_t) lp64 |
| 147 | sync(void) all |
| 148 | syncfs(int) all |
| 149 | __fsetxattr:fsetxattr(int, const char*, const void*, size_t, int) all |
| 150 | __fgetxattr:fgetxattr(int, const char*, void*, size_t) all |
| 151 | __flistxattr:flistxattr(int, char*, size_t) all |
| 152 | fremovexattr(int, const char*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 153 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 154 | __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) all |
Chris Dearman | 5043212 | 2014-02-05 16:59:23 -0800 | [diff] [blame] | 155 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 156 | __openat:openat(int, const char*, int, mode_t) all |
| 157 | __faccessat:faccessat(int, const char*, int) all |
| 158 | __fchmodat:fchmodat(int, const char*, mode_t) all |
| 159 | fchownat(int, const char*, uid_t, gid_t, int) all |
| 160 | fstatat64|fstatat:fstatat64(int, const char*, struct stat*, int) lp32 |
| 161 | fstatat64|fstatat:newfstatat(int, const char*, struct stat*, int) lp64 |
| 162 | linkat(int, const char*, int, const char*, int) all |
| 163 | mkdirat(int, const char*, mode_t) all |
| 164 | mknodat(int, const char*, mode_t, dev_t) all |
| 165 | readlinkat(int, const char*, char*, size_t) all |
| 166 | renameat2(int, const char*, int, const char*, unsigned) all |
| 167 | symlinkat(const char*, int, const char*) all |
| 168 | unlinkat(int, const char*, int) all |
| 169 | utimensat(int, const char*, const struct timespec times[2], int) all |
Elliott Hughes | f8fcfbc | 2013-10-22 13:28:46 -0700 | [diff] [blame] | 170 | |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 171 | # Paired off_t/off64_t system calls. On 64-bit systems, |
| 172 | # sizeof(off_t) == sizeof(off64_t), so there we emit two symbols that are |
| 173 | # aliases. On 32-bit systems, we have two different system calls. |
| 174 | # That means that every system call in this section should take three lines. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 175 | lseek(int, off_t, int) lp32 |
| 176 | __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) lp32 |
| 177 | lseek|lseek64(int, off_t, int) lp64 |
| 178 | sendfile(int out_fd, int in_fd, off_t* offset, size_t count) lp32 |
| 179 | sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) lp32 |
| 180 | sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) lp64 |
| 181 | truncate(const char*, off_t) lp32 |
| 182 | truncate64(const char*, off64_t) lp32 |
| 183 | truncate|truncate64(const char*, off_t) lp64 |
Elliott Hughes | f64b8ea | 2014-02-03 16:20:46 -0800 | [diff] [blame] | 184 | # (fallocate only gets two lines because there is no 32-bit variant.) |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 185 | fallocate64:fallocate(int, int, off64_t, off64_t) lp32 |
| 186 | fallocate|fallocate64(int, int, off_t, off_t) lp64 |
Elliott Hughes | 4358d53 | 2024-06-06 21:08:17 +0000 | [diff] [blame] | 187 | # (ftruncate only gets two lines because 32-bit bionic only uses the 64-bit call.) |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 188 | ftruncate64(int, off64_t) lp32 |
| 189 | ftruncate|ftruncate64(int, off_t) lp64 |
Elliott Hughes | 4358d53 | 2024-06-06 21:08:17 +0000 | [diff] [blame] | 190 | # (mmap only gets two lines because 32-bit bionic only uses the 64-bit call.) |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 191 | __mmap2:mmap2(void*, size_t, int, int, int, long) lp32 |
| 192 | mmap|mmap64(void*, size_t, int, int, int, off_t) lp64 |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 193 | |
Elliott Hughes | bebe3d5 | 2024-06-07 17:16:34 -0400 | [diff] [blame] | 194 | # mremap is in C++ for 32-bit so we can add the PTRDIFF_MAX check. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 195 | __mremap:mremap(void*, size_t, size_t, int, void*) lp32 |
| 196 | mremap(void*, size_t, size_t, int, void*) lp64 |
Elliott Hughes | bebe3d5 | 2024-06-07 17:16:34 -0400 | [diff] [blame] | 197 | |
Elliott Hughes | b587f33 | 2014-09-10 17:39:00 -0700 | [diff] [blame] | 198 | # posix_fadvise64 is awkward: arm has shuffled arguments, |
| 199 | # the POSIX functions don't set errno, and no architecture has posix_fadvise. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 200 | __arm_fadvise64_64:arm_fadvise64_64(int, int, off64_t, off64_t) arm |
| 201 | __fadvise64:fadvise64_64(int, off64_t, off64_t, int) x86 |
| 202 | __fadvise64:fadvise64(int, off64_t, off64_t, int) lp64 |
Elliott Hughes | b587f33 | 2014-09-10 17:39:00 -0700 | [diff] [blame] | 203 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 204 | __fstatfs64:fstatfs64(int, size_t, struct statfs*) lp32 |
| 205 | __fstatfs:fstatfs(int, struct statfs*) lp64 |
| 206 | __statfs64:statfs64(const char*, size_t, struct statfs*) lp32 |
| 207 | __statfs:statfs(const char*, struct statfs*) lp64 |
Elliott Hughes | db1ea34 | 2014-01-17 18:42:49 -0800 | [diff] [blame] | 208 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 209 | fstat64|fstat:fstat64(int, struct stat*) lp32 |
| 210 | fstat64|fstat:fstat(int, struct stat*) lp64 |
Elliott Hughes | db1ea34 | 2014-01-17 18:42:49 -0800 | [diff] [blame] | 211 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 212 | # file system |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 213 | chdir(const char*) all |
| 214 | mount(const char*, const char*, const char*, unsigned long, const void*) all |
| 215 | umount2(const char*, int) all |
| 216 | __getcwd:getcwd(char* buf, size_t size) all |
| 217 | fchdir(int) all |
| 218 | setxattr(const char*, const char*, const void*, size_t, int) all |
| 219 | lsetxattr(const char*, const char*, const void*, size_t, int) all |
| 220 | getxattr(const char*, const char*, void*, size_t) all |
| 221 | lgetxattr(const char*, const char*, void*, size_t) all |
| 222 | listxattr(const char*, char*, size_t) all |
| 223 | llistxattr(const char*, char*, size_t) all |
| 224 | removexattr(const char*, const char*) all |
| 225 | lremovexattr(const char*, const char*) all |
| 226 | statx(int, const char*, int, unsigned, struct statx*) all |
| 227 | swapon(const char*, int) all |
| 228 | swapoff(const char*) all |
Stephen Smalley | 5eb686d | 2012-01-13 07:45:16 -0500 | [diff] [blame] | 229 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 230 | # time |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 231 | settimeofday(const struct timeval*, const struct timezone*) all |
| 232 | times(struct tms*) all |
| 233 | nanosleep(const struct timespec*, struct timespec*) all |
| 234 | clock_settime(clockid_t, const struct timespec*) all |
| 235 | __clock_nanosleep:clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*) all |
| 236 | getitimer(int, struct itimerval*) all |
| 237 | setitimer(int, const struct itimerval*, struct itimerval*) all |
| 238 | __timer_create:timer_create(clockid_t clockid, struct sigevent* evp, __kernel_timer_t* timerid) all |
| 239 | __timer_settime:timer_settime(__kernel_timer_t, int, const struct itimerspec*, struct itimerspec*) all |
| 240 | __timer_gettime:timer_gettime(__kernel_timer_t, struct itimerspec*) all |
| 241 | __timer_getoverrun:timer_getoverrun(__kernel_timer_t) all |
| 242 | __timer_delete:timer_delete(__kernel_timer_t) all |
| 243 | timerfd_create(clockid_t, int) all |
| 244 | timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) all |
| 245 | timerfd_gettime(int, struct itimerspec*) all |
| 246 | adjtimex(struct timex*) all |
| 247 | clock_adjtime(clockid_t, struct timex*) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 248 | |
| 249 | # signals |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 250 | __sigaction:sigaction(int, const struct sigaction*, struct sigaction*) lp32 |
| 251 | __rt_sigaction:rt_sigaction(int, const struct sigaction*, struct sigaction*, size_t) all |
| 252 | __rt_sigpending:rt_sigpending(sigset64_t*, size_t) all |
| 253 | __rt_sigprocmask:rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t) all |
| 254 | __rt_sigsuspend:rt_sigsuspend(const sigset64_t*, size_t) all |
| 255 | __rt_sigtimedwait:rt_sigtimedwait(const sigset64_t*, siginfo_t*, const timespec*, size_t) all |
| 256 | __rt_sigqueueinfo:rt_sigqueueinfo(pid_t, int, siginfo_t*) all |
| 257 | __signalfd4:signalfd4(int, const sigset64_t*, size_t, int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 258 | |
| 259 | # sockets |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 260 | __socket:socket(int, int, int) arm,lp64 |
| 261 | __socketpair:socketpair(int, int, int, int*) arm,lp64 |
| 262 | bind(int, struct sockaddr*, socklen_t) arm,lp64 |
| 263 | __connect:connect(int, struct sockaddr*, socklen_t) arm,lp64 |
| 264 | listen(int, int) arm,lp64 |
| 265 | __accept4:accept4(int, struct sockaddr*, socklen_t*, int) arm,lp64 |
| 266 | getsockname(int, struct sockaddr*, socklen_t*) arm,lp64 |
| 267 | getpeername(int, struct sockaddr*, socklen_t*) arm,lp64 |
| 268 | __sendto:sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,lp64 |
| 269 | recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,lp64 |
| 270 | shutdown(int, int) arm,lp64 |
| 271 | setsockopt(int, int, int, const void*, socklen_t) arm,lp64 |
| 272 | getsockopt(int, int, int, void*, socklen_t*) arm,lp64 |
| 273 | __recvmsg:recvmsg(int, struct msghdr*, unsigned int) arm,lp64 |
| 274 | __sendmsg:sendmsg(int, const struct msghdr*, unsigned int) arm,lp64 |
| 275 | __recvmmsg:recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*) arm,lp64 |
| 276 | __sendmmsg:sendmmsg(int, struct mmsghdr*, unsigned int, int) arm,lp64 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 277 | |
| 278 | # sockets for x86. These are done as an "indexed" call to socketcall syscall. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 279 | __socket:socketcall:1(int, int, int) x86 |
| 280 | bind:socketcall:2(int, struct sockaddr*, int) x86 |
| 281 | __connect:socketcall:3(int, struct sockaddr*, socklen_t) x86 |
| 282 | listen:socketcall:4(int, int) x86 |
| 283 | getsockname:socketcall:6(int, struct sockaddr*, socklen_t*) x86 |
| 284 | getpeername:socketcall:7(int, struct sockaddr*, socklen_t*) x86 |
| 285 | __socketpair:socketcall:8(int, int, int, int*) x86 |
| 286 | __sendto:socketcall:11(int, const void*, size_t, int, const struct sockaddr*, socklen_t) x86 |
| 287 | recvfrom:socketcall:12(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) x86 |
| 288 | shutdown:socketcall:13(int, int) x86 |
| 289 | setsockopt:socketcall:14(int, int, int, const void*, socklen_t) x86 |
| 290 | getsockopt:socketcall:15(int, int, int, void*, socklen_t*) x86 |
| 291 | __sendmsg:socketcall:16(int, const struct msghdr*, unsigned int) x86 |
| 292 | __recvmsg:socketcall:17(int, struct msghdr*, unsigned int) x86 |
| 293 | __accept4:socketcall:18(int, struct sockaddr*, socklen_t*, int) x86 |
| 294 | __recvmmsg:socketcall:19(int, struct mmsghdr*, unsigned int, int, const struct timespec*) x86 |
| 295 | __sendmmsg:socketcall:20(int, struct mmsghdr*, unsigned int, int) x86 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 296 | |
| 297 | # scheduler & real-time |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 298 | sched_get_priority_max(int policy) all |
| 299 | sched_get_priority_min(int policy) all |
| 300 | __sched_getaffinity:sched_getaffinity(pid_t, size_t, cpu_set_t*) all |
| 301 | sched_getattr(pid_t, sched_attr*, unsigned, unsigned) all |
| 302 | sched_getparam(pid_t, sched_param*) all |
| 303 | sched_getscheduler(pid_t) all |
| 304 | sched_rr_get_interval(pid_t, timespec*) all |
| 305 | sched_setaffinity(pid_t, size_t, const cpu_set_t*) all |
| 306 | sched_setattr(pid_t, sched_attr*, unsigned) all |
| 307 | sched_setparam(pid_t, const sched_param*) all |
| 308 | sched_setscheduler(pid_t, int, const sched_param*) all |
| 309 | sched_yield(void) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 310 | |
| 311 | # other |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 312 | uname(struct utsname*) all |
| 313 | umask(mode_t) all |
| 314 | __reboot:reboot(int, int, int, void*) all |
| 315 | init_module(void*, unsigned long, const char*) all |
| 316 | delete_module(const char*, unsigned int) all |
| 317 | klogctl:syslog(int, char*, int) all |
| 318 | sysinfo(struct sysinfo*) all |
| 319 | personality(unsigned long) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 320 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 321 | setns(int, int) all |
| 322 | unshare(int) all |
Elliott Hughes | f4420fb | 2025-01-30 11:21:26 -0800 | [diff] [blame] | 323 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 324 | __getcpu:getcpu(unsigned*, unsigned*, void*) all |
Elliott Hughes | f4420fb | 2025-01-30 11:21:26 -0800 | [diff] [blame] | 325 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 326 | bpf(int, union bpf_attr *, unsigned int) all |
Alessio Balsini | 5afe3f8 | 2021-11-11 18:43:00 +0000 | [diff] [blame] | 327 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 328 | tee(int, int, size_t, unsigned int) all |
| 329 | splice(int, off64_t*, int, off64_t*, size_t, unsigned int) all |
| 330 | vmsplice(int, const struct iovec*, size_t, unsigned int) all |
Elliott Hughes | 3f525d4 | 2014-06-24 16:32:01 -0700 | [diff] [blame] | 331 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 332 | __epoll_create1:epoll_create1(int) all |
| 333 | epoll_ctl(int, int op, int, struct epoll_event*) all |
| 334 | __epoll_pwait:epoll_pwait(int, struct epoll_event*, int, int, const sigset64_t*, size_t) all |
| 335 | __epoll_pwait2:epoll_pwait2(int, struct epoll_event*, int, const timespec64*, const sigset64_t*, size_t) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 336 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 337 | __eventfd:eventfd2(unsigned int, int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 338 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 339 | _exit|_Exit:exit_group(int) all |
| 340 | __exit:exit(int) all |
Elliott Hughes | 6b53c23 | 2013-10-24 22:36:58 -0700 | [diff] [blame] | 341 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 342 | inotify_init1(int) all |
| 343 | inotify_add_watch(int, const char*, unsigned int) all |
| 344 | inotify_rm_watch(int, unsigned int) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 345 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 346 | __pselect6:pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*) all |
| 347 | __ppoll:ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t) all |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 348 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 349 | process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all |
| 350 | process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*, unsigned long, unsigned long) all |
Elliott Hughes | be57a40 | 2015-06-10 17:24:20 -0700 | [diff] [blame] | 351 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 352 | quotactl(int, const char*, int, char*) all |
Elliott Hughes | eafad49 | 2016-04-05 23:01:42 -0700 | [diff] [blame] | 353 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 354 | __set_tid_address:set_tid_address(int*) all |
Elliott Hughes | 36d6188 | 2013-11-19 13:31:58 -0800 | [diff] [blame] | 355 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 356 | setdomainname(const char*, size_t) all |
| 357 | sethostname(const char*, size_t) all |
Elliott Hughes | b86a4c7 | 2014-11-07 16:07:13 -0800 | [diff] [blame] | 358 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 359 | sync_file_range(int, off64_t, off64_t, unsigned int) x86,lp64 |
| 360 | __sync_file_range2:sync_file_range2(int, unsigned int, off64_t, off64_t) arm |
Elliott Hughes | 7f72ad4 | 2016-04-05 11:56:03 -0700 | [diff] [blame] | 361 | |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 362 | wait4(pid_t, int*, int, struct rusage*) all |
| 363 | __waitid:waitid(int, pid_t, siginfo_t*, int, void*) all |
Elliott Hughes | 6b53c23 | 2013-10-24 22:36:58 -0700 | [diff] [blame] | 364 | |
Elliott Hughes | a6519d6 | 2013-10-17 16:56:40 -0700 | [diff] [blame] | 365 | # ARM-specific |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 366 | __set_tls:__ARM_NR_set_tls(void*) arm |
| 367 | cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm |
Raghu Gandham | 1fa0d84 | 2012-01-27 17:51:42 -0800 | [diff] [blame] | 368 | |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 369 | # riscv64-specific |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 370 | __riscv_flush_icache:riscv_flush_icache(void*, void*, unsigned long) riscv64 |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 371 | |
Elliott Hughes | dcbef06 | 2014-05-12 16:11:06 -0700 | [diff] [blame] | 372 | # x86-specific |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 373 | __set_thread_area:set_thread_area(void*) x86 |
| 374 | arch_prctl(int, unsigned long) x86_64 |
Elliott Hughes | 625993d | 2014-07-15 16:53:13 -0700 | [diff] [blame] | 375 | |
| 376 | # vdso stuff. |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 377 | __clock_getres:clock_getres(clockid_t, struct timespec*) all |
| 378 | __clock_gettime:clock_gettime(clockid_t, struct timespec*) all |
| 379 | __gettimeofday:gettimeofday(struct timeval*, struct timezone*) all |
Elliott Hughes | 8465e96 | 2017-09-27 16:33:35 -0700 | [diff] [blame] | 380 | |
| 381 | # <sys/random.h> |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 382 | getrandom(void*, size_t, unsigned) all |
Josh Gao | 3de1915 | 2021-02-22 18:09:48 -0800 | [diff] [blame] | 383 | |
| 384 | # <sys/pidfd.h> |
Elliott Hughes | 83f08aa | 2025-02-06 17:14:58 -0500 | [diff] [blame^] | 385 | __pidfd_open:pidfd_open(pid_t, unsigned int) all |
| 386 | __pidfd_getfd:pidfd_getfd(int, int, unsigned int) all |
| 387 | pidfd_send_signal(int, int, siginfo_t*, unsigned int) all |