michael105.github.io | Linux syscall table

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 sizet count
1writeuint fd const char *bufsizet count
2openconst char *filenameint flags umodet 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 offt offsetuint whence
9mmapulong addr ulong lenulong prot ulong flagsulong fd ulong pgoff
10mprotectulong start sizet lenulong prot
11munmapulong addr sizet len
12brkulong brk
13rtsigactionintconst struct sigaction *struct sigaction *sizet
14rtsigprocmaskint how sigsett *setsigsett *oset sizet sigsetsize
15rtsigreturn?
16ioctluint fd uint cmdulong arg
17pread64uint fd char *bufsizet count lofft pos
18pwrite64uint fd const char *bufsizet count lofft pos
19readvulong fdconst struct iovec *veculong vlen
20writevulong fdconst struct iovec *veculong vlen
21accessconst char *filename int mode
22pipeint *fildes
23selectint n fdset *inp fdset *outpfdset *exp struct timeval *tvp
24schedyieldvoid
25mremapulong addrulong oldlen ulong newlenulong flags ulong newaddr
26msynculong start sizet len int flags
27mincoreulong start sizet lenuchar * vec
28madviseulong start sizet len int behavior
29shmgetkeyt key sizet size int flag
30shmatint shmid char *shmaddr int shmflg
31shmctlint shmid int cmd struct shmidds *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 outfd int infdofft *offset sizet count
41socketint int int
42connectint struct sockaddr * int
43acceptint struct sockaddr * int *
44sendtoint void * sizet unsignedstruct sockaddr * int
45recvfromint void * sizet unsignedstruct sockaddr * int *
46sendmsgint fd struct usermsghdr *msg uflags
47recvmsgint fd struct usermsghdr *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 errorcode
61wait4pidt pid int *stataddrint options struct rusage *ru
62killpidt pid int sig
63unamestruct oldutsname *
64semgetkeyt key int nsems int semflg
65semopint semid struct sembuf *sopsunsops
66semctlint semid int semnum int cmd ulong arg
67shmdtchar *shmaddr
68msggetkeyt key int msgflg
69msgsndint msqid struct msgbuf *msgpsizet msgsz int msgflg
70msgrcvint msqid struct msgbuf *msgpsizet msgsz long msgtyp int msgflg
71msgctlint msqid int cmd struct msqidds *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 linuxdirent *direntuint count
79getcwdchar *buf ulong size
80chdirconst char *filename
81fchdiruint fd
82renameconst char *oldnameconst char *newname
83mkdirconst char *pathname umodet mode
84rmdirconst char *pathname
85creatconst char *pathname umodet mode
86linkconst char *oldnameconst char *newname
87unlinkconst char *pathname
88symlinkconst char *old const char *new
89readlinkconst char *pathchar *buf int bufsiz
90chmodconst char *filename umodet mode
91fchmoduint fd umodet mode
92chownconst char *filenameuidt user gidt group
93fchownuint fd uidt user gidt group
94lchownconst char *filenameuidt user gidt 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
105setuiduidt uid
106setgidgidt gid
107geteuidvoid
108getegidvoid
109setpgidpidt pid pidt pgid
110getppidvoid
111getpgrpvoid
112setsidvoid
113setreuiduidt ruid uidt euid
114setregidgidt rgid gidt egid
115getgroupsint gidsetsize gidt *grouplist
116setgroupsint gidsetsize gidt *grouplist
117setresuiduidt ruid uidt euid uidt suid
118getresuiduidt *ruid uidt *euid uidt *suid
119setresgidgidt rgid gidt egid gidt sgid
120getresgidgidt *rgid gidt *egid gidt *sgid
121getpgidpidt pid
122setfsuiduidt uid
123setfsgidgidt gid
124getsidpidt pid
125capgetcapuserheadert headercapuserdatat dataptr
126capsetcapuserheadert headerconst capuserdatat data
127rtsigpendingsigsett *set sizet sigsetsize
128rtsigtimedwaitconst sigsett *uthesesiginfot *uinfoconst struct timespec *utssizet sigsetsize
129rtsigqueueinfopidt pid int sig siginfot *uinfo
130rtsigsuspendsigsett *unewset sizet sigsetsize
131sigaltstackconst struct sigaltstack *ussstruct sigaltstack *uoss
132utimechar *filenamestruct utimbuf *times
133mknodconst char *filename umodet 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
142schedsetparampidt pidstruct schedparam *param
143schedgetparampidt pidstruct schedparam *param
144schedsetschedulerpidt pid int policystruct schedparam *param
145schedgetschedulerpidt pid
146schedgetprioritymaxint policy
147schedgetpriorityminint policy
148schedrrgetintervalpidt pidstruct timespec *interval
149mlockulong start sizet len
150munlockulong start sizet len
151mlockallint flags
152munlockallvoid
153vhangupvoid
154modifyldt?
155pivotrootconst char *newrootconst char *putold
156sysctl?
157prctlint option ulong arg2 ulong arg3ulong arg4 ulong arg5
158archprctl?
159adjtimexstruct timex *txcp
160setrlimituint resourcestruct rlimit *rlim
161chrootconst char *filename
162syncvoid
163acctconst char *name
164settimeofdaystruct timeval *tvstruct timezone *tz
165mountchar *devname char *dirnamechar *type ulong flagsvoid *data
166umount2?
167swaponconst char *specialfile int swapflags
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
174createmodule?
175initmodulevoid *umod ulong lenconst char *uargs
176deletemoduleconst char *nameuseruint flags
177getkernelsyms?
178querymodule?
179quotactluint cmd const char *specialqidt id void *addr
180nfsservctl?
181getpmsg?
182putpmsg?
183afssyscall?
184tuxcall?
185security?
186gettidvoid
187readaheadint fd lofft offset sizet count
188setxattrconst char *path const char *nameconst void *value sizet size int flags
189lsetxattrconst char *path const char *nameconst void *value sizet size int flags
190fsetxattrint fd const char *nameconst void *value sizet size int flags
191getxattrconst char *path const char *namevoid *value sizet size
192lgetxattrconst char *path const char *namevoid *value sizet size
193fgetxattrint fd const char *namevoid *value sizet size
194listxattrconst char *path char *listsizet size
195llistxattrconst char *path char *listsizet size
196flistxattrint fd char *list sizet size
197removexattrconst char *pathconst char *name
198lremovexattrconst char *pathconst char *name
199fremovexattrint fd const char *name
200tkillpidt pid int sig
201timetimet *tloc
202futexu32 *uaddr int op u32 valconst struct timespec *utimeu32 *uaddr2 u32 val3
203schedsetaffinitypidt pid uint lenulong *usermaskptr
204schedgetaffinitypidt pid uint lenulong *usermaskptr
205setthreadarea?
206iosetupunrreqs aiocontextt *ctx
207iodestroyaiocontextt ctx
208iogeteventsaiocontextt ctxidlong minnrlong nrstruct ioevent *eventsstruct timespec *timeout
209iosubmitaiocontextt longstruct iocb * *
210iocancelaiocontextt ctxid struct iocb *iocbstruct ioevent *result
211getthreadarea?
212lookupdcookieu64 cookie64 char *buf sizet len
213epollcreateint size
214epollctlold?
215epollwaitold?
216remapfilepagesulong start ulong sizeulong prot ulong pgoffulong flags
217getdents64uint fdstruct linuxdirent64 *direntuint count
218settidaddressint *tidptr
219restartsyscallvoid
220semtimedopint semid struct sembuf *sopsunsopsconst struct timespec *timeout
221fadvise64int fd lofft offset sizet len int advice
222timercreateclockidt whichclockstruct sigevent *timereventspectimert * createdtimerid
223timersettimetimert timerid int flagsconst struct itimerspec *newsettingstruct itimerspec *oldsetting
224timergettimetimert timeridstruct itimerspec *setting
225timergetoverruntimert timerid
226timerdeletetimert timerid
227clocksettimeclockidt whichclockconst struct timespec *tp
228clockgettimeclockidt whichclockstruct timespec *tp
229clockgetresclockidt whichclockstruct timespec *tp
230clocknanosleepclockidt whichclock int flagsconst struct timespec *rqtpstruct timespec *rmtp
231exitgroupint errorcode
232epollwaitint epfd struct epollevent *eventsint maxevents int timeout
233epollctlint epfd int op int fdstruct epollevent *event
234tgkillpidt tgid pidt pid int sig
235utimeschar *filenamestruct timeval *utimes
236vserver?
237mbindulong start ulong lenulong modeconst ulong *nmaskulong maxnodeuflags
238setmempolicyint mode const ulong *nmaskulong maxnode
239getmempolicyint *policyulong *nmaskulong maxnodeulong addr ulong flags
240mqopenconst char *name int oflag umodet mode struct mqattr *attr
241mqunlinkconst char *name
242mqtimedsendmqdt mqdes const char *msgptr sizet msglen uint msgprio const struct timespec *abstimeout
243mqtimedreceivemqdt mqdes char *msgptr sizet msglen uint *msgprio const struct timespec *abstimeout
244mqnotifymqdt mqdes const struct sigevent *notification
245mqgetsetattrmqdt mqdes const struct mqattr *mqstat struct mqattr *omqstat
246kexecloadulong entry ulong nrsegmentsstruct kexecsegment *segmentsulong flags
247waitidint which pidt pidstruct siginfo *infopint options struct rusage *ru
248addkeyconst char *typeconst char *descriptionconst void *payloadsizet plenkeyserialt destringid
249requestkeyconst char *typeconst char *descriptionconst char *calloutinfokeyserialt destringid
250keyctlint cmd ulong arg2 ulong arg3ulong arg4 ulong arg5
251iopriosetint which int who int ioprio
252iopriogetint which int who
253inotifyinitvoid
254inotifyaddwatchint fd const char *pathu32 mask
255inotifyrm_watchint fd _s32 wd
256migratepagespidt pid ulong maxnodeconst ulong *fromconst ulong *to
257openatint dfd const char *filename int flagsumodet mode
258mkdiratint dfd const char * pathname umodet mode
259mknodatint dfd const char * filename umodet modeudev
260fchownatint dfd const char *filename uidt usergidt 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 * filenameumodet mode
269faccessatint dfd const char *filename int mode
270pselect6int fdset * fdset *fdset * struct timespec *void *
271ppollstruct pollfd * uintstruct timespec * const sigsett *sizet
272unshareulong unshareflags
273setrobustliststruct robustlisthead *headsizet len
274getrobustlistint pidstruct robustlisthead * *headptrsizet *lenptr
275spliceint fdin lofft *offinint fdout lofft *offoutsizet len uint flags
276teeint fdin int fdout sizet len uint flags
277syncfilerangeint fd lofft offset lofft nbytesuint flags
278vmspliceint fd const struct iovec *iovulong nrsegs uint flags
279movepagespidt pid ulong nrpagesconst void * *pagesconst int *nodesint *statusint flags
280utimensatint dfd const char *filenamestruct timespec *utimesint flags
281epollpwaitint epfd struct epollevent *eventsint maxevents int timeoutconst sigsett *sigmasksizet sigsetsize
282signalfdint ufd sigsett *usermask sizet sizemask
283timerfdcreateint clockid int flags
284eventfduint count
285fallocateint fd int mode lofft offset lofft len
286timerfdsettimeint ufd int flagsconst struct itimerspec *utmrstruct itimerspec *otmr
287timerfdgettimeint ufd struct itimerspec *otmr
288accept4int struct sockaddr * int * int
289signalfd4int ufd sigsett *usermask sizet sizemask int flags
290eventfd2uint count int flags
291epollcreate1int flags
292dup3uint oldfd uint newfd int flags
293pipe2int *fildes int flags
294inotifyinit1int flags
295preadvulong fd const struct iovec *veculong vlen ulong posl ulong posh
296pwritevulong fd const struct iovec *veculong vlen ulong posl ulong posh
297rttgsigqueueinfopidt tgid pidt pid int sigsiginfot *uinfo
298perfeventopenstruct perfeventattr *attruptrpidt pid int cpu int groupfd ulong flags
299recvmmsgint fd struct mmsghdr *msguint vlen uflagsstruct timespec *timeout
300fanotifyinituint flags uint eventfflags
301fanotifymarkint fanotifyfd uint flagsu64 mask int fdconst char *pathname
302prlimit64pidt pid uint resourceconst struct rlimit64 *newrlimstruct rlimit64 *oldrlim
303nametohandleatint dfd const char *namestruct filehandle *handleint *mntid int flag
304openbyhandleatint mountdirfdstruct filehandle *handleint flags
305clockadjtimeclockidt whichclockstruct timex *tx
306syncfsint fd
307sendmmsgint fd struct mmsghdr *msguint vlen uflags
308setnsint fd int nstype
309getcpuu *cpu u *node struct getcpucache *cache
310processvmreadvpidt pidconst struct iovec *lveculong liovcntconst struct iovec *rveculong riovcntulong flags
311processvmwritevpidt pidconst struct iovec *lveculong liovcntconst struct iovec *rveculong riovcntulong flags
312kcmppidt pid1 pidt pid2 int typeulong idx1 ulong idx2
313finitmoduleint fd const char *uargs int flags
314schedsetattrpidt pidstruct schedattr *attruint flags
315schedgetattrpidt pidstruct schedattr *attruint sizeuint flags
316renameat2int olddfd const char *oldnameint newdfd const char *newnameuint flags
317seccompuint op uint flagsvoid *uargs
318getrandomchar *buf sizet countuint flags
319memfdcreateconst char *unameptr uint flags
320kexecfileloadint kernelfd int initrdfdulong cmdlinelenconst char *cmdlineptrulong flags
321bpfint cmd union bpfattr *attr uint size
322execveatint dfd const char *filenameconst char *const *argvconst char *const *envp int flags
323userfaultfdint flags
324membarrierint cmd uint flags int cpuid
325mlock2ulong start sizet len int flags
326copyfilerangeint fdin lofft *offinint fdout lofft *offoutsizet len uint flags
327preadv2ulong fd const struct iovec *veculong vlen ulong posl ulong poshrwft flags
328pwritev2ulong fd const struct iovec *veculong vlen ulong posl ulong poshrwft flags
329pkeymprotectulong start sizet lenulong prot int pkey
330pkeyalloculong flags ulong initval
331pkeyfreeint pkey
332statxint dfd const char *path uflagsumask struct statx *buffer
333iopgeteventsaiocontextt ctxidlong minnrlong nrstruct io_event *eventsstruct timespec *timeoutconst struct _aiosigset *sig
334rseqstruct rseq *rseq uint32t rseqlenint flags uint32t sig
424pidfdsendsignalint pidfd int sigsiginfot *infouint flags
425iouringsetupu32 entriesstruct iouringparams *p
426iouringenteruint fd u32 tosubmitu32 mincomplete u32 flagsconst void *argp sizet argsz
427iouringregisteruint fd uint opvoid *arg uint nrargs
428opentreeint dfd const char *path uflags
429movemountint fromdfd const char *frompathint todfd const char *topathuint msflags
430fsopenconst char *fsname uint flags
431fsconfigint fsfd uint cmd const char *keyconst void *value int aux
432fsmountint fsfd uint flags uint msflags
433fspickint dfd const char *path uint flags
434pidfdopenpidt pid uint flags
435clone3struct cloneargs *uargs sizet size
436closerangeuint fd uint maxfduint flags
437openat2int dfd const char *filenamestruct openhow *how sizet size
438pidfdgetfdint pidfd int fd uint flags
439faccessat2int dfd const char *filename int modeint flags
440processmadviseint pidfd const struct iovec *vecsizet vlen int behavior uint flags
441epollpwait2int epfd struct epollevent *eventsint maxeventsconst struct timespec *timeoutconst sigsett *sigmasksizet sigsetsize
442mountsetattrint dfd const char *pathuint flagsstruct mountattr *uattr sizet usize
443quotactlfduint fd uint cmd qidt idvoid *addr
444landlockcreaterulesetconst struct landlockrulesetattr *attrsizet size _u32 flags
445landlockaddruleint rulesetfd enum landlockruletype ruletypeconst void *ruleattr _u32 flags
446landlockrestrictselfint rulesetfd _u32 flags
447memfdsecretuint flags
448processmreleaseint pidfd uint flags
449futexwaitvstruct futexwaitv *waitersuint nrfutexes uint flagsstruct timespec *timeout clockidt clockid
450setmempolicyhomenodeulong start ulong lenulong home_nodeulong flags