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