Skip to main content

Syscall

Enum Syscall 

Source
#[non_exhaustive]
pub enum Syscall {
Show 486 variants Skip, Accept, Accept4, Access, Acct, AddKey, Adjtimex, AfsSyscall, Alarm, ArchPrctl, ArmFadvise64_64, ArmSyncFileRange, Bdflush, Bind, Bpf, Break, Breakpoint, Brk, Cacheflush, Cachestat, Capget, Capset, Chdir, Chmod, Chown, Chown32, Chroot, ClockAdjtime, ClockAdjtime64, ClockGetres, ClockGetresTime64, ClockGettime, ClockGettime64, ClockNanosleep, ClockNanosleepTime64, ClockSettime, ClockSettime64, Clone, Clone3, Close, CloseRange, Connect, CopyFileRange, Creat, CreateModule, DeleteModule, Dup, Dup2, Dup3, EpollCreate, EpollCreate1, EpollCtl, EpollCtlOld, EpollPwait, EpollPwait2, EpollWait, EpollWaitOld, Eventfd, Eventfd2, Execve, Execveat, Exit, ExitGroup, Faccessat, Faccessat2, Fadvise64, Fadvise64_64, Fallocate, FanotifyInit, FanotifyMark, Fchdir, Fchmod, Fchmodat, Fchmodat2, Fchown, Fchown32, Fchownat, Fcntl, Fcntl64, Fdatasync, Fgetxattr, FileGetattr, FileSetattr, FinitModule, Flistxattr, Flock, Fork, Fremovexattr, Fsconfig, Fsetxattr, Fsmount, Fsopen, Fspick, Fstat, Fstat64, Fstatat64, Fstatfs, Fstatfs64, Fsync, Ftime, Ftruncate, Ftruncate64, Futex, FutexRequeue, FutexTime64, FutexWait, FutexWaitv, FutexWake, Futimesat, Getcpu, Getcwd, Getdents, Getdents64, Getegid, Getegid32, Geteuid, Geteuid32, Getgid, Getgid32, Getgroups, Getgroups32, Getitimer, GetKernelSyms, GetMempolicy, Getpeername, Getpgid, Getpgrp, Getpid, Getpmsg, Getppid, Getpriority, Getrandom, Getresgid, Getresgid32, Getresuid, Getresuid32, Getrlimit, GetRobustList, Getrusage, Getsid, Getsockname, Getsockopt, GetThreadArea, Gettid, Gettimeofday, GetTls, Getuid, Getuid32, Getxattr, Getxattrat, Gtty, Idle, InitModule, InotifyAddWatch, InotifyInit, InotifyInit1, InotifyRmWatch, IoCancel, Ioctl, IoDestroy, IoGetevents, Ioperm, IoPgetevents, IoPgeteventsTime64, Iopl, IoprioGet, IoprioSet, IoSetup, IoSubmit, IoUringEnter, IoUringRegister, IoUringSetup, Ipc, Kcmp, KexecFileLoad, KexecLoad, Keyctl, Kill, LandlockAddRule, LandlockCreateRuleset, LandlockRestrictSelf, Lchown, Lchown32, Lgetxattr, Link, Linkat, Listen, Listmount, Listns, Listxattr, Listxattrat, Llistxattr, _Llseek, Lock, LookupDcookie, Lremovexattr, Lseek, Lsetxattr, LsmGetSelfAttr, LsmListModules, LsmSetSelfAttr, Lstat, Lstat64, Madvise, MapShadowStack, Mbind, Membarrier, MemfdCreate, MemfdSecret, MigratePages, Mincore, Mkdir, Mkdirat, Mknod, Mknodat, Mlock, Mlock2, Mlockall, Mmap, Mmap2, ModifyLdt, Mount, MountSetattr, MoveMount, MovePages, Mprotect, Mpx, MqGetsetattr, MqNotify, MqOpen, MqTimedreceive, MqTimedreceiveTime64, MqTimedsend, MqTimedsendTime64, MqUnlink, Mremap, Mseal, Msgctl, Msgget, Msgrcv, Msgsnd, Msync, Munlock, Munlockall, Munmap, NameToHandleAt, Nanosleep, Newfstatat, _Newselect, Nfsservctl, Nice, Oldfstat, Oldlstat, Oldolduname, Oldstat, Olduname, Open, Openat, Openat2, OpenByHandleAt, OpenTree, OpenTreeAttr, Pause, PciconfigIobase, PciconfigRead, PciconfigWrite, PerfEventOpen, Personality, PidfdGetfd, PidfdOpen, PidfdSendSignal, Pipe, Pipe2, PivotRoot, PkeyAlloc, PkeyFree, PkeyMprotect, Poll, Ppoll, PpollTime64, Prctl, Pread64, Preadv, Preadv2, Prlimit64, ProcessMadvise, ProcessMrelease, ProcessVmReadv, ProcessVmWritev, Prof, Profil, Pselect6, Pselect6Time64, Ptrace, Putpmsg, Pwrite64, Pwritev, Pwritev2, QueryModule, Quotactl, QuotactlFd, Read, Readahead, Readdir, Readlink, Readlinkat, Readv, Reboot, Recv, Recvfrom, Recvmmsg, RecvmmsgTime64, Recvmsg, RemapFilePages, Removexattr, Removexattrat, Rename, Renameat, Renameat2, RequestKey, RestartSyscall, Rmdir, Rseq, RseqSliceYield, RtSigaction, RtSigpending, RtSigprocmask, RtSigqueueinfo, RtSigreturn, RtSigsuspend, RtSigtimedwait, RtSigtimedwaitTime64, RtTgsigqueueinfo, SchedGetaffinity, SchedGetattr, SchedGetparam, SchedGetPriorityMax, SchedGetPriorityMin, SchedGetscheduler, SchedRrGetInterval, SchedRrGetIntervalTime64, SchedSetaffinity, SchedSetattr, SchedSetparam, SchedSetscheduler, SchedYield, Seccomp, Security, Select, Semctl, Semget, Semop, Semtimedop, SemtimedopTime64, Send, Sendfile, Sendfile64, Sendmmsg, Sendmsg, Sendto, Setdomainname, Setfsgid, Setfsgid32, Setfsuid, Setfsuid32, Setgid, Setgid32, Setgroups, Setgroups32, Sethostname, Setitimer, SetMempolicy, SetMempolicyHomeNode, Setns, Setpgid, Setpriority, Setregid, Setregid32, Setresgid, Setresgid32, Setresuid, Setresuid32, Setreuid, Setreuid32, Setrlimit, SetRobustList, Setsid, Setsockopt, SetThreadArea, SetTidAddress, Settimeofday, SetTls, Setuid, Setuid32, Setxattr, Setxattrat, Sgetmask, Shmat, Shmctl, Shmdt, Shmget, Shutdown, Sigaction, Sigaltstack, Signal, Signalfd, Signalfd4, Sigpending, Sigprocmask, Sigreturn, Sigsuspend, Socket, Socketcall, Socketpair, Splice, Ssetmask, Stat, Stat64, Statfs, Statfs64, Statmount, Statx, Stime, Stty, Swapoff, Swapon, Symlink, Symlinkat, Sync, SyncFileRange, Syncfs, _Sysctl, Sysfs, Sysinfo, Syslog, Tee, Tgkill, Time, TimerCreate, TimerDelete, TimerfdCreate, TimerfdGettime, TimerfdGettime64, TimerfdSettime, TimerfdSettime64, TimerGetoverrun, TimerGettime, TimerGettime64, TimerSettime, TimerSettime64, Times, Tkill, Truncate, Truncate64, Tuxcall, Ugetrlimit, Ulimit, Umask, Umount, Umount2, Uname, Unlink, Unlinkat, Unshare, Uprobe, Uretprobe, Uselib, Userfaultfd, Usr26, Usr32, Ustat, Utime, Utimensat, UtimensatTime64, Utimes, Vfork, Vhangup, Vm86, Vm86old, Vmsplice, Vserver, Wait4, Waitid, Waitpid, Write, Writev,
}
Expand description

All syscall identifiers from Linux v7.0.

Syscall numbers: x86, x86_64, ARM (and ARM-specific), AArch64 (with ABI selection).

Argument types: each entry point’s C definition (SYSCALL_DEFINEx), with 64-bit arguments unsplit (x86’s ia32_* wrappers and SC_ARG64).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Skip

§

Accept

§

Accept4

§

Access

§

Acct

§

AddKey

§

Adjtimex

§

AfsSyscall

§

Alarm

§

ArchPrctl

§

ArmFadvise64_64

§

ArmSyncFileRange

§

Bdflush

§

Bind

§

Bpf

§

Break

§

Breakpoint

§

Brk

§

Cacheflush

§

Cachestat

§

Capget

§

Capset

§

Chdir

§

Chmod

§

Chown

§

Chown32

§

Chroot

§

ClockAdjtime

§

ClockAdjtime64

§

ClockGetres

§

ClockGetresTime64

§

ClockGettime

§

ClockGettime64

§

ClockNanosleep

§

ClockNanosleepTime64

§

ClockSettime

§

ClockSettime64

§

Clone

§

Clone3

§

Close

§

CloseRange

§

Connect

§

CopyFileRange

§

Creat

§

CreateModule

§

DeleteModule

§

Dup

§

Dup2

§

Dup3

§

EpollCreate

§

EpollCreate1

§

EpollCtl

§

EpollCtlOld

§

EpollPwait

§

EpollPwait2

§

EpollWait

§

EpollWaitOld

§

Eventfd

§

Eventfd2

§

Execve

§

Execveat

§

Exit

§

ExitGroup

§

Faccessat

§

Faccessat2

§

Fadvise64

§

Fadvise64_64

§

Fallocate

§

FanotifyInit

§

FanotifyMark

§

Fchdir

§

Fchmod

§

Fchmodat

§

Fchmodat2

§

Fchown

§

Fchown32

§

Fchownat

§

Fcntl

§

Fcntl64

§

Fdatasync

§

Fgetxattr

§

FileGetattr

§

FileSetattr

§

FinitModule

§

Flistxattr

§

Flock

§

Fork

§

Fremovexattr

§

Fsconfig

§

Fsetxattr

§

Fsmount

§

Fsopen

§

Fspick

§

Fstat

§

Fstat64

§

Fstatat64

§

Fstatfs

§

Fstatfs64

§

Fsync

§

Ftime

§

Ftruncate

§

Ftruncate64

§

Futex

§

FutexRequeue

§

FutexTime64

§

FutexWait

§

FutexWaitv

§

FutexWake

§

Futimesat

§

Getcpu

§

Getcwd

§

Getdents

§

Getdents64

§

Getegid

§

Getegid32

§

Geteuid

§

Geteuid32

§

Getgid

§

Getgid32

§

Getgroups

§

Getgroups32

§

Getitimer

§

GetKernelSyms

§

GetMempolicy

§

Getpeername

§

Getpgid

§

Getpgrp

§

Getpid

§

Getpmsg

§

Getppid

§

Getpriority

§

Getrandom

§

Getresgid

§

Getresgid32

§

Getresuid

§

Getresuid32

§

Getrlimit

§

GetRobustList

§

Getrusage

§

Getsid

§

Getsockname

§

Getsockopt

§

GetThreadArea

§

Gettid

§

Gettimeofday

§

GetTls

§

Getuid

§

Getuid32

§

Getxattr

§

Getxattrat

§

Gtty

§

Idle

§

InitModule

§

InotifyAddWatch

§

InotifyInit

§

InotifyInit1

§

InotifyRmWatch

§

IoCancel

§

Ioctl

§

IoDestroy

§

IoGetevents

§

Ioperm

§

IoPgetevents

§

IoPgeteventsTime64

§

Iopl

§

IoprioGet

§

IoprioSet

§

IoSetup

§

IoSubmit

§

IoUringEnter

§

IoUringRegister

§

IoUringSetup

§

Ipc

§

Kcmp

§

KexecFileLoad

§

KexecLoad

§

Keyctl

§

Kill

§

LandlockAddRule

§

LandlockCreateRuleset

§

LandlockRestrictSelf

§

Lchown

§

Lchown32

§

Lgetxattr

§

Linkat

§

Listen

§

Listmount

§

Listns

§

Listxattr

§

Listxattrat

§

Llistxattr

§

_Llseek

§

Lock

§

LookupDcookie

§

Lremovexattr

§

Lseek

§

Lsetxattr

§

LsmGetSelfAttr

§

LsmListModules

§

LsmSetSelfAttr

§

Lstat

§

Lstat64

§

Madvise

§

MapShadowStack

§

Mbind

§

Membarrier

§

MemfdCreate

§

MemfdSecret

§

MigratePages

§

Mincore

§

Mkdir

§

Mkdirat

§

Mknod

§

Mknodat

§

Mlock

§

Mlock2

§

Mlockall

§

Mmap

§

Mmap2

§

ModifyLdt

§

Mount

§

MountSetattr

§

MoveMount

§

MovePages

§

Mprotect

§

Mpx

§

MqGetsetattr

§

MqNotify

§

MqOpen

§

MqTimedreceive

§

MqTimedreceiveTime64

§

MqTimedsend

§

MqTimedsendTime64

§

Mremap

§

Mseal

§

Msgctl

§

Msgget

§

Msgrcv

§

Msgsnd

§

Msync

§

Munlock

§

Munlockall

§

Munmap

§

NameToHandleAt

§

Nanosleep

§

Newfstatat

§

_Newselect

§

Nfsservctl

§

Nice

§

Oldfstat

§

Oldlstat

§

Oldolduname

§

Oldstat

§

Olduname

§

Open

§

Openat

§

Openat2

§

OpenByHandleAt

§

OpenTree

§

OpenTreeAttr

§

Pause

§

PciconfigIobase

§

PciconfigRead

§

PciconfigWrite

§

PerfEventOpen

§

Personality

§

PidfdGetfd

§

PidfdOpen

§

PidfdSendSignal

§

Pipe

§

Pipe2

§

PivotRoot

§

PkeyAlloc

§

PkeyFree

§

PkeyMprotect

§

Poll

§

Ppoll

§

PpollTime64

§

Prctl

§

Pread64

§

Preadv

§

Preadv2

§

Prlimit64

§

ProcessMadvise

§

ProcessMrelease

§

ProcessVmReadv

§

ProcessVmWritev

§

Prof

§

Profil

§

Pselect6

§

Pselect6Time64

§

Ptrace

§

Putpmsg

§

Pwrite64

§

Pwritev

§

Pwritev2

§

QueryModule

§

Quotactl

§

QuotactlFd

§

Read

§

Readahead

§

Readdir

§

Readlinkat

§

Readv

§

Reboot

§

Recv

§

Recvfrom

§

Recvmmsg

§

RecvmmsgTime64

§

Recvmsg

§

RemapFilePages

§

Removexattr

§

Removexattrat

§

Rename

§

Renameat

§

Renameat2

§

RequestKey

§

RestartSyscall

§

Rmdir

§

Rseq

§

RseqSliceYield

§

RtSigaction

§

RtSigpending

§

RtSigprocmask

§

RtSigqueueinfo

§

RtSigreturn

§

RtSigsuspend

§

RtSigtimedwait

§

RtSigtimedwaitTime64

§

RtTgsigqueueinfo

§

SchedGetaffinity

§

SchedGetattr

§

SchedGetparam

§

SchedGetPriorityMax

§

SchedGetPriorityMin

§

SchedGetscheduler

§

SchedRrGetInterval

§

SchedRrGetIntervalTime64

§

SchedSetaffinity

§

SchedSetattr

§

SchedSetparam

§

SchedSetscheduler

§

SchedYield

§

Seccomp

§

Security

§

Select

§

Semctl

§

Semget

§

Semop

§

Semtimedop

§

SemtimedopTime64

§

Send

§

Sendfile

§

Sendfile64

§

Sendmmsg

§

Sendmsg

§

Sendto

§

Setdomainname

§

Setfsgid

§

Setfsgid32

§

Setfsuid

§

Setfsuid32

§

Setgid

§

Setgid32

§

Setgroups

§

Setgroups32

§

Sethostname

§

Setitimer

§

SetMempolicy

§

SetMempolicyHomeNode

§

Setns

§

Setpgid

§

Setpriority

§

Setregid

§

Setregid32

§

Setresgid

§

Setresgid32

§

Setresuid

§

Setresuid32

§

Setreuid

§

Setreuid32

§

Setrlimit

§

SetRobustList

§

Setsid

§

Setsockopt

§

SetThreadArea

§

SetTidAddress

§

Settimeofday

§

SetTls

§

Setuid

§

Setuid32

§

Setxattr

§

Setxattrat

§

Sgetmask

§

Shmat

§

Shmctl

§

Shmdt

§

Shmget

§

Shutdown

§

Sigaction

§

Sigaltstack

§

Signal

§

Signalfd

§

Signalfd4

§

Sigpending

§

Sigprocmask

§

Sigreturn

§

Sigsuspend

§

Socket

§

Socketcall

§

Socketpair

§

Splice

§

Ssetmask

§

Stat

§

Stat64

§

Statfs

§

Statfs64

§

Statmount

§

Statx

§

Stime

§

Stty

§

Swapoff

§

Swapon

§

Symlinkat

§

Sync

§

SyncFileRange

§

Syncfs

§

_Sysctl

§

Sysfs

§

Sysinfo

§

Syslog

§

Tee

§

Tgkill

§

Time

§

TimerCreate

§

TimerDelete

§

TimerfdCreate

§

TimerfdGettime

§

TimerfdGettime64

§

TimerfdSettime

§

TimerfdSettime64

§

TimerGetoverrun

§

TimerGettime

§

TimerGettime64

§

TimerSettime

§

TimerSettime64

§

Times

§

Tkill

§

Truncate

§

Truncate64

§

Tuxcall

§

Ugetrlimit

§

Ulimit

§

Umask

§

Umount

§

Umount2

§

Uname

§

Unlinkat

§

Unshare

§

Uprobe

§

Uretprobe

§

Uselib

§

Userfaultfd

§

Usr26

§

Usr32

§

Ustat

§

Utime

§

Utimensat

§

UtimensatTime64

§

Utimes

§

Vfork

§

Vhangup

§

Vm86

§

Vm86old

§

Vmsplice

§

Vserver

§

Wait4

§

Waitid

§

Waitpid

§

Write

§

Writev

Implementations§

Source§

impl Syscall

Source

pub fn nr(&self, arch: Arch) -> Option<i32>

Executable version of Self::spec_nr.

Source

pub fn signature(&self, arch: Arch) -> &'static [PrimType]

Executable version of Self::spec_signature.

Source§

impl Syscall

Source

pub const fn lookup(name: &str) -> Option<Syscall>

Finds the syscall with the given name, like "exit_group".

Trait Implementations§

Source§

impl Clone for Syscall

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Syscall

Source§

impl Debug for Syscall

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Syscall

Source§

impl PartialEq for Syscall

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Syscall

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.