Linux arm64 system call numbers
Source: the generic table include/uapi/asm-generic/unistd.h from the Linux master branch, which arm64
uses unchanged, read at https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/asm-generic/unistd.h.
arm64 passes the number in x8, arguments in x0 to x5, and returns in x0; errors use the same
-errno convention as x86-64 (see syscall(2), https://man7.org/linux/man-pages/man2/syscall.2.html).
The numbers differ from x86-64 for the same call. Never copy a number between the two files.
Verified numbers
Section titled “Verified numbers”| Name | Number |
|---|---|
| io_setup | 0 |
| epoll_create1 | 20 |
| epoll_ctl | 21 |
| epoll_pwait | 22 |
| ppoll | 73 |
| getdents64 | 61 |
| openat | 56 |
| mmap | 222 |
| mprotect | 226 |
| clock_gettime | 113 |
| clock_nanosleep | 115 |
| kill | 129 |
| exit_group | 94 |
| futex | 98 |
| socket | 198 |
| bind | 200 |
| listen | 201 |
| connect | 203 |
| sendto | 206 |
| recvfrom | 207 |
| accept4 | 242 |
| sched_getaffinity | 123 |
| getrandom | 278 |
| membarrier | 283 |
| statx | 291 |
| wait4 | 260 |
| rseq | 293 |
| io_uring_setup | 425 |
| io_uring_enter | 426 |
| io_uring_register | 427 |
| pidfd_open | 434 |
| clone3 | 435 |
__NR_syscalls is 473 in this table.
The SYS_* constants in std/sys/linux.xl for aarch64 are all confirmed by this table: EPOLL_CREATE1 20, EPOLL_CTL 21, EPOLL_WAIT 22, GETRANDOM 278, CLOCK_GETTIME 113, PIPE2 59, GETTID 178, CLONE 220, NANOSLEEP 101, MMAP 222, MUNMAP 215, SCHED_YIELD 124, EXIT 93, EXIT_GROUP 94, FUTEX 98, READ 63, WRITE 64, IOCTL 29, GETDENTS64 61, MPROTECT 226; the open family uses OPENAT 56, CLOSE 57, LSEEK 62, UNLINKAT 35.
arm64 has no epoll_wait entry; epoll_pwait (22) is the call to use, with a null sigmask. Any code path that names SYS_EPOLL_WAIT on arm64 must map to 22 and document the sigmask argument. The SYS_EPOLL_WAIT = 22 constant in linux.xl is therefore correct only with that sigmask rule.
Process spawning (std/sys/spawn), read from include/uapi/asm-generic/unistd.h: execve 221, chdir 49, geteuid 175, ppoll 73, pipe2 59, dup3 24, fcntl 25, wait4 260, kill 129, clone 220, exit 93, getpid 172, rt_sigaction 134, and readlinkat 78 (arm64 has no plain readlink; AT_FDCWD is -100, include/uapi/linux/fcntl.h). The constants of the x86-64 page (O_CLOEXEC, F_DUPFD_CLOEXEC, POLLIN, …) are the same on arm64.
Directories (std/io/dir), read from include/uapi/asm-generic/unistd.h: getcwd 17, mkdirat 34, unlinkat 35 (with AT_REMOVEDIR 0x200, include/uapi/linux/fcntl.h, it removes a directory), renameat 38 (arm64 has no plain mkdir, rmdir or rename), and ioctl 29 for TCGETS (0x5401, include/uapi/asm-generic/ioctls.h) behind isatty.
Also confirmed: ioctl 29, sendmsg 211, recvmsg 212, madvise 233, sched_yield 124, rt_sigaction 134, rt_sigprocmask 135, getpid 172, fcntl 25, dup3 24, eventfd2 19, signalfd4 74, timerfd_create 85, prlimit64 261.
Not yet verified
Section titled “Not yet verified”The ioctl request numbers for DRM, sysfs and block devices (they come from each driver or subsystem header, not from this table).
Links, permissions and times (std/io/files), from the same header: symlinkat 36, readlinkat 78, fchmodat 53 and utimensat 88, all called with AT_FDCWD (-100) as the directory; arm64 has no plain symlink, readlink, chmod or utimes.