michael105.github.io

About me

Sitemap
-Blog- -Github Repo Index- -Linux syscalls- -Old Projects- -Links- -About Me- -Hobbies-

Linux syscall table

Did look several times for a complete and up to date linux syscall table.

Here is a quick hack, to fetch the call numbers and the arguments from the kernel sources, and generate a html table.

The ‘script’ (it is functional, that’s all) is linked below.

Most syscalls are declared within a single file. Few syscalls might not be predeclared at all, and / or to be found within other files. Yet I didn’t need them, and there are the manpages as well.

So, I leave this the way it is.

Looking at this - this won’t win a prize, but, took me only few minutes to setup.

Did look specifically for the landlock syscalls. Which are now numbered below.

parse.pl

Linux syscall table amd64 6.3

0readuint fd char *buf size_t count
1writeuint fd const char *bufsize_t count
2openconst char *filenameint flags umode_t mode
3closeuint fd
4statconst char *filenamestruct stat *statbuf
5fstatuint fdstruct stat *statbuf
6lstatconst char *filenamestruct stat *statbuf
7pollstruct pollfd *ufds uint nfdsint timeout
8lseekuint fd off_t offsetuint whence
9mmapulong addr ulong lenulong prot ulong flagsulong fd ulong pgoff
10mprotectulong start size_t lenulong prot
11munmapulong addr size_t len
12brkulong brk
13rt_sigactionintconst struct sigaction *struct sigaction *size_t
14rt_sigprocmaskint how sigset_t *setsigset_t *oset size_t sigsetsize
15rt_sigreturn?
16ioctluint fd uint cmdulong arg
17pread64uint fd char *bufsize_t count loff_t pos
18pwrite64uint fd const char *bufsize_t count loff_t pos
19readvulong fdconst struct iovec *veculong vlen
20writevulong fdconst struct iovec *veculong vlen
21accessconst char *filename int mode
22pipeint *fildes
23selectint n fd_set *inp fd_set *outpfd_set *exp struct timeval *tvp
24sched_yieldvoid
25mremapulong addrulong old_len ulong new_lenulong flags ulong new_addr
26msynculong start size_t len int flags
27mincoreulong start size_t lenuchar * vec
28madviseulong start size_t len int behavior
29shmgetkey_t key size_t size int flag
30shmatint shmid char *shmaddr int shmflg
31shmctlint shmid int cmd struct shmid_ds *buf
32dupuint fildes
33dup2uint oldfd uint newfd
34pausevoid
35nanosleepstruct timespec *rqtpstruct timespec *rmtp
36getitimerint which struct itimerval *value
37alarmuint seconds
38setitimerint whichstruct itimerval *valuestruct itimerval *ovalue
39getpidvoid
40sendfileint out_fd int in_fdoff_t *offset size_t count
41socketint int int
42connectint struct sockaddr * int
43acceptint struct sockaddr * int *
44sendtoint void * size_t unsignedstruct sockaddr * int
45recvfromint void * size_t unsignedstruct sockaddr * int *
46sendmsgint fd struct user_msghdr *msg uflags
47recvmsgint fd struct user_msghdr *msg uflags
48shutdownint int
49bindint struct sockaddr * int
50listenint int
51getsocknameint struct sockaddr * int *
52getpeernameint struct sockaddr * int *
53socketpairint int int int *
54setsockoptint fd int level int optnamechar *optval int optlen
55getsockoptint fd int level int optnamechar *optval int *optlen
56cloneulong ulong int *int * ulong
57forkvoid
58vforkvoid
59execveconst char *filenameconst char *const *argvconst char *const *envp
60exitint error_code
61wait4pid_t pid int *stat_addrint options struct rusage *ru
62killpid_t pid int sig
63unamestruct old_utsname *
64semgetkey_t key int nsems int semflg
65semopint semid struct sembuf *sopsunsops
66semctlint semid int semnum int cmd ulong arg
67shmdtchar *shmaddr
68msggetkey_t key int msgflg
69msgsndint msqid struct msgbuf *msgpsize_t msgsz int msgflg
70msgrcvint msqid struct msgbuf *msgpsize_t msgsz long msgtyp int msgflg
71msgctlint msqid int cmd struct msqid_ds *buf
72fcntluint fd uint cmd ulong arg
73flockuint fd uint cmd
74fsyncuint fd
75fdatasyncuint fd
76truncateconst char *path long length
77ftruncateuint fd ulong length
78getdentsuint fdstruct linux_dirent *direntuint count
79getcwdchar *buf ulong size
80chdirconst char *filename
81fchdiruint fd
82renameconst char *oldnameconst char *newname
83mkdirconst char *pathname umode_t mode
84rmdirconst char *pathname
85creatconst char *pathname umode_t mode
86linkconst char *oldnameconst char *newname
87unlinkconst char *pathname
88symlinkconst char *old const char *new
89readlinkconst char *pathchar *buf int bufsiz
90chmodconst char *filename umode_t mode
91fchmoduint fd umode_t mode
92chownconst char *filenameuid_t user gid_t group
93fchownuint fd uid_t user gid_t group
94lchownconst char *filenameuid_t user gid_t group
95umaskint mask
96gettimeofdaystruct timeval *tvstruct timezone *tz
97getrlimituint resourcestruct rlimit *rlim
98getrusageint who struct rusage *ru
99sysinfostruct sysinfo *info
100timesstruct tms *tbuf
101ptracelong request long pid ulong addrulong data
102getuidvoid
103syslogint type char *buf int len
104getgidvoid
105setuiduid_t uid
106setgidgid_t gid
107geteuidvoid
108getegidvoid
109setpgidpid_t pid pid_t pgid
110getppidvoid
111getpgrpvoid
112setsidvoid
113setreuiduid_t ruid uid_t euid
114setregidgid_t rgid gid_t egid
115getgroupsint gidsetsize gid_t *grouplist
116setgroupsint gidsetsize gid_t *grouplist
117setresuiduid_t ruid uid_t euid uid_t suid
118getresuiduid_t *ruid uid_t *euid uid_t *suid
119setresgidgid_t rgid gid_t egid gid_t sgid
120getresgidgid_t *rgid gid_t *egid gid_t *sgid
121getpgidpid_t pid
122setfsuiduid_t uid
123setfsgidgid_t gid
124getsidpid_t pid
125capgetcap_user_header_t headercap_user_data_t dataptr
126capsetcap_user_header_t headerconst cap_user_data_t data
127rt_sigpendingsigset_t *set size_t sigsetsize
128rt_sigtimedwaitconst sigset_t *uthesesiginfo_t *uinfoconst struct timespec *utssize_t sigsetsize
129rt_sigqueueinfopid_t pid int sig siginfo_t *uinfo
130rt_sigsuspendsigset_t *unewset size_t sigsetsize
131sigaltstackconst struct sigaltstack *ussstruct sigaltstack *uoss
132utimechar *filenamestruct utimbuf *times
133mknodconst char *filename umode_t modeudev
134uselibconst char *library
135personalityuint personality
136ustatudev struct ustat *ubuf
137statfsconst char * pathstruct statfs *buf
138fstatfsuint fd struct statfs *buf
139sysfsint optionulong arg1 ulong arg2
140getpriorityint which int who
141setpriorityint which int who int niceval
142sched_setparampid_t pidstruct sched_param *param
143sched_getparampid_t pidstruct sched_param *param
144sched_setschedulerpid_t pid int policystruct sched_param *param
145sched_getschedulerpid_t pid
146sched_get_priority_maxint policy
147sched_get_priority_minint policy
148sched_rr_get_intervalpid_t pidstruct timespec *interval
149mlockulong start size_t len
150munlockulong start size_t len
151mlockallint flags
152munlockallvoid
153vhangupvoid
154modify_ldt?
155pivot_rootconst char *new_rootconst char *put_old
156_sysctl?
157prctlint option ulong arg2 ulong arg3ulong arg4 ulong arg5
158arch_prctl?
159adjtimexstruct timex *txc_p
160setrlimituint resourcestruct rlimit *rlim
161chrootconst char *filename
162syncvoid
163acctconst char *name
164settimeofdaystruct timeval *tvstruct timezone *tz
165mountchar *dev_name char *dir_namechar *type ulong flagsvoid *data
166umount2?
167swaponconst char *specialfile int swap_flags
168swapoffconst char *specialfile
169rebootint magic1 int magic2 uint cmdvoid *arg
170sethostnamechar *name int len
171setdomainnamechar *name int len
172iopl?
173iopermulong from ulong num int on
174create_module?
175init_modulevoid *umod ulong lenconst char *uargs
176delete_moduleconst char *name_useruint flags
177get_kernel_syms?
178query_module?
179quotactluint cmd const char *specialqid_t id void *addr
180nfsservctl?
181getpmsg?
182putpmsg?
183afs_syscall?
184tuxcall?
185security?
186gettidvoid
187readaheadint fd loff_t offset size_t count
188setxattrconst char *path const char *nameconst void *value size_t size int flags
189lsetxattrconst char *path const char *nameconst void *value size_t size int flags
190fsetxattrint fd const char *nameconst void *value size_t size int flags
191getxattrconst char *path const char *namevoid *value size_t size
192lgetxattrconst char *path const char *namevoid *value size_t size
193fgetxattrint fd const char *namevoid *value size_t size
194listxattrconst char *path char *listsize_t size
195llistxattrconst char *path char *listsize_t size
196flistxattrint fd char *list size_t size
197removexattrconst char *pathconst char *name
198lremovexattrconst char *pathconst char *name
199fremovexattrint fd const char *name
200tkillpid_t pid int sig
201timetime_t *tloc
202futexu32 *uaddr int op u32 valconst struct timespec *utimeu32 *uaddr2 u32 val3
203sched_setaffinitypid_t pid uint lenulong *user_mask_ptr
204sched_getaffinitypid_t pid uint lenulong *user_mask_ptr
205set_thread_area?
206io_setupunr_reqs aio_context_t *ctx
207io_destroyaio_context_t ctx
208io_geteventsaio_context_t ctx_idlong min_nrlong nrstruct io_event *eventsstruct timespec *timeout
209io_submitaio_context_t longstruct iocb * *
210io_cancelaio_context_t ctx_id struct iocb *iocbstruct io_event *result
211get_thread_area?
212lookup_dcookieu64 cookie64 char *buf size_t len
213epoll_createint size
214epoll_ctl_old?
215epoll_wait_old?
216remap_file_pagesulong start ulong sizeulong prot ulong pgoffulong flags
217getdents64uint fdstruct linux_dirent64 *direntuint count
218set_tid_addressint *tidptr
219restart_syscallvoid
220semtimedopint semid struct sembuf *sopsunsopsconst struct timespec *timeout
221fadvise64int fd loff_t offset size_t len int advice
222timer_createclockid_t which_clockstruct sigevent *timer_event_spectimer_t * created_timer_id
223timer_settimetimer_t timer_id int flagsconst struct itimerspec *new_settingstruct itimerspec *old_setting
224timer_gettimetimer_t timer_idstruct itimerspec *setting
225timer_getoverruntimer_t timer_id
226timer_deletetimer_t timer_id
227clock_settimeclockid_t which_clockconst struct timespec *tp
228clock_gettimeclockid_t which_clockstruct timespec *tp
229clock_getresclockid_t which_clockstruct timespec *tp
230clock_nanosleepclockid_t which_clock int flagsconst struct timespec *rqtpstruct timespec *rmtp
231exit_groupint error_code
232epoll_waitint epfd struct epoll_event *eventsint maxevents int timeout
233epoll_ctlint epfd int op int fdstruct epoll_event *event
234tgkillpid_t tgid pid_t pid int sig
235utimeschar *filenamestruct timeval *utimes
236vserver?
237mbindulong start ulong lenulong modeconst ulong *nmaskulong maxnodeuflags
238set_mempolicyint mode const ulong *nmaskulong maxnode
239get_mempolicyint *policyulong *nmaskulong maxnodeulong addr ulong flags
240mq_openconst char *name int oflag umode_t mode struct mq_attr *attr
241mq_unlinkconst char *name
242mq_timedsendmqd_t mqdes const char *msg_ptr size_t msg_len uint msg_prio const struct timespec *abs_timeout
243mq_timedreceivemqd_t mqdes char *msg_ptr size_t msg_len uint *msg_prio const struct timespec *abs_timeout
244mq_notifymqd_t mqdes const struct sigevent *notification
245mq_getsetattrmqd_t mqdes const struct mq_attr *mqstat struct mq_attr *omqstat
246kexec_loadulong entry ulong nr_segmentsstruct kexec_segment *segmentsulong flags
247waitidint which pid_t pidstruct siginfo *infopint options struct rusage *ru
248add_keyconst char *_typeconst char *_descriptionconst void *_payloadsize_t plenkey_serial_t destringid
249request_keyconst char *_typeconst char *_descriptionconst char *_callout_infokey_serial_t destringid
250keyctlint cmd ulong arg2 ulong arg3ulong arg4 ulong arg5
251ioprio_setint which int who int ioprio
252ioprio_getint which int who
253inotify_initvoid
254inotify_add_watchint fd const char *pathu32 mask
255inotify_rm_watchint fd __s32 wd
256migrate_pagespid_t pid ulong maxnodeconst ulong *fromconst ulong *to
257openatint dfd const char *filename int flagsumode_t mode
258mkdiratint dfd const char * pathname umode_t mode
259mknodatint dfd const char * filename umode_t modeudev
260fchownatint dfd const char *filename uid_t usergid_t group int flag
261futimesatint dfd const char *filenamestruct timeval *utimes
262newfstatatint dfd const char *filenamestruct stat *statbuf int flag
262fstatatint dfd const char *filenamestruct stat *statbuf int flag
263unlinkatint dfd const char * pathname int flag
264renameatint olddfd const char * oldnameint newdfd const char * newname
265linkatint olddfd const char *oldnameint newdfd const char *newname int flags
266symlinkatconst char * oldnameint newdfd const char * newname
267readlinkatint dfd const char *path char *bufint bufsiz
268fchmodatint dfd const char * filenameumode_t mode
269faccessatint dfd const char *filename int mode
270pselect6int fd_set * fd_set *fd_set * struct timespec *void *
271ppollstruct pollfd * uintstruct timespec * const sigset_t *size_t
272unshareulong unshare_flags
273set_robust_liststruct robust_list_head *headsize_t len
274get_robust_listint pidstruct robust_list_head * *head_ptrsize_t *len_ptr
275spliceint fd_in loff_t *off_inint fd_out loff_t *off_outsize_t len uint flags
276teeint fdin int fdout size_t len uint flags
277sync_file_rangeint fd loff_t offset loff_t nbytesuint flags
278vmspliceint fd const struct iovec *iovulong nr_segs uint flags
279move_pagespid_t pid ulong nr_pagesconst void * *pagesconst int *nodesint *statusint flags
280utimensatint dfd const char *filenamestruct timespec *utimesint flags
281epoll_pwaitint epfd struct epoll_event *eventsint maxevents int timeoutconst sigset_t *sigmasksize_t sigsetsize
282signalfdint ufd sigset_t *user_mask size_t sizemask
283timerfd_createint clockid int flags
284eventfduint count
285fallocateint fd int mode loff_t offset loff_t len
286timerfd_settimeint ufd int flagsconst struct itimerspec *utmrstruct itimerspec *otmr
287timerfd_gettimeint ufd struct itimerspec *otmr
288accept4int struct sockaddr * int * int
289signalfd4int ufd sigset_t *user_mask size_t sizemask int flags
290eventfd2uint count int flags
291epoll_create1int flags
292dup3uint oldfd uint newfd int flags
293pipe2int *fildes int flags
294inotify_init1int flags
295preadvulong fd const struct iovec *veculong vlen ulong pos_l ulong pos_h
296pwritevulong fd const struct iovec *veculong vlen ulong pos_l ulong pos_h
297rt_tgsigqueueinfopid_t tgid pid_t pid int sigsiginfo_t *uinfo
298perf_event_openstruct perf_event_attr *attr_uptrpid_t pid int cpu int group_fd ulong flags
299recvmmsgint fd struct mmsghdr *msguint vlen uflagsstruct timespec *timeout
300fanotify_inituint flags uint event_f_flags
301fanotify_markint fanotify_fd uint flagsu64 mask int fdconst char *pathname
302prlimit64pid_t pid uint resourceconst struct rlimit64 *new_rlimstruct rlimit64 *old_rlim
303name_to_handle_atint dfd const char *namestruct file_handle *handleint *mnt_id int flag
304open_by_handle_atint mountdirfdstruct file_handle *handleint flags
305clock_adjtimeclockid_t which_clockstruct timex *tx
306syncfsint fd
307sendmmsgint fd struct mmsghdr *msguint vlen uflags
308setnsint fd int nstype
309getcpuu *cpu u *node struct getcpu_cache *cache
310process_vm_readvpid_t pidconst struct iovec *lveculong liovcntconst struct iovec *rveculong riovcntulong flags
311process_vm_writevpid_t pidconst struct iovec *lveculong liovcntconst struct iovec *rveculong riovcntulong flags
312kcmppid_t pid1 pid_t pid2 int typeulong idx1 ulong idx2
313finit_moduleint fd const char *uargs int flags
314sched_setattrpid_t pidstruct sched_attr *attruint flags
315sched_getattrpid_t pidstruct sched_attr *attruint sizeuint flags
316renameat2int olddfd const char *oldnameint newdfd const char *newnameuint flags
317seccompuint op uint flagsvoid *uargs
318getrandomchar *buf size_t countuint flags
319memfd_createconst char *uname_ptr uint flags
320kexec_file_loadint kernel_fd int initrd_fdulong cmdline_lenconst char *cmdline_ptrulong flags
321bpfint cmd union bpf_attr *attr uint size
322execveatint dfd const char *filenameconst char *const *argvconst char *const *envp int flags
323userfaultfdint flags
324membarrierint cmd uint flags int cpu_id
325mlock2ulong start size_t len int flags
326copy_file_rangeint fd_in loff_t *off_inint fd_out loff_t *off_outsize_t len uint flags
327preadv2ulong fd const struct iovec *veculong vlen ulong pos_l ulong pos_hrwf_t flags
328pwritev2ulong fd const struct iovec *veculong vlen ulong pos_l ulong pos_hrwf_t flags
329pkey_mprotectulong start size_t lenulong prot int pkey
330pkey_alloculong flags ulong init_val
331pkey_freeint pkey
332statxint dfd const char *path uflagsumask struct statx *buffer
333io_pgeteventsaio_context_t ctx_idlong min_nrlong nrstruct io_event *eventsstruct timespec *timeoutconst struct __aio_sigset *sig
334rseqstruct rseq *rseq uint32_t rseq_lenint flags uint32_t sig
424pidfd_send_signalint pidfd int sigsiginfo_t *infouint flags
425io_uring_setupu32 entriesstruct io_uring_params *p
426io_uring_enteruint fd u32 to_submitu32 min_complete u32 flagsconst void *argp size_t argsz
427io_uring_registeruint fd uint opvoid *arg uint nr_args
428open_treeint dfd const char *path uflags
429move_mountint from_dfd const char *from_pathint to_dfd const char *to_pathuint ms_flags
430fsopenconst char *fs_name uint flags
431fsconfigint fs_fd uint cmd const char *keyconst void *value int aux
432fsmountint fs_fd uint flags uint ms_flags
433fspickint dfd const char *path uint flags
434pidfd_openpid_t pid uint flags
435clone3struct clone_args *uargs size_t size
436close_rangeuint fd uint max_fduint flags
437openat2int dfd const char *filenamestruct open_how *how size_t size
438pidfd_getfdint pidfd int fd uint flags
439faccessat2int dfd const char *filename int modeint flags
440process_madviseint pidfd const struct iovec *vecsize_t vlen int behavior uint flags
441epoll_pwait2int epfd struct epoll_event *eventsint maxeventsconst struct timespec *timeoutconst sigset_t *sigmasksize_t sigsetsize
442mount_setattrint dfd const char *pathuint flagsstruct mount_attr *uattr size_t usize
443quotactl_fduint fd uint cmd qid_t idvoid *addr
444landlock_create_rulesetconst struct landlock_ruleset_attr *attrsize_t size __u32 flags
445landlock_add_ruleint ruleset_fd enum landlock_rule_type rule_typeconst void *rule_attr __u32 flags
446landlock_restrict_selfint ruleset_fd __u32 flags
447memfd_secretuint flags
448process_mreleaseint pidfd uint flags
449futex_waitvstruct futex_waitv *waitersuint nr_futexes uint flagsstruct timespec *timeout clockid_t clockid
450set_mempolicy_home_nodeulong start ulong lenulong home_nodeulong flags