Basic linux kernel calls (ARM)

  • read - Reads data from a file descriptor.
  • write - Writes data to a file descriptor.
  • open - Opens a file and returns a file descriptor.
  • close - Closes a file descriptor.
  • stat - Retrieves file status.
  • fstat - Retrieves file status given a file descriptor.
  • lstat - Retrieves file status, but does not follow symbolic links.
  • poll - Waits for some event on a file descriptor.
  • lseek - Repositions the file offset of an open file.
  • mmap - Maps files or devices into memory.
  • mprotect - Sets protection on a region of memory.
  • munmap - Unmaps a region of memory.
  • brk - Changes the location of the program break, which defines the end of the process’s data segment.
  • rt_sigaction - Examines and changes a signal action.
  • rt_sigprocmask - Examines and changes blocked signals.
  • ioctl - Manipulates the underlying device parameters of special files.
  • pread64 - Reads data from a file descriptor at a given offset.
  • pwrite64 - Writes data to a file descriptor at a given offset.
  • readv - Reads data from multiple buffers.
  • writev - Writes data to multiple buffers.

First 100 System calls

NRSYSCALL NAMEx8ARG0 (x0)ARG1 (x1)ARG2 (x2)ARG3 (x3)ARG4 (x4)ARG5 (x5)
0io_setup0unsigned nr_reqsaio_context_t *ctx----
1io_destroy1aio_context_t ctx-----
2io_submit2aio_context_tlongstruct iocb * *---
3io_cancel3aio_context_t ctx_idstruct iocb *iocbstruct io_event *result---
4io_getevents4aio_context_t ctx_idlong min_nrlong nrstruct io_event *eventsstruct __kernel_timespec *timeout-
5setxattr5const char *pathconst char *nameconst void *valuesize_t sizeint flags-
6lsetxattr6const char *pathconst char *nameconst void *valuesize_t sizeint flags-
7fsetxattr7int fdconst char *nameconst void *valuesize_t sizeint flags-
8getxattr8const char *pathconst char *namevoid *valuesize_t size--
9lgetxattr9const char *pathconst char *namevoid *valuesize_t size--
10fgetxattrAint fdconst char *namevoid *valuesize_t size--
11listxattrBconst char *pathchar *listsize_t size---
12llistxattrCconst char *pathchar *listsize_t size---
13flistxattrDint fdchar *listsize_t size---
14removexattrEconst char *pathconst char *name----
15lremovexattrFconst char *pathconst char *name----
16fremovexattr10int fdconst char *name----
17getcwd11char *bufunsigned long size----
18lookup_dcookie12u64 cookie64char *bufsize_t len---
19eventfd213unsigned int countint flags----
20epoll_create114int flags-----
21epoll_ctl15int epfdint opint fdstruct epoll_event *event--
22epoll_pwait16int epfdstruct epoll_event *eventsint maxeventsint timeoutconst sigset_t *sigmasksize_t sigsetsize
23dup17unsigned int fildes-----
24dup318unsigned int oldfdunsigned int newfdint flags---
25fcntl19unsigned int fdunsigned int cmdunsigned long arg---
26inotify_init11Aint flags-----
27inotify_add_watch1Bint fdconst char *pathu32 mask---
28inotify_rm_watch1Cint fd__s32 wd----
29ioctl1Dunsigned int fdunsigned int cmdunsigned long arg---
30ioprio_set1Eint whichint whoint ioprio---
31ioprio_get1Fint whichint who----
32flock20unsigned int fdunsigned int cmd----
33mknodat21int dfdconst char * filenameumode_t modeunsigned dev--
34mkdirat22int dfdconst char * pathnameumode_t mode---
35unlinkat23int dfdconst char * pathnameint flag---
36symlinkat24const char * oldnameint newdfdconst char * newname---
37linkat25int olddfdconst char *oldnameint newdfdconst char *newnameint flags-
38renameat26int olddfdconst char * oldnameint newdfdconst char * newname--
39umount227??????
40mount28char *dev_namechar *dir_namechar *typeunsigned long flagsvoid *data-
41pivot_root29const char *new_rootconst char *put_old----
42nfsservctl2A??????
43statfs2Bconst char * pathstruct statfs *buf----
44fstatfs2Cunsigned int fdstruct statfs *buf----
45truncate2Dconst char *pathlong length----
46ftruncate2Eunsigned int fdunsigned long length----
47fallocate2Fint fdint modeloff_t offsetloff_t len--
48faccessat30int dfdconst char *filenameint mode---
49chdir31const char *filename-----
50fchdir32unsigned int fd-----
51chroot33const char *filename-----
52fchmod34unsigned int fdumode_t mode----
53fchmodat35int dfdconst char * filenameumode_t mode---
54fchownat36int dfdconst char *filenameuid_t usergid_t groupint flag-
55fchown37unsigned int fduid_t usergid_t group---
56openat38int dfdconst char *filenameint flagsumode_t mode--
57close39unsigned int fd-----
58vhangup3A------
59pipe23Bint *fildesint flags----
60quotactl3Cunsigned int cmdconst char *specialqid_t idvoid *addr--
61getdents643Dunsigned int fdstruct linux_dirent64 *direntunsigned int count---
62lseek3Eunsigned int fdoff_t offsetunsigned int whence---
63read3Funsigned int fdchar *bufsize_t count---
64write40unsigned int fdconst char *bufsize_t count---
65readv41unsigned long fdconst struct iovec *vecunsigned long vlen---
66writev42unsigned long fdconst struct iovec *vecunsigned long vlen---
67pread6443unsigned int fdchar *bufsize_t countloff_t pos--
68pwrite6444unsigned int fdconst char *bufsize_t countloff_t pos--
69preadv45unsigned long fdconst struct iovec *vecunsigned long vlenunsigned long pos_lunsigned long pos_h-
70pwritev46unsigned long fdconst struct iovec *vecunsigned long vlenunsigned long pos_lunsigned long pos_h-
71sendfile47int out_fdint in_fdoff_t *offsetsize_t count--
72pselect648intfd_set *fd_set *fd_set *struct __kernel_timespec *void *
73ppoll49struct pollfd *unsigned intstruct __kernel_timespec *const sigset_t *size_t-
74signalfd44Aint ufdsigset_t *user_masksize_t sizemaskint flags--
75vmsplice4Bint fdconst struct iovec *iovunsigned long nr_segsunsigned int flags--
76splice4Cint fd_inloff_t *off_inint fd_outloff_t *off_outsize_t lenunsigned int flags
77tee4Dint fdinint fdoutsize_t lenunsigned int flags--
78readlinkat4Eint dfdconst char *pathchar *bufint bufsiz--
79newfstatat4Fint dfdconst char *filenamestruct stat *statbufint flag--
80fstat50unsigned int fdstruct __old_kernel_stat *statbuf----
81sync51------
82fsync52unsigned int fd-----
83fdatasync53unsigned int fd-----
84sync_file_range54int fdloff_t offsetloff_t nbytesunsigned int flags--
85timerfd_create55int clockidint flags----
86timerfd_settime56int ufdint flagsconst struct __kernel_itimerspec *utmrstruct __kernel_itimerspec *otmr--
87timerfd_gettime57int ufdstruct __kernel_itimerspec *otmr----
88utimensat58int dfdconst char *filenamestruct __kernel_timespec *utimesint flags--
89acct59const char *name-----
90capget5Acap_user_header_t headercap_user_data_t dataptr----
91capset5Bcap_user_header_t headerconst cap_user_data_t data----
92personality5Cunsigned int personality-----
93exit5Dint error_code-----
94exit_group5Eint error_code-----
95waitid5Fint whichpid_t pidstruct siginfo *infopint optionsstruct rusage *ru-
96set_tid_address60int *tidptr-----
97unshare61unsigned long unshare_flags-----
98futex62u32 *uaddrint opu32 valstruct __kernel_timespec *utimeu32 *uaddr2u32 val3
99set_robust_list63struct robust_list_head *headsize_t len----
100get_robust_list64int pidstruct robust_list_head * *head_ptrsize_t *len_ptr---