linux

package
v0.0.0-...-ff2c174 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2021 License: Apache-2.0, MIT Imports: 55 Imported by: 0

Documentation

Overview

Package linux provides syscall tables for amd64 Linux.

Index

Constants

View Source
const (
	// LinuxSysname is the OS name advertised by gVisor.
	LinuxSysname = "Linux"

	// LinuxRelease is the Linux release version number advertised by gVisor.
	LinuxRelease = "4.4.0"

	// LinuxVersion is the version info advertised by gVisor.
	LinuxVersion = "#1 SMP Sun Jan 10 15:06:54 PST 2016"
)
View Source
const (
	// EventMaskRead contains events that can be triggered on reads.
	EventMaskRead = waiter.ReadableEvents | waiter.EventHUp | waiter.EventErr
)
View Source
const (
	// EventMaskWrite contains events that can be triggered on writes.
	//
	// Note that EventHUp is not going to happen for pipes but may for
	// implementations of poll on some sockets, see net/core/datagram.c.
	EventMaskWrite = waiter.EventOut | waiter.EventHUp | waiter.EventErr
)

Variables

View Source
var (
	// ExecMaxTotalSize is the maximum length of all argv and envv entries.
	//
	// N.B. The behavior here is different than Linux. Linux provides a limit on
	// individual arguments of 32 pages, and an aggregate limit of at least 32 pages
	// but otherwise bounded by min(stack size / 4, 8 MB * 3 / 4). We don't implement
	// any behavior based on the stack size, and instead provide a fixed hard-limit of
	// 2 MB (which should work well given that 8 MB stack limits are common).
	ExecMaxTotalSize = 2 * 1024 * 1024

	// ExecMaxElemSize is the maximum length of a single argv or envv entry.
	ExecMaxElemSize = 32 * hostarch.PageSize
)
View Source
var AMD64 = &kernel.SyscallTable{
	OS:   abi.Linux,
	Arch: arch.AMD64,
	Version: kernel.Version{

		Sysname: LinuxSysname,
		Release: LinuxRelease,
		Version: LinuxVersion,
	},
	AuditNumber: linux.AUDIT_ARCH_X86_64,
	Table: map[uintptr]kernel.Syscall{
		0:   syscalls.Supported("read", Read),
		1:   syscalls.Supported("write", Write),
		2:   syscalls.PartiallySupported("open", Open, "Options O_DIRECT, O_NOATIME, O_PATH, O_TMPFILE, O_SYNC are not supported.", nil),
		3:   syscalls.Supported("close", Close),
		4:   syscalls.Supported("stat", Stat),
		5:   syscalls.Supported("fstat", Fstat),
		6:   syscalls.Supported("lstat", Lstat),
		7:   syscalls.Supported("poll", Poll),
		8:   syscalls.Supported("lseek", Lseek),
		9:   syscalls.PartiallySupported("mmap", Mmap, "Generally supported with exceptions. Options MAP_FIXED_NOREPLACE, MAP_SHARED_VALIDATE, MAP_SYNC MAP_GROWSDOWN, MAP_HUGETLB are not supported.", nil),
		10:  syscalls.Supported("mprotect", Mprotect),
		11:  syscalls.Supported("munmap", Munmap),
		12:  syscalls.Supported("brk", Brk),
		13:  syscalls.Supported("rt_sigaction", RtSigaction),
		14:  syscalls.Supported("rt_sigprocmask", RtSigprocmask),
		15:  syscalls.Supported("rt_sigreturn", RtSigreturn),
		16:  syscalls.PartiallySupported("ioctl", Ioctl, "Only a few ioctls are implemented for backing devices and file systems.", nil),
		17:  syscalls.Supported("pread64", Pread64),
		18:  syscalls.Supported("pwrite64", Pwrite64),
		19:  syscalls.Supported("readv", Readv),
		20:  syscalls.Supported("writev", Writev),
		21:  syscalls.Supported("access", Access),
		22:  syscalls.Supported("pipe", Pipe),
		23:  syscalls.Supported("select", Select),
		24:  syscalls.Supported("sched_yield", SchedYield),
		25:  syscalls.Supported("mremap", Mremap),
		26:  syscalls.PartiallySupported("msync", Msync, "Full data flush is not guaranteed at this time.", nil),
		27:  syscalls.PartiallySupported("mincore", Mincore, "Stub implementation. The sandbox does not have access to this information. Reports all mapped pages are resident.", nil),
		28:  syscalls.PartiallySupported("madvise", Madvise, "Options MADV_DONTNEED, MADV_DONTFORK are supported. Other advice is ignored.", nil),
		29:  syscalls.PartiallySupported("shmget", Shmget, "Option SHM_HUGETLB is not supported.", nil),
		30:  syscalls.PartiallySupported("shmat", Shmat, "Option SHM_RND is not supported.", nil),
		31:  syscalls.PartiallySupported("shmctl", Shmctl, "Options SHM_LOCK, SHM_UNLOCK are not supported.", nil),
		32:  syscalls.Supported("dup", Dup),
		33:  syscalls.Supported("dup2", Dup2),
		34:  syscalls.Supported("pause", Pause),
		35:  syscalls.Supported("nanosleep", Nanosleep),
		36:  syscalls.Supported("getitimer", Getitimer),
		37:  syscalls.Supported("alarm", Alarm),
		38:  syscalls.Supported("setitimer", Setitimer),
		39:  syscalls.Supported("getpid", Getpid),
		40:  syscalls.Supported("sendfile", Sendfile),
		41:  syscalls.PartiallySupported("socket", Socket, "Limited support for AF_NETLINK, NETLINK_ROUTE sockets. Limited support for SOCK_RAW.", nil),
		42:  syscalls.Supported("connect", Connect),
		43:  syscalls.Supported("accept", Accept),
		44:  syscalls.Supported("sendto", SendTo),
		45:  syscalls.Supported("recvfrom", RecvFrom),
		46:  syscalls.Supported("sendmsg", SendMsg),
		47:  syscalls.PartiallySupported("recvmsg", RecvMsg, "Not all flags and control messages are supported.", nil),
		48:  syscalls.PartiallySupported("shutdown", Shutdown, "Not all flags and control messages are supported.", nil),
		49:  syscalls.PartiallySupported("bind", Bind, "Autobind for abstract Unix sockets is not supported.", nil),
		50:  syscalls.Supported("listen", Listen),
		51:  syscalls.Supported("getsockname", GetSockName),
		52:  syscalls.Supported("getpeername", GetPeerName),
		53:  syscalls.Supported("socketpair", SocketPair),
		54:  syscalls.PartiallySupported("setsockopt", SetSockOpt, "Not all socket options are supported.", nil),
		55:  syscalls.PartiallySupported("getsockopt", GetSockOpt, "Not all socket options are supported.", nil),
		56:  syscalls.PartiallySupported("clone", Clone, "Mount namespace (CLONE_NEWNS) not supported. Options CLONE_PARENT, CLONE_SYSVSEM not supported.", nil),
		57:  syscalls.Supported("fork", Fork),
		58:  syscalls.Supported("vfork", Vfork),
		59:  syscalls.Supported("execve", Execve),
		60:  syscalls.Supported("exit", Exit),
		61:  syscalls.Supported("wait4", Wait4),
		62:  syscalls.Supported("kill", Kill),
		63:  syscalls.Supported("uname", Uname),
		64:  syscalls.Supported("semget", Semget),
		65:  syscalls.PartiallySupported("semop", Semop, "Option SEM_UNDO not supported.", nil),
		66:  syscalls.Supported("semctl", Semctl),
		67:  syscalls.Supported("shmdt", Shmdt),
		68:  syscalls.ErrorWithEvent("msgget", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		69:  syscalls.ErrorWithEvent("msgsnd", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		70:  syscalls.ErrorWithEvent("msgrcv", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		71:  syscalls.ErrorWithEvent("msgctl", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		72:  syscalls.PartiallySupported("fcntl", Fcntl, "Not all options are supported.", nil),
		73:  syscalls.PartiallySupported("flock", Flock, "Locks are held within the sandbox only.", nil),
		74:  syscalls.PartiallySupported("fsync", Fsync, "Full data flush is not guaranteed at this time.", nil),
		75:  syscalls.PartiallySupported("fdatasync", Fdatasync, "Full data flush is not guaranteed at this time.", nil),
		76:  syscalls.Supported("truncate", Truncate),
		77:  syscalls.Supported("ftruncate", Ftruncate),
		78:  syscalls.Supported("getdents", Getdents),
		79:  syscalls.Supported("getcwd", Getcwd),
		80:  syscalls.Supported("chdir", Chdir),
		81:  syscalls.Supported("fchdir", Fchdir),
		82:  syscalls.Supported("rename", Rename),
		83:  syscalls.Supported("mkdir", Mkdir),
		84:  syscalls.Supported("rmdir", Rmdir),
		85:  syscalls.Supported("creat", Creat),
		86:  syscalls.PartiallySupported("link", Link, "Limited support with Gofer. Link count and linked files may get out of sync because gVisor is not aware of external hardlinks.", nil),
		87:  syscalls.Supported("unlink", Unlink),
		88:  syscalls.Supported("symlink", Symlink),
		89:  syscalls.Supported("readlink", Readlink),
		90:  syscalls.Supported("chmod", Chmod),
		91:  syscalls.PartiallySupported("fchmod", Fchmod, "Options S_ISUID and S_ISGID not supported.", nil),
		92:  syscalls.Supported("chown", Chown),
		93:  syscalls.Supported("fchown", Fchown),
		94:  syscalls.Supported("lchown", Lchown),
		95:  syscalls.Supported("umask", Umask),
		96:  syscalls.Supported("gettimeofday", Gettimeofday),
		97:  syscalls.Supported("getrlimit", Getrlimit),
		98:  syscalls.PartiallySupported("getrusage", Getrusage, "Fields ru_maxrss, ru_minflt, ru_majflt, ru_inblock, ru_oublock are not supported. Fields ru_utime and ru_stime have low precision.", nil),
		99:  syscalls.PartiallySupported("sysinfo", Sysinfo, "Fields loads, sharedram, bufferram, totalswap, freeswap, totalhigh, freehigh not supported.", nil),
		100: syscalls.Supported("times", Times),
		101: syscalls.PartiallySupported("ptrace", Ptrace, "Options PTRACE_PEEKSIGINFO, PTRACE_SECCOMP_GET_FILTER not supported.", nil),
		102: syscalls.Supported("getuid", Getuid),
		103: syscalls.PartiallySupported("syslog", Syslog, "Outputs a dummy message for security reasons.", nil),
		104: syscalls.Supported("getgid", Getgid),
		105: syscalls.Supported("setuid", Setuid),
		106: syscalls.Supported("setgid", Setgid),
		107: syscalls.Supported("geteuid", Geteuid),
		108: syscalls.Supported("getegid", Getegid),
		109: syscalls.Supported("setpgid", Setpgid),
		110: syscalls.Supported("getppid", Getppid),
		111: syscalls.Supported("getpgrp", Getpgrp),
		112: syscalls.Supported("setsid", Setsid),
		113: syscalls.Supported("setreuid", Setreuid),
		114: syscalls.Supported("setregid", Setregid),
		115: syscalls.Supported("getgroups", Getgroups),
		116: syscalls.Supported("setgroups", Setgroups),
		117: syscalls.Supported("setresuid", Setresuid),
		118: syscalls.Supported("getresuid", Getresuid),
		119: syscalls.Supported("setresgid", Setresgid),
		120: syscalls.Supported("getresgid", Getresgid),
		121: syscalls.Supported("getpgid", Getpgid),
		122: syscalls.ErrorWithEvent("setfsuid", syserror.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		123: syscalls.ErrorWithEvent("setfsgid", syserror.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		124: syscalls.Supported("getsid", Getsid),
		125: syscalls.Supported("capget", Capget),
		126: syscalls.Supported("capset", Capset),
		127: syscalls.Supported("rt_sigpending", RtSigpending),
		128: syscalls.Supported("rt_sigtimedwait", RtSigtimedwait),
		129: syscalls.Supported("rt_sigqueueinfo", RtSigqueueinfo),
		130: syscalls.Supported("rt_sigsuspend", RtSigsuspend),
		131: syscalls.Supported("sigaltstack", Sigaltstack),
		132: syscalls.Supported("utime", Utime),
		133: syscalls.PartiallySupported("mknod", Mknod, "Device creation is not generally supported. Only regular file and FIFO creation are supported.", nil),
		134: syscalls.Error("uselib", syserror.ENOSYS, "Obsolete", nil),
		135: syscalls.ErrorWithEvent("personality", syserror.EINVAL, "Unable to change personality.", nil),
		136: syscalls.ErrorWithEvent("ustat", syserror.ENOSYS, "Needs filesystem support.", nil),
		137: syscalls.PartiallySupported("statfs", Statfs, "Depends on the backing file system implementation.", nil),
		138: syscalls.PartiallySupported("fstatfs", Fstatfs, "Depends on the backing file system implementation.", nil),
		139: syscalls.ErrorWithEvent("sysfs", syserror.ENOSYS, "", []string{"gvisor.dev/issue/165"}),
		140: syscalls.PartiallySupported("getpriority", Getpriority, "Stub implementation.", nil),
		141: syscalls.PartiallySupported("setpriority", Setpriority, "Stub implementation.", nil),
		142: syscalls.CapError("sched_setparam", linux.CAP_SYS_NICE, "", nil),
		143: syscalls.PartiallySupported("sched_getparam", SchedGetparam, "Stub implementation.", nil),
		144: syscalls.PartiallySupported("sched_setscheduler", SchedSetscheduler, "Stub implementation.", nil),
		145: syscalls.PartiallySupported("sched_getscheduler", SchedGetscheduler, "Stub implementation.", nil),
		146: syscalls.PartiallySupported("sched_get_priority_max", SchedGetPriorityMax, "Stub implementation.", nil),
		147: syscalls.PartiallySupported("sched_get_priority_min", SchedGetPriorityMin, "Stub implementation.", nil),
		148: syscalls.ErrorWithEvent("sched_rr_get_interval", syserror.EPERM, "", nil),
		149: syscalls.PartiallySupported("mlock", Mlock, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		150: syscalls.PartiallySupported("munlock", Munlock, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		151: syscalls.PartiallySupported("mlockall", Mlockall, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		152: syscalls.PartiallySupported("munlockall", Munlockall, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		153: syscalls.CapError("vhangup", linux.CAP_SYS_TTY_CONFIG, "", nil),
		154: syscalls.Error("modify_ldt", syserror.EPERM, "", nil),
		155: syscalls.Error("pivot_root", syserror.EPERM, "", nil),
		156: syscalls.Error("sysctl", syserror.EPERM, "Deprecated. Use /proc/sys instead.", nil),
		157: syscalls.PartiallySupported("prctl", Prctl, "Not all options are supported.", nil),
		158: syscalls.PartiallySupported("arch_prctl", ArchPrctl, "Options ARCH_GET_GS, ARCH_SET_GS not supported.", nil),
		159: syscalls.CapError("adjtimex", linux.CAP_SYS_TIME, "", nil),
		160: syscalls.PartiallySupported("setrlimit", Setrlimit, "Not all rlimits are enforced.", nil),
		161: syscalls.Supported("chroot", Chroot),
		162: syscalls.PartiallySupported("sync", Sync, "Full data flush is not guaranteed at this time.", nil),
		163: syscalls.CapError("acct", linux.CAP_SYS_PACCT, "", nil),
		164: syscalls.CapError("settimeofday", linux.CAP_SYS_TIME, "", nil),
		165: syscalls.PartiallySupported("mount", Mount, "Not all options or file systems are supported.", nil),
		166: syscalls.PartiallySupported("umount2", Umount2, "Not all options or file systems are supported.", nil),
		167: syscalls.CapError("swapon", linux.CAP_SYS_ADMIN, "", nil),
		168: syscalls.CapError("swapoff", linux.CAP_SYS_ADMIN, "", nil),
		169: syscalls.CapError("reboot", linux.CAP_SYS_BOOT, "", nil),
		170: syscalls.Supported("sethostname", Sethostname),
		171: syscalls.Supported("setdomainname", Setdomainname),
		172: syscalls.CapError("iopl", linux.CAP_SYS_RAWIO, "", nil),
		173: syscalls.CapError("ioperm", linux.CAP_SYS_RAWIO, "", nil),
		174: syscalls.CapError("create_module", linux.CAP_SYS_MODULE, "", nil),
		175: syscalls.CapError("init_module", linux.CAP_SYS_MODULE, "", nil),
		176: syscalls.CapError("delete_module", linux.CAP_SYS_MODULE, "", nil),
		177: syscalls.Error("get_kernel_syms", syserror.ENOSYS, "Not supported in Linux > 2.6.", nil),
		178: syscalls.Error("query_module", syserror.ENOSYS, "Not supported in Linux > 2.6.", nil),
		179: syscalls.CapError("quotactl", linux.CAP_SYS_ADMIN, "", nil),
		180: syscalls.Error("nfsservctl", syserror.ENOSYS, "Removed after Linux 3.1.", nil),
		181: syscalls.Error("getpmsg", syserror.ENOSYS, "Not implemented in Linux.", nil),
		182: syscalls.Error("putpmsg", syserror.ENOSYS, "Not implemented in Linux.", nil),
		183: syscalls.Error("afs_syscall", syserror.ENOSYS, "Not implemented in Linux.", nil),
		184: syscalls.Error("tuxcall", syserror.ENOSYS, "Not implemented in Linux.", nil),
		185: syscalls.Error("security", syserror.ENOSYS, "Not implemented in Linux.", nil),
		186: syscalls.Supported("gettid", Gettid),
		187: syscalls.Supported("readahead", Readahead),
		188: syscalls.PartiallySupported("setxattr", SetXattr, "Only supported for tmpfs.", nil),
		189: syscalls.PartiallySupported("lsetxattr", LSetXattr, "Only supported for tmpfs.", nil),
		190: syscalls.PartiallySupported("fsetxattr", FSetXattr, "Only supported for tmpfs.", nil),
		191: syscalls.PartiallySupported("getxattr", GetXattr, "Only supported for tmpfs.", nil),
		192: syscalls.PartiallySupported("lgetxattr", LGetXattr, "Only supported for tmpfs.", nil),
		193: syscalls.PartiallySupported("fgetxattr", FGetXattr, "Only supported for tmpfs.", nil),
		194: syscalls.PartiallySupported("listxattr", ListXattr, "Only supported for tmpfs", nil),
		195: syscalls.PartiallySupported("llistxattr", LListXattr, "Only supported for tmpfs", nil),
		196: syscalls.PartiallySupported("flistxattr", FListXattr, "Only supported for tmpfs", nil),
		197: syscalls.PartiallySupported("removexattr", RemoveXattr, "Only supported for tmpfs", nil),
		198: syscalls.PartiallySupported("lremovexattr", LRemoveXattr, "Only supported for tmpfs", nil),
		199: syscalls.PartiallySupported("fremovexattr", FRemoveXattr, "Only supported for tmpfs", nil),
		200: syscalls.Supported("tkill", Tkill),
		201: syscalls.Supported("time", Time),
		202: syscalls.PartiallySupported("futex", Futex, "Robust futexes not supported.", nil),
		203: syscalls.PartiallySupported("sched_setaffinity", SchedSetaffinity, "Stub implementation.", nil),
		204: syscalls.PartiallySupported("sched_getaffinity", SchedGetaffinity, "Stub implementation.", nil),
		205: syscalls.Error("set_thread_area", syserror.ENOSYS, "Expected to return ENOSYS on 64-bit", nil),
		206: syscalls.PartiallySupported("io_setup", IoSetup, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		207: syscalls.PartiallySupported("io_destroy", IoDestroy, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		208: syscalls.PartiallySupported("io_getevents", IoGetevents, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		209: syscalls.PartiallySupported("io_submit", IoSubmit, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		210: syscalls.PartiallySupported("io_cancel", IoCancel, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		211: syscalls.Error("get_thread_area", syserror.ENOSYS, "Expected to return ENOSYS on 64-bit", nil),
		212: syscalls.CapError("lookup_dcookie", linux.CAP_SYS_ADMIN, "", nil),
		213: syscalls.Supported("epoll_create", EpollCreate),
		214: syscalls.ErrorWithEvent("epoll_ctl_old", syserror.ENOSYS, "Deprecated.", nil),
		215: syscalls.ErrorWithEvent("epoll_wait_old", syserror.ENOSYS, "Deprecated.", nil),
		216: syscalls.ErrorWithEvent("remap_file_pages", syserror.ENOSYS, "Deprecated since Linux 3.16.", nil),
		217: syscalls.Supported("getdents64", Getdents64),
		218: syscalls.Supported("set_tid_address", SetTidAddress),
		219: syscalls.Supported("restart_syscall", RestartSyscall),
		220: syscalls.Supported("semtimedop", Semtimedop),
		221: syscalls.PartiallySupported("fadvise64", Fadvise64, "Not all options are supported.", nil),
		222: syscalls.Supported("timer_create", TimerCreate),
		223: syscalls.Supported("timer_settime", TimerSettime),
		224: syscalls.Supported("timer_gettime", TimerGettime),
		225: syscalls.Supported("timer_getoverrun", TimerGetoverrun),
		226: syscalls.Supported("timer_delete", TimerDelete),
		227: syscalls.Supported("clock_settime", ClockSettime),
		228: syscalls.Supported("clock_gettime", ClockGettime),
		229: syscalls.Supported("clock_getres", ClockGetres),
		230: syscalls.Supported("clock_nanosleep", ClockNanosleep),
		231: syscalls.Supported("exit_group", ExitGroup),
		232: syscalls.Supported("epoll_wait", EpollWait),
		233: syscalls.Supported("epoll_ctl", EpollCtl),
		234: syscalls.Supported("tgkill", Tgkill),
		235: syscalls.Supported("utimes", Utimes),
		236: syscalls.Error("vserver", syserror.ENOSYS, "Not implemented by Linux", nil),
		237: syscalls.PartiallySupported("mbind", Mbind, "Stub implementation. Only a single NUMA node is advertised, and mempolicy is ignored accordingly, but mbind() will succeed and has effects reflected by get_mempolicy.", []string{"gvisor.dev/issue/262"}),
		238: syscalls.PartiallySupported("set_mempolicy", SetMempolicy, "Stub implementation.", nil),
		239: syscalls.PartiallySupported("get_mempolicy", GetMempolicy, "Stub implementation.", nil),
		240: syscalls.ErrorWithEvent("mq_open", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		241: syscalls.ErrorWithEvent("mq_unlink", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		242: syscalls.ErrorWithEvent("mq_timedsend", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		243: syscalls.ErrorWithEvent("mq_timedreceive", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		244: syscalls.ErrorWithEvent("mq_notify", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		245: syscalls.ErrorWithEvent("mq_getsetattr", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		246: syscalls.CapError("kexec_load", linux.CAP_SYS_BOOT, "", nil),
		247: syscalls.Supported("waitid", Waitid),
		248: syscalls.Error("add_key", syserror.EACCES, "Not available to user.", nil),
		249: syscalls.Error("request_key", syserror.EACCES, "Not available to user.", nil),
		250: syscalls.Error("keyctl", syserror.EACCES, "Not available to user.", nil),
		251: syscalls.CapError("ioprio_set", linux.CAP_SYS_ADMIN, "", nil),
		252: syscalls.CapError("ioprio_get", linux.CAP_SYS_ADMIN, "", nil),
		253: syscalls.PartiallySupported("inotify_init", InotifyInit, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		254: syscalls.PartiallySupported("inotify_add_watch", InotifyAddWatch, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		255: syscalls.PartiallySupported("inotify_rm_watch", InotifyRmWatch, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		256: syscalls.CapError("migrate_pages", linux.CAP_SYS_NICE, "", nil),
		257: syscalls.Supported("openat", Openat),
		258: syscalls.Supported("mkdirat", Mkdirat),
		259: syscalls.Supported("mknodat", Mknodat),
		260: syscalls.Supported("fchownat", Fchownat),
		261: syscalls.Supported("futimesat", Futimesat),
		262: syscalls.Supported("fstatat", Fstatat),
		263: syscalls.Supported("unlinkat", Unlinkat),
		264: syscalls.Supported("renameat", Renameat),
		265: syscalls.PartiallySupported("linkat", Linkat, "See link(2).", nil),
		266: syscalls.Supported("symlinkat", Symlinkat),
		267: syscalls.Supported("readlinkat", Readlinkat),
		268: syscalls.Supported("fchmodat", Fchmodat),
		269: syscalls.Supported("faccessat", Faccessat),
		270: syscalls.Supported("pselect", Pselect),
		271: syscalls.Supported("ppoll", Ppoll),
		272: syscalls.PartiallySupported("unshare", Unshare, "Mount, cgroup namespaces not supported. Network namespaces supported but must be empty.", nil),
		273: syscalls.Supported("set_robust_list", SetRobustList),
		274: syscalls.Supported("get_robust_list", GetRobustList),
		275: syscalls.Supported("splice", Splice),
		276: syscalls.Supported("tee", Tee),
		277: syscalls.PartiallySupported("sync_file_range", SyncFileRange, "Full data flush is not guaranteed at this time.", nil),
		278: syscalls.ErrorWithEvent("vmsplice", syserror.ENOSYS, "", []string{"gvisor.dev/issue/138"}),
		279: syscalls.CapError("move_pages", linux.CAP_SYS_NICE, "", nil),
		280: syscalls.Supported("utimensat", Utimensat),
		281: syscalls.Supported("epoll_pwait", EpollPwait),
		282: syscalls.PartiallySupported("signalfd", Signalfd, "Semantics are slightly different.", []string{"gvisor.dev/issue/139"}),
		283: syscalls.Supported("timerfd_create", TimerfdCreate),
		284: syscalls.Supported("eventfd", Eventfd),
		285: syscalls.PartiallySupported("fallocate", Fallocate, "Not all options are supported.", nil),
		286: syscalls.Supported("timerfd_settime", TimerfdSettime),
		287: syscalls.Supported("timerfd_gettime", TimerfdGettime),
		288: syscalls.Supported("accept4", Accept4),
		289: syscalls.PartiallySupported("signalfd4", Signalfd4, "Semantics are slightly different.", []string{"gvisor.dev/issue/139"}),
		290: syscalls.Supported("eventfd2", Eventfd2),
		291: syscalls.Supported("epoll_create1", EpollCreate1),
		292: syscalls.Supported("dup3", Dup3),
		293: syscalls.Supported("pipe2", Pipe2),
		294: syscalls.PartiallySupported("inotify_init1", InotifyInit1, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		295: syscalls.Supported("preadv", Preadv),
		296: syscalls.Supported("pwritev", Pwritev),
		297: syscalls.Supported("rt_tgsigqueueinfo", RtTgsigqueueinfo),
		298: syscalls.ErrorWithEvent("perf_event_open", syserror.ENODEV, "No support for perf counters", nil),
		299: syscalls.PartiallySupported("recvmmsg", RecvMMsg, "Not all flags and control messages are supported.", nil),
		300: syscalls.ErrorWithEvent("fanotify_init", syserror.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		301: syscalls.ErrorWithEvent("fanotify_mark", syserror.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		302: syscalls.Supported("prlimit64", Prlimit64),
		303: syscalls.Error("name_to_handle_at", syserror.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		304: syscalls.Error("open_by_handle_at", syserror.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		305: syscalls.CapError("clock_adjtime", linux.CAP_SYS_TIME, "", nil),
		306: syscalls.PartiallySupported("syncfs", Syncfs, "Depends on backing file system.", nil),
		307: syscalls.PartiallySupported("sendmmsg", SendMMsg, "Not all flags and control messages are supported.", nil),
		308: syscalls.ErrorWithEvent("setns", syserror.EOPNOTSUPP, "Needs filesystem support", []string{"gvisor.dev/issue/140"}),
		309: syscalls.Supported("getcpu", Getcpu),
		310: syscalls.ErrorWithEvent("process_vm_readv", syserror.ENOSYS, "", []string{"gvisor.dev/issue/158"}),
		311: syscalls.ErrorWithEvent("process_vm_writev", syserror.ENOSYS, "", []string{"gvisor.dev/issue/158"}),
		312: syscalls.CapError("kcmp", linux.CAP_SYS_PTRACE, "", nil),
		313: syscalls.CapError("finit_module", linux.CAP_SYS_MODULE, "", nil),
		314: syscalls.ErrorWithEvent("sched_setattr", syserror.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		315: syscalls.ErrorWithEvent("sched_getattr", syserror.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		316: syscalls.ErrorWithEvent("renameat2", syserror.ENOSYS, "", []string{"gvisor.dev/issue/263"}),
		317: syscalls.Supported("seccomp", Seccomp),
		318: syscalls.Supported("getrandom", GetRandom),
		319: syscalls.Supported("memfd_create", MemfdCreate),
		320: syscalls.CapError("kexec_file_load", linux.CAP_SYS_BOOT, "", nil),
		321: syscalls.CapError("bpf", linux.CAP_SYS_ADMIN, "", nil),
		322: syscalls.Supported("execveat", Execveat),
		323: syscalls.ErrorWithEvent("userfaultfd", syserror.ENOSYS, "", []string{"gvisor.dev/issue/266"}),
		324: syscalls.PartiallySupported("membarrier", Membarrier, "Not supported on all platforms.", nil),
		325: syscalls.PartiallySupported("mlock2", Mlock2, "Stub implementation. The sandbox lacks appropriate permissions.", nil),

		326: syscalls.ErrorWithEvent("copy_file_range", syserror.ENOSYS, "", nil),
		327: syscalls.Supported("preadv2", Preadv2),
		328: syscalls.PartiallySupported("pwritev2", Pwritev2, "Flag RWF_HIPRI is not supported.", nil),
		329: syscalls.ErrorWithEvent("pkey_mprotect", syserror.ENOSYS, "", nil),
		330: syscalls.ErrorWithEvent("pkey_alloc", syserror.ENOSYS, "", nil),
		331: syscalls.ErrorWithEvent("pkey_free", syserror.ENOSYS, "", nil),
		332: syscalls.Supported("statx", Statx),
		333: syscalls.ErrorWithEvent("io_pgetevents", syserror.ENOSYS, "", nil),
		334: syscalls.PartiallySupported("rseq", RSeq, "Not supported on all platforms.", nil),

		424: syscalls.ErrorWithEvent("pidfd_send_signal", syserror.ENOSYS, "", nil),
		425: syscalls.ErrorWithEvent("io_uring_setup", syserror.ENOSYS, "", nil),
		426: syscalls.ErrorWithEvent("io_uring_enter", syserror.ENOSYS, "", nil),
		427: syscalls.ErrorWithEvent("io_uring_register", syserror.ENOSYS, "", nil),
		428: syscalls.ErrorWithEvent("open_tree", syserror.ENOSYS, "", nil),
		429: syscalls.ErrorWithEvent("move_mount", syserror.ENOSYS, "", nil),
		430: syscalls.ErrorWithEvent("fsopen", syserror.ENOSYS, "", nil),
		431: syscalls.ErrorWithEvent("fsconfig", syserror.ENOSYS, "", nil),
		432: syscalls.ErrorWithEvent("fsmount", syserror.ENOSYS, "", nil),
		433: syscalls.ErrorWithEvent("fspick", syserror.ENOSYS, "", nil),
		434: syscalls.ErrorWithEvent("pidfd_open", syserror.ENOSYS, "", nil),
		435: syscalls.ErrorWithEvent("clone3", syserror.ENOSYS, "", nil),
		441: syscalls.Supported("epoll_pwait2", EpollPwait2),
	},
	Emulate: map[hostarch.Addr]uintptr{
		0xffffffffff600000: 96,
		0xffffffffff600400: 201,
		0xffffffffff600800: 309,
	},
	Missing: func(t *kernel.Task, sysno uintptr, args arch.SyscallArguments) (uintptr, error) {
		t.Kernel().EmitUnimplementedEvent(t)
		return 0, syserror.ENOSYS
	},
}

AMD64 is a table of Linux amd64 syscall API with the corresponding syscall numbers from Linux 4.4.

View Source
var ARM64 = &kernel.SyscallTable{
	OS:   abi.Linux,
	Arch: arch.ARM64,
	Version: kernel.Version{
		Sysname: LinuxSysname,
		Release: LinuxRelease,
		Version: LinuxVersion,
	},
	AuditNumber: linux.AUDIT_ARCH_AARCH64,
	Table: map[uintptr]kernel.Syscall{
		0:   syscalls.PartiallySupported("io_setup", IoSetup, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		1:   syscalls.PartiallySupported("io_destroy", IoDestroy, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		2:   syscalls.PartiallySupported("io_submit", IoSubmit, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		3:   syscalls.PartiallySupported("io_cancel", IoCancel, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		4:   syscalls.PartiallySupported("io_getevents", IoGetevents, "Generally supported with exceptions. User ring optimizations are not implemented.", []string{"gvisor.dev/issue/204"}),
		5:   syscalls.PartiallySupported("setxattr", SetXattr, "Only supported for tmpfs.", nil),
		6:   syscalls.PartiallySupported("lsetxattr", LSetXattr, "Only supported for tmpfs.", nil),
		7:   syscalls.PartiallySupported("fsetxattr", FSetXattr, "Only supported for tmpfs.", nil),
		8:   syscalls.PartiallySupported("getxattr", GetXattr, "Only supported for tmpfs.", nil),
		9:   syscalls.PartiallySupported("lgetxattr", LGetXattr, "Only supported for tmpfs.", nil),
		10:  syscalls.PartiallySupported("fgetxattr", FGetXattr, "Only supported for tmpfs.", nil),
		11:  syscalls.PartiallySupported("listxattr", ListXattr, "Only supported for tmpfs", nil),
		12:  syscalls.PartiallySupported("llistxattr", LListXattr, "Only supported for tmpfs", nil),
		13:  syscalls.PartiallySupported("flistxattr", FListXattr, "Only supported for tmpfs", nil),
		14:  syscalls.PartiallySupported("removexattr", RemoveXattr, "Only supported for tmpfs", nil),
		15:  syscalls.PartiallySupported("lremovexattr", LRemoveXattr, "Only supported for tmpfs", nil),
		16:  syscalls.PartiallySupported("fremovexattr", FRemoveXattr, "Only supported for tmpfs", nil),
		17:  syscalls.Supported("getcwd", Getcwd),
		18:  syscalls.CapError("lookup_dcookie", linux.CAP_SYS_ADMIN, "", nil),
		19:  syscalls.Supported("eventfd2", Eventfd2),
		20:  syscalls.Supported("epoll_create1", EpollCreate1),
		21:  syscalls.Supported("epoll_ctl", EpollCtl),
		22:  syscalls.Supported("epoll_pwait", EpollPwait),
		23:  syscalls.Supported("dup", Dup),
		24:  syscalls.Supported("dup3", Dup3),
		25:  syscalls.PartiallySupported("fcntl", Fcntl, "Not all options are supported.", nil),
		26:  syscalls.PartiallySupported("inotify_init1", InotifyInit1, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		27:  syscalls.PartiallySupported("inotify_add_watch", InotifyAddWatch, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		28:  syscalls.PartiallySupported("inotify_rm_watch", InotifyRmWatch, "Inotify events are only available inside the sandbox. Hard links are treated as different watch targets in gofer fs.", nil),
		29:  syscalls.PartiallySupported("ioctl", Ioctl, "Only a few ioctls are implemented for backing devices and file systems.", nil),
		30:  syscalls.CapError("ioprio_set", linux.CAP_SYS_ADMIN, "", nil),
		31:  syscalls.CapError("ioprio_get", linux.CAP_SYS_ADMIN, "", nil),
		32:  syscalls.PartiallySupported("flock", Flock, "Locks are held within the sandbox only.", nil),
		33:  syscalls.Supported("mknodat", Mknodat),
		34:  syscalls.Supported("mkdirat", Mkdirat),
		35:  syscalls.Supported("unlinkat", Unlinkat),
		36:  syscalls.Supported("symlinkat", Symlinkat),
		37:  syscalls.Supported("linkat", Linkat),
		38:  syscalls.Supported("renameat", Renameat),
		39:  syscalls.PartiallySupported("umount2", Umount2, "Not all options or file systems are supported.", nil),
		40:  syscalls.PartiallySupported("mount", Mount, "Not all options or file systems are supported.", nil),
		41:  syscalls.Error("pivot_root", syserror.EPERM, "", nil),
		42:  syscalls.Error("nfsservctl", syserror.ENOSYS, "Removed after Linux 3.1.", nil),
		43:  syscalls.PartiallySupported("statfs", Statfs, "Depends on the backing file system implementation.", nil),
		44:  syscalls.PartiallySupported("fstatfs", Fstatfs, "Depends on the backing file system implementation.", nil),
		45:  syscalls.Supported("truncate", Truncate),
		46:  syscalls.Supported("ftruncate", Ftruncate),
		47:  syscalls.PartiallySupported("fallocate", Fallocate, "Not all options are supported.", nil),
		48:  syscalls.Supported("faccessat", Faccessat),
		49:  syscalls.Supported("chdir", Chdir),
		50:  syscalls.Supported("fchdir", Fchdir),
		51:  syscalls.Supported("chroot", Chroot),
		52:  syscalls.PartiallySupported("fchmod", Fchmod, "Options S_ISUID and S_ISGID not supported.", nil),
		53:  syscalls.Supported("fchmodat", Fchmodat),
		54:  syscalls.Supported("fchownat", Fchownat),
		55:  syscalls.Supported("fchown", Fchown),
		56:  syscalls.Supported("openat", Openat),
		57:  syscalls.Supported("close", Close),
		58:  syscalls.CapError("vhangup", linux.CAP_SYS_TTY_CONFIG, "", nil),
		59:  syscalls.Supported("pipe2", Pipe2),
		60:  syscalls.CapError("quotactl", linux.CAP_SYS_ADMIN, "", nil),
		61:  syscalls.Supported("getdents64", Getdents64),
		62:  syscalls.Supported("lseek", Lseek),
		63:  syscalls.Supported("read", Read),
		64:  syscalls.Supported("write", Write),
		65:  syscalls.Supported("readv", Readv),
		66:  syscalls.Supported("writev", Writev),
		67:  syscalls.Supported("pread64", Pread64),
		68:  syscalls.Supported("pwrite64", Pwrite64),
		69:  syscalls.Supported("preadv", Preadv),
		70:  syscalls.Supported("pwritev", Pwritev),
		71:  syscalls.Supported("sendfile", Sendfile),
		72:  syscalls.Supported("pselect", Pselect),
		73:  syscalls.Supported("ppoll", Ppoll),
		74:  syscalls.PartiallySupported("signalfd4", Signalfd4, "Semantics are slightly different.", []string{"gvisor.dev/issue/139"}),
		75:  syscalls.ErrorWithEvent("vmsplice", syserror.ENOSYS, "", []string{"gvisor.dev/issue/138"}),
		76:  syscalls.Supported("splice", Splice),
		77:  syscalls.Supported("tee", Tee),
		78:  syscalls.Supported("readlinkat", Readlinkat),
		79:  syscalls.Supported("fstatat", Fstatat),
		80:  syscalls.Supported("fstat", Fstat),
		81:  syscalls.PartiallySupported("sync", Sync, "Full data flush is not guaranteed at this time.", nil),
		82:  syscalls.PartiallySupported("fsync", Fsync, "Full data flush is not guaranteed at this time.", nil),
		83:  syscalls.PartiallySupported("fdatasync", Fdatasync, "Full data flush is not guaranteed at this time.", nil),
		84:  syscalls.PartiallySupported("sync_file_range", SyncFileRange, "Full data flush is not guaranteed at this time.", nil),
		85:  syscalls.Supported("timerfd_create", TimerfdCreate),
		86:  syscalls.Supported("timerfd_settime", TimerfdSettime),
		87:  syscalls.Supported("timerfd_gettime", TimerfdGettime),
		88:  syscalls.Supported("utimensat", Utimensat),
		89:  syscalls.CapError("acct", linux.CAP_SYS_PACCT, "", nil),
		90:  syscalls.Supported("capget", Capget),
		91:  syscalls.Supported("capset", Capset),
		92:  syscalls.ErrorWithEvent("personality", syserror.EINVAL, "Unable to change personality.", nil),
		93:  syscalls.Supported("exit", Exit),
		94:  syscalls.Supported("exit_group", ExitGroup),
		95:  syscalls.Supported("waitid", Waitid),
		96:  syscalls.Supported("set_tid_address", SetTidAddress),
		97:  syscalls.PartiallySupported("unshare", Unshare, "Mount, cgroup namespaces not supported. Network namespaces supported but must be empty.", nil),
		98:  syscalls.PartiallySupported("futex", Futex, "Robust futexes not supported.", nil),
		99:  syscalls.Supported("set_robust_list", SetRobustList),
		100: syscalls.Supported("get_robust_list", GetRobustList),
		101: syscalls.Supported("nanosleep", Nanosleep),
		102: syscalls.Supported("getitimer", Getitimer),
		103: syscalls.Supported("setitimer", Setitimer),
		104: syscalls.CapError("kexec_load", linux.CAP_SYS_BOOT, "", nil),
		105: syscalls.CapError("init_module", linux.CAP_SYS_MODULE, "", nil),
		106: syscalls.CapError("delete_module", linux.CAP_SYS_MODULE, "", nil),
		107: syscalls.Supported("timer_create", TimerCreate),
		108: syscalls.Supported("timer_gettime", TimerGettime),
		109: syscalls.Supported("timer_getoverrun", TimerGetoverrun),
		110: syscalls.Supported("timer_settime", TimerSettime),
		111: syscalls.Supported("timer_delete", TimerDelete),
		112: syscalls.Supported("clock_settime", ClockSettime),
		113: syscalls.Supported("clock_gettime", ClockGettime),
		114: syscalls.Supported("clock_getres", ClockGetres),
		115: syscalls.Supported("clock_nanosleep", ClockNanosleep),
		116: syscalls.PartiallySupported("syslog", Syslog, "Outputs a dummy message for security reasons.", nil),
		117: syscalls.PartiallySupported("ptrace", Ptrace, "Options PTRACE_PEEKSIGINFO, PTRACE_SECCOMP_GET_FILTER not supported.", nil),
		118: syscalls.CapError("sched_setparam", linux.CAP_SYS_NICE, "", nil),
		119: syscalls.PartiallySupported("sched_setscheduler", SchedSetscheduler, "Stub implementation.", nil),
		120: syscalls.PartiallySupported("sched_getscheduler", SchedGetscheduler, "Stub implementation.", nil),
		121: syscalls.PartiallySupported("sched_getparam", SchedGetparam, "Stub implementation.", nil),
		122: syscalls.PartiallySupported("sched_setaffinity", SchedSetaffinity, "Stub implementation.", nil),
		123: syscalls.PartiallySupported("sched_getaffinity", SchedGetaffinity, "Stub implementation.", nil),
		124: syscalls.Supported("sched_yield", SchedYield),
		125: syscalls.PartiallySupported("sched_get_priority_max", SchedGetPriorityMax, "Stub implementation.", nil),
		126: syscalls.PartiallySupported("sched_get_priority_min", SchedGetPriorityMin, "Stub implementation.", nil),
		127: syscalls.ErrorWithEvent("sched_rr_get_interval", syserror.EPERM, "", nil),
		128: syscalls.Supported("restart_syscall", RestartSyscall),
		129: syscalls.Supported("kill", Kill),
		130: syscalls.Supported("tkill", Tkill),
		131: syscalls.Supported("tgkill", Tgkill),
		132: syscalls.Supported("sigaltstack", Sigaltstack),
		133: syscalls.Supported("rt_sigsuspend", RtSigsuspend),
		134: syscalls.Supported("rt_sigaction", RtSigaction),
		135: syscalls.Supported("rt_sigprocmask", RtSigprocmask),
		136: syscalls.Supported("rt_sigpending", RtSigpending),
		137: syscalls.Supported("rt_sigtimedwait", RtSigtimedwait),
		138: syscalls.Supported("rt_sigqueueinfo", RtSigqueueinfo),
		139: syscalls.Supported("rt_sigreturn", RtSigreturn),
		140: syscalls.PartiallySupported("setpriority", Setpriority, "Stub implementation.", nil),
		141: syscalls.PartiallySupported("getpriority", Getpriority, "Stub implementation.", nil),
		142: syscalls.CapError("reboot", linux.CAP_SYS_BOOT, "", nil),
		143: syscalls.Supported("setregid", Setregid),
		144: syscalls.Supported("setgid", Setgid),
		145: syscalls.Supported("setreuid", Setreuid),
		146: syscalls.Supported("setuid", Setuid),
		147: syscalls.Supported("setresuid", Setresuid),
		148: syscalls.Supported("getresuid", Getresuid),
		149: syscalls.Supported("setresgid", Setresgid),
		150: syscalls.Supported("getresgid", Getresgid),
		151: syscalls.ErrorWithEvent("setfsuid", syserror.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		152: syscalls.ErrorWithEvent("setfsgid", syserror.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		153: syscalls.Supported("times", Times),
		154: syscalls.Supported("setpgid", Setpgid),
		155: syscalls.Supported("getpgid", Getpgid),
		156: syscalls.Supported("getsid", Getsid),
		157: syscalls.Supported("setsid", Setsid),
		158: syscalls.Supported("getgroups", Getgroups),
		159: syscalls.Supported("setgroups", Setgroups),
		160: syscalls.Supported("uname", Uname),
		161: syscalls.Supported("sethostname", Sethostname),
		162: syscalls.Supported("setdomainname", Setdomainname),
		163: syscalls.Supported("getrlimit", Getrlimit),
		164: syscalls.PartiallySupported("setrlimit", Setrlimit, "Not all rlimits are enforced.", nil),
		165: syscalls.PartiallySupported("getrusage", Getrusage, "Fields ru_maxrss, ru_minflt, ru_majflt, ru_inblock, ru_oublock are not supported. Fields ru_utime and ru_stime have low precision.", nil),
		166: syscalls.Supported("umask", Umask),
		167: syscalls.PartiallySupported("prctl", Prctl, "Not all options are supported.", nil),
		168: syscalls.Supported("getcpu", Getcpu),
		169: syscalls.Supported("gettimeofday", Gettimeofday),
		170: syscalls.CapError("settimeofday", linux.CAP_SYS_TIME, "", nil),
		171: syscalls.CapError("adjtimex", linux.CAP_SYS_TIME, "", nil),
		172: syscalls.Supported("getpid", Getpid),
		173: syscalls.Supported("getppid", Getppid),
		174: syscalls.Supported("getuid", Getuid),
		175: syscalls.Supported("geteuid", Geteuid),
		176: syscalls.Supported("getgid", Getgid),
		177: syscalls.Supported("getegid", Getegid),
		178: syscalls.Supported("gettid", Gettid),
		179: syscalls.PartiallySupported("sysinfo", Sysinfo, "Fields loads, sharedram, bufferram, totalswap, freeswap, totalhigh, freehigh not supported.", nil),
		180: syscalls.ErrorWithEvent("mq_open", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		181: syscalls.ErrorWithEvent("mq_unlink", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		182: syscalls.ErrorWithEvent("mq_timedsend", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		183: syscalls.ErrorWithEvent("mq_timedreceive", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		184: syscalls.ErrorWithEvent("mq_notify", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		185: syscalls.ErrorWithEvent("mq_getsetattr", syserror.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		186: syscalls.ErrorWithEvent("msgget", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		187: syscalls.ErrorWithEvent("msgctl", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		188: syscalls.ErrorWithEvent("msgrcv", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		189: syscalls.ErrorWithEvent("msgsnd", syserror.ENOSYS, "", []string{"gvisor.dev/issue/135"}),
		190: syscalls.Supported("semget", Semget),
		191: syscalls.Supported("semctl", Semctl),
		192: syscalls.Supported("semtimedop", Semtimedop),
		193: syscalls.PartiallySupported("semop", Semop, "Option SEM_UNDO not supported.", nil),
		194: syscalls.PartiallySupported("shmget", Shmget, "Option SHM_HUGETLB is not supported.", nil),
		195: syscalls.PartiallySupported("shmctl", Shmctl, "Options SHM_LOCK, SHM_UNLOCK are not supported.", nil),
		196: syscalls.PartiallySupported("shmat", Shmat, "Option SHM_RND is not supported.", nil),
		197: syscalls.Supported("shmdt", Shmdt),
		198: syscalls.PartiallySupported("socket", Socket, "Limited support for AF_NETLINK, NETLINK_ROUTE sockets. Limited support for SOCK_RAW.", nil),
		199: syscalls.Supported("socketpair", SocketPair),
		200: syscalls.PartiallySupported("bind", Bind, "Autobind for abstract Unix sockets is not supported.", nil),
		201: syscalls.Supported("listen", Listen),
		202: syscalls.Supported("accept", Accept),
		203: syscalls.Supported("connect", Connect),
		204: syscalls.Supported("getsockname", GetSockName),
		205: syscalls.Supported("getpeername", GetPeerName),
		206: syscalls.Supported("sendto", SendTo),
		207: syscalls.Supported("recvfrom", RecvFrom),
		208: syscalls.PartiallySupported("setsockopt", SetSockOpt, "Not all socket options are supported.", nil),
		209: syscalls.PartiallySupported("getsockopt", GetSockOpt, "Not all socket options are supported.", nil),
		210: syscalls.PartiallySupported("shutdown", Shutdown, "Not all flags and control messages are supported.", nil),
		211: syscalls.Supported("sendmsg", SendMsg),
		212: syscalls.PartiallySupported("recvmsg", RecvMsg, "Not all flags and control messages are supported.", nil),
		213: syscalls.Supported("readahead", Readahead),
		214: syscalls.Supported("brk", Brk),
		215: syscalls.Supported("munmap", Munmap),
		216: syscalls.Supported("mremap", Mremap),
		217: syscalls.Error("add_key", syserror.EACCES, "Not available to user.", nil),
		218: syscalls.Error("request_key", syserror.EACCES, "Not available to user.", nil),
		219: syscalls.Error("keyctl", syserror.EACCES, "Not available to user.", nil),
		220: syscalls.PartiallySupported("clone", Clone, "Mount namespace (CLONE_NEWNS) not supported. Options CLONE_PARENT, CLONE_SYSVSEM not supported.", nil),
		221: syscalls.Supported("execve", Execve),
		222: syscalls.PartiallySupported("mmap", Mmap, "Generally supported with exceptions. Options MAP_FIXED_NOREPLACE, MAP_SHARED_VALIDATE, MAP_SYNC MAP_GROWSDOWN, MAP_HUGETLB are not supported.", nil),
		223: syscalls.PartiallySupported("fadvise64", Fadvise64, "Not all options are supported.", nil),
		224: syscalls.CapError("swapon", linux.CAP_SYS_ADMIN, "", nil),
		225: syscalls.CapError("swapoff", linux.CAP_SYS_ADMIN, "", nil),
		226: syscalls.Supported("mprotect", Mprotect),
		227: syscalls.PartiallySupported("msync", Msync, "Full data flush is not guaranteed at this time.", nil),
		228: syscalls.PartiallySupported("mlock", Mlock, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		229: syscalls.PartiallySupported("munlock", Munlock, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		230: syscalls.PartiallySupported("mlockall", Mlockall, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		231: syscalls.PartiallySupported("munlockall", Munlockall, "Stub implementation. The sandbox lacks appropriate permissions.", nil),
		232: syscalls.PartiallySupported("mincore", Mincore, "Stub implementation. The sandbox does not have access to this information. Reports all mapped pages are resident.", nil),
		233: syscalls.PartiallySupported("madvise", Madvise, "Options MADV_DONTNEED, MADV_DONTFORK are supported. Other advice is ignored.", nil),
		234: syscalls.ErrorWithEvent("remap_file_pages", syserror.ENOSYS, "Deprecated since Linux 3.16.", nil),
		235: syscalls.PartiallySupported("mbind", Mbind, "Stub implementation. Only a single NUMA node is advertised, and mempolicy is ignored accordingly, but mbind() will succeed and has effects reflected by get_mempolicy.", []string{"gvisor.dev/issue/262"}),
		236: syscalls.PartiallySupported("get_mempolicy", GetMempolicy, "Stub implementation.", nil),
		237: syscalls.PartiallySupported("set_mempolicy", SetMempolicy, "Stub implementation.", nil),
		238: syscalls.CapError("migrate_pages", linux.CAP_SYS_NICE, "", nil),
		239: syscalls.CapError("move_pages", linux.CAP_SYS_NICE, "", nil),
		240: syscalls.Supported("rt_tgsigqueueinfo", RtTgsigqueueinfo),
		241: syscalls.ErrorWithEvent("perf_event_open", syserror.ENODEV, "No support for perf counters", nil),
		242: syscalls.Supported("accept4", Accept4),
		243: syscalls.PartiallySupported("recvmmsg", RecvMMsg, "Not all flags and control messages are supported.", nil),
		260: syscalls.Supported("wait4", Wait4),
		261: syscalls.Supported("prlimit64", Prlimit64),
		262: syscalls.ErrorWithEvent("fanotify_init", syserror.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		263: syscalls.ErrorWithEvent("fanotify_mark", syserror.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		264: syscalls.Error("name_to_handle_at", syserror.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		265: syscalls.Error("open_by_handle_at", syserror.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		266: syscalls.CapError("clock_adjtime", linux.CAP_SYS_TIME, "", nil),
		267: syscalls.PartiallySupported("syncfs", Syncfs, "Depends on backing file system.", nil),
		268: syscalls.ErrorWithEvent("setns", syserror.EOPNOTSUPP, "Needs filesystem support", []string{"gvisor.dev/issue/140"}),
		269: syscalls.PartiallySupported("sendmmsg", SendMMsg, "Not all flags and control messages are supported.", nil),
		270: syscalls.ErrorWithEvent("process_vm_readv", syserror.ENOSYS, "", []string{"gvisor.dev/issue/158"}),
		271: syscalls.ErrorWithEvent("process_vm_writev", syserror.ENOSYS, "", []string{"gvisor.dev/issue/158"}),
		272: syscalls.CapError("kcmp", linux.CAP_SYS_PTRACE, "", nil),
		273: syscalls.CapError("finit_module", linux.CAP_SYS_MODULE, "", nil),
		274: syscalls.ErrorWithEvent("sched_setattr", syserror.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		275: syscalls.ErrorWithEvent("sched_getattr", syserror.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		276: syscalls.ErrorWithEvent("renameat2", syserror.ENOSYS, "", []string{"gvisor.dev/issue/263"}),
		277: syscalls.Supported("seccomp", Seccomp),
		278: syscalls.Supported("getrandom", GetRandom),
		279: syscalls.Supported("memfd_create", MemfdCreate),
		280: syscalls.CapError("bpf", linux.CAP_SYS_ADMIN, "", nil),
		281: syscalls.Supported("execveat", Execveat),
		282: syscalls.ErrorWithEvent("userfaultfd", syserror.ENOSYS, "", []string{"gvisor.dev/issue/266"}),
		283: syscalls.PartiallySupported("membarrier", Membarrier, "Not supported on all platforms.", nil),
		284: syscalls.PartiallySupported("mlock2", Mlock2, "Stub implementation. The sandbox lacks appropriate permissions.", nil),

		285: syscalls.ErrorWithEvent("copy_file_range", syserror.ENOSYS, "", nil),
		286: syscalls.Supported("preadv2", Preadv2),
		287: syscalls.PartiallySupported("pwritev2", Pwritev2, "Flag RWF_HIPRI is not supported.", nil),
		288: syscalls.ErrorWithEvent("pkey_mprotect", syserror.ENOSYS, "", nil),
		289: syscalls.ErrorWithEvent("pkey_alloc", syserror.ENOSYS, "", nil),
		290: syscalls.ErrorWithEvent("pkey_free", syserror.ENOSYS, "", nil),
		291: syscalls.Supported("statx", Statx),
		292: syscalls.ErrorWithEvent("io_pgetevents", syserror.ENOSYS, "", nil),
		293: syscalls.PartiallySupported("rseq", RSeq, "Not supported on all platforms.", nil),

		424: syscalls.ErrorWithEvent("pidfd_send_signal", syserror.ENOSYS, "", nil),
		425: syscalls.ErrorWithEvent("io_uring_setup", syserror.ENOSYS, "", nil),
		426: syscalls.ErrorWithEvent("io_uring_enter", syserror.ENOSYS, "", nil),
		427: syscalls.ErrorWithEvent("io_uring_register", syserror.ENOSYS, "", nil),
		428: syscalls.ErrorWithEvent("open_tree", syserror.ENOSYS, "", nil),
		429: syscalls.ErrorWithEvent("move_mount", syserror.ENOSYS, "", nil),
		430: syscalls.ErrorWithEvent("fsopen", syserror.ENOSYS, "", nil),
		431: syscalls.ErrorWithEvent("fsconfig", syserror.ENOSYS, "", nil),
		432: syscalls.ErrorWithEvent("fsmount", syserror.ENOSYS, "", nil),
		433: syscalls.ErrorWithEvent("fspick", syserror.ENOSYS, "", nil),
		434: syscalls.ErrorWithEvent("pidfd_open", syserror.ENOSYS, "", nil),
		435: syscalls.ErrorWithEvent("clone3", syserror.ENOSYS, "", nil),
		441: syscalls.Supported("epoll_pwait2", EpollPwait2),
	},
	Emulate: map[hostarch.Addr]uintptr{},
	Missing: func(t *kernel.Task, sysno uintptr, args arch.SyscallArguments) (uintptr, error) {
		t.Kernel().EmitUnimplementedEvent(t)
		return 0, syserror.ENOSYS
	},
}

ARM64 is a table of Linux arm64 syscall API with the corresponding syscall numbers from Linux 4.4.

Functions

func Accept

Accept implements the linux syscall accept(2).

func Accept4

Accept4 implements the linux syscall accept4(2).

func Access

Access implements linux syscall access(2).

func Alarm

Alarm implements linux syscall alarm(2).

func ArchPrctl

ArchPrctl implements linux syscall arch_prctl(2). It sets architecture-specific process or thread state for t.

func Bind

Bind implements the linux syscall bind(2).

func Brk

Brk implements linux syscall brk(2).

func Capget

Capget implements Linux syscall capget.

func Capset

Capset implements Linux syscall capset.

func CaptureAddress

func CaptureAddress(t *kernel.Task, addr hostarch.Addr, addrlen uint32) ([]byte, error)

CaptureAddress allocates memory for and copies a socket address structure from the untrusted address space range.

func Chdir

Chdir implements the linux syscall chdir(2).

func Chmod

Chmod implements linux syscall chmod(2).

func Chown

Chown implements linux syscall chown(2).

func Chroot

Chroot implements the linux syscall chroot(2).

func ClockGetres

ClockGetres implements linux syscall clock_getres(2).

func ClockGettime

func ClockGettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

ClockGettime implements linux syscall clock_gettime(2).

func ClockNanosleep

func ClockNanosleep(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

ClockNanosleep implements linux syscall clock_nanosleep(2).

func ClockSettime

ClockSettime implements linux syscall clock_settime(2).

func Clone

Clone implements linux syscall clone(2). sys_clone has so many flavors. We implement the default one in linux 3.11 x86_64:

sys_clone(clone_flags, newsp, parent_tidptr, child_tidptr, tls_val)

func Close

Close implements linux syscall close(2).

func Connect

Connect implements the linux syscall connect(2).

func CopyInFDSet

func CopyInFDSet(t *kernel.Task, addr hostarch.Addr, nBytes, nBitsInLastPartialByte int) ([]byte, error)

CopyInFDSet copies an fd set from select(2)/pselect(2).

func CopyInPollFDs

func CopyInPollFDs(t *kernel.Task, addr hostarch.Addr, nfds uint) ([]linux.PollFD, error)

CopyInPollFDs copies an array of struct pollfd unless nfds exceeds the max.

func CopyInSigSet

func CopyInSigSet(t *kernel.Task, sigSetAddr hostarch.Addr, size uint) (linux.SignalSet, error)

CopyInSigSet copies in a sigset_t, checks its size, and ensures that KILL and STOP are clear.

TODO(gvisor.dev/issue/1624): This is only exported because syscalls/vfs2/signal.go depends on it. Once vfs1 is deleted and the vfs2 syscalls are moved into this package, then they can be unexported.

func Creat

Creat implements linux syscall creat(2).

func Dup

Dup implements linux syscall dup(2).

func Dup2

Dup2 implements linux syscall dup2(2).

func Dup3

Dup3 implements linux syscall dup3(2).

func EpollCreate

EpollCreate implements the epoll_create(2) linux syscall.

func EpollCreate1

func EpollCreate1(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

EpollCreate1 implements the epoll_create1(2) linux syscall.

func EpollCtl

EpollCtl implements the epoll_ctl(2) linux syscall.

func EpollPwait

EpollPwait implements the epoll_pwait(2) linux syscall.

func EpollPwait2

EpollPwait2 implements the epoll_pwait(2) linux syscall.

func EpollWait

EpollWait implements the epoll_wait(2) linux syscall.

func Eventfd

Eventfd implements linux syscall eventfd(2).

func Eventfd2

Eventfd2 implements linux syscall eventfd2(2).

func Execve

Execve implements linux syscall execve(2).

func Execveat

Execveat implements linux syscall execveat(2).

func Exit

Exit implements linux syscall exit(2).

func ExitGroup

ExitGroup implements linux syscall exit_group(2).

func FGetXattr

FGetXattr implements linux syscall fgetxattr(2).

func FListXattr

FListXattr implements linux syscall flistxattr(2).

func FRemoveXattr

func FRemoveXattr(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

FRemoveXattr implements linux syscall fremovexattr(2).

func FSetXattr

FSetXattr implements linux syscall fsetxattr(2).

func Faccessat

Faccessat implements linux syscall faccessat(2).

Note that the faccessat() system call does not take a flags argument: "The raw faccessat() system call takes only the first three arguments. The AT_EACCESS and AT_SYMLINK_NOFOLLOW flags are actually implemented within the glibc wrapper function for faccessat(). If either of these flags is specified, then the wrapper function employs fstatat(2) to determine access permissions." - faccessat(2)

func Fadvise64

Fadvise64 implements linux syscall fadvise64(2). This implementation currently ignores the provided advice.

func Fallocate

Fallocate implements linux system call fallocate(2).

func Fchdir

Fchdir implements the linux syscall fchdir(2).

func Fchmod

Fchmod implements linux syscall fchmod(2).

func Fchmodat

Fchmodat implements linux syscall fchmodat(2).

func Fchown

Fchown implements linux syscall fchown(2).

func Fchownat

Fchownat implements Linux syscall fchownat(2).

func Fcntl

Fcntl implements linux syscall fcntl(2).

func Fdatasync

Fdatasync implements linux syscall fdatasync(2).

At the moment, it just calls Fsync, which is a big hammer, but correct.

func Flock

Flock implements linux syscall flock(2).

func Fork

Fork implements Linux syscall fork(2).

func Fstat

Fstat implements linux syscall fstat(2).

func Fstatat

Fstatat implements linux syscall newfstatat, i.e. fstatat(2).

func Fstatfs

Fstatfs implements linux syscall fstatfs(2).

func Fsync

Fsync implements linux syscall fsync(2).

func Ftruncate

Ftruncate implements linux syscall ftruncate(2).

func Futex

Futex implements linux syscall futex(2). It provides a method for a program to wait for a value at a given address to change, and a method to wake up anyone waiting on a particular address.

func Futimesat

Futimesat implements linux syscall futimesat(2).

func GetMempolicy

func GetMempolicy(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

GetMempolicy implements the syscall get_mempolicy(2).

func GetPeerName

GetPeerName implements the linux syscall getpeername(2).

func GetRandom

GetRandom implements the linux syscall getrandom(2).

In a multi-tenant/shared environment, the only valid implementation is to fetch data from the urandom pool, otherwise starvation attacks become possible. The urandom pool is also expected to have plenty of entropy, thus the GRND_RANDOM flag is ignored. The GRND_NONBLOCK flag does not apply, as the pool will already be initialized.

func GetRobustList

func GetRobustList(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

GetRobustList implements linux syscall get_robust_list(2).

func GetSockName

GetSockName implements the linux syscall getsockname(2).

func GetSockOpt

GetSockOpt implements the linux syscall getsockopt(2).

func GetXattr

GetXattr implements linux syscall getxattr(2).

func Getcpu

Getcpu implements linux syscall getcpu(2).

func Getcwd

Getcwd implements the linux syscall getcwd(2).

func Getdents

Getdents implements linux syscall getdents(2) for 64bit systems.

func Getdents64

Getdents64 implements linux syscall getdents64(2).

func Getegid

Getegid implements the Linux syscall getegid.

func Geteuid

Geteuid implements the Linux syscall geteuid.

func Getgid

Getgid implements the Linux syscall getgid.

func Getgroups

Getgroups implements the Linux syscall getgroups.

func Getitimer

Getitimer implements linux syscall getitimer(2).

func Getpgid

Getpgid implements the linux syscall getpgid(2).

func Getpgrp

Getpgrp implements the linux syscall getpgrp(2).

func Getpid

Getpid implements linux syscall getpid(2).

func Getppid

Getppid implements linux syscall getppid(2).

func Getpriority

Getpriority pretends to implement the linux syscall getpriority(2).

This is a stub; real priorities require a full scheduler.

func Getresgid

Getresgid implements the Linux syscall getresgid.

func Getresuid

Getresuid implements the Linux syscall getresuid.

func Getrlimit

Getrlimit implements linux syscall getrlimit(2).

func Getrusage

Getrusage implements linux syscall getrusage(2).

marked "y" are supported now
marked "*" are not used on Linux
marked "p" are pending for support

y    struct timeval ru_utime; /* user CPU time used */
y    struct timeval ru_stime; /* system CPU time used */
p    long   ru_maxrss;        /* maximum resident set size */
*    long   ru_ixrss;         /* integral shared memory size */
*    long   ru_idrss;         /* integral unshared data size */
*    long   ru_isrss;         /* integral unshared stack size */
p    long   ru_minflt;        /* page reclaims (soft page faults) */
p    long   ru_majflt;        /* page faults (hard page faults) */
*    long   ru_nswap;         /* swaps */
p    long   ru_inblock;       /* block input operations */
p    long   ru_oublock;       /* block output operations */
*    long   ru_msgsnd;        /* IPC messages sent */
*    long   ru_msgrcv;        /* IPC messages received */
*    long   ru_nsignals;      /* signals received */
y    long   ru_nvcsw;         /* voluntary context switches */
y    long   ru_nivcsw;        /* involuntary context switches */

func Getsid

Getsid implements the linux syscall getsid(2).

func Gettid

Gettid implements linux syscall gettid(2).

func Gettimeofday

func Gettimeofday(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

Gettimeofday implements linux syscall gettimeofday(2).

func Getuid

Getuid implements the Linux syscall getuid.

func HandleIOErrorVFS2

func HandleIOErrorVFS2(ctx context.Context, partialResult bool, ioerr, intr error, op string, f *vfs.FileDescription) error

HandleIOErrorVFS2 handles special error cases for partial results. For some errors, we may consume the error and return only the partial read/write.

op and f are used only for panics.

func InotifyAddWatch

func InotifyAddWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyAddWatch implements the inotify_add_watch() syscall.

func InotifyInit

InotifyInit implements the inotify_init() syscalls.

func InotifyInit1

func InotifyInit1(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyInit1 implements the inotify_init1() syscalls.

func InotifyRmWatch

func InotifyRmWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

InotifyRmWatch implements the inotify_rm_watch() syscall.

func IoCancel

IoCancel implements linux syscall io_cancel(2).

It is not presently supported (ENOSYS indicates no support on this architecture).

func IoDestroy

IoDestroy implements linux syscall io_destroy(2).

func IoGetevents

IoGetevents implements linux syscall io_getevents(2).

func IoSetup

IoSetup implements linux syscall io_setup(2).

func IoSubmit

IoSubmit implements linux syscall io_submit(2).

func Ioctl

Ioctl implements linux syscall ioctl(2).

func Kill

Kill implements linux syscall kill(2).

func LGetXattr

LGetXattr implements linux syscall lgetxattr(2).

func LListXattr

LListXattr implements linux syscall llistxattr(2).

func LRemoveXattr

func LRemoveXattr(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

LRemoveXattr implements linux syscall lremovexattr(2).

func LSetXattr

LSetXattr implements linux syscall lsetxattr(2).

func Lchown

Lchown implements linux syscall lchown(2).

Link implements linux syscall link(2).

func Linkat

Linkat implements linux syscall linkat(2).

func ListXattr

ListXattr implements linux syscall listxattr(2).

func Listen

Listen implements the linux syscall listen(2).

func Lseek

Lseek implements linux syscall lseek(2).

func Lstat

Lstat implements linux syscall lstat(2).

func Madvise

Madvise implements linux syscall madvise(2).

func Mbind

Mbind implements the syscall mbind(2).

func Membarrier

Membarrier implements syscall membarrier(2).

func MemfdCreate

MemfdCreate implements the linux syscall memfd_create(2).

func Mincore

Mincore implements the syscall mincore(2).

func Mkdir

Mkdir implements linux syscall mkdir(2).

func Mkdirat

Mkdirat implements linux syscall mkdirat(2).

func Mknod

Mknod implements the linux syscall mknod(2).

func Mknodat

Mknodat implements the linux syscall mknodat(2).

func Mlock

Mlock implements linux syscall mlock(2).

func Mlock2

Mlock2 implements linux syscall mlock2(2).

func Mlockall

Mlockall implements linux syscall mlockall(2).

func Mmap

Mmap implements linux syscall mmap(2).

func Mount

Mount implements Linux syscall mount(2).

func Mprotect

Mprotect implements linux syscall mprotect(2).

func Mremap

Mremap implements linux syscall mremap(2).

func Msync

Msync implements Linux syscall msync(2).

func Munlock

Munlock implements linux syscall munlock(2).

func Munlockall

Munlockall implements linux syscall munlockall(2).

func Munmap

Munmap implements linux syscall munmap(2).

func Nanosleep

Nanosleep implements linux syscall Nanosleep(2).

func Open

Open implements linux syscall open(2).

func Openat

Openat implements linux syscall openat(2).

func Pause

Pause implements linux syscall pause(2).

func Pipe

Pipe implements linux syscall pipe(2).

func Pipe2

Pipe2 implements linux syscall pipe2(2).

func Poll

Poll implements linux syscall poll(2).

func Ppoll

Ppoll implements linux syscall ppoll(2).

func Prctl

Prctl implements linux syscall prctl(2). It has a list of subfunctions which operate on the process. The arguments are all based on each subfunction.

func Pread64

Pread64 implements linux syscall pread64(2).

func Preadv

Preadv implements linux syscall preadv(2).

func Preadv2

Preadv2 implements linux syscall preadv2(2).

func Prlimit64

Prlimit64 implements linux syscall prlimit64(2).

func Pselect

Pselect implements linux syscall pselect(2).

func Ptrace

Ptrace implements linux system call ptrace(2).

func Pwrite64

Pwrite64 implements linux syscall pwrite64(2).

func Pwritev

Pwritev implements linux syscall pwritev(2).

func Pwritev2

Pwritev2 implements linux syscall pwritev2(2).

func RSeq

RSeq implements syscall rseq(2).

func Read

Read implements linux syscall read(2). Note that we try to get a buffer that is exactly the size requested because some applications like qemu expect they can do large reads all at once. Bug for bug. Same for other read calls below.

func Readahead

Readahead implements readahead(2).

Readlink implements linux syscall readlink(2).

func Readlinkat

Readlinkat implements linux syscall readlinkat(2).

func Readv

Readv implements linux syscall readv(2).

func RecvFrom

RecvFrom implements the linux syscall recvfrom(2).

func RecvMMsg

RecvMMsg implements the linux syscall recvmmsg(2).

func RecvMsg

RecvMsg implements the linux syscall recvmsg(2).

func RemoveXattr

RemoveXattr implements linux syscall removexattr(2).

func Rename

Rename implements linux syscall rename(2).

func Renameat

Renameat implements linux syscall renameat(2).

func RestartSyscall

func RestartSyscall(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RestartSyscall implements the linux syscall restart_syscall(2).

func Rmdir

Rmdir implements linux syscall rmdir(2).

func RtSigaction

RtSigaction implements linux syscall rt_sigaction(2).

func RtSigpending

func RtSigpending(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtSigpending implements linux syscall rt_sigpending(2).

func RtSigprocmask

func RtSigprocmask(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtSigprocmask implements linux syscall rt_sigprocmask(2).

func RtSigqueueinfo

func RtSigqueueinfo(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtSigqueueinfo implements linux syscall rt_sigqueueinfo(2).

func RtSigreturn

RtSigreturn implements linux syscall rt_sigreturn(2).

func RtSigsuspend

func RtSigsuspend(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtSigsuspend implements linux syscall rt_sigsuspend(2).

func RtSigtimedwait

func RtSigtimedwait(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtSigtimedwait implements linux syscall rt_sigtimedwait(2).

func RtTgsigqueueinfo

func RtTgsigqueueinfo(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

RtTgsigqueueinfo implements linux syscall rt_tgsigqueueinfo(2).

func SchedGetPriorityMax

func SchedGetPriorityMax(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedGetPriorityMax implements linux syscall sched_get_priority_max(2).

func SchedGetPriorityMin

func SchedGetPriorityMin(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedGetPriorityMin implements linux syscall sched_get_priority_min(2).

func SchedGetaffinity

func SchedGetaffinity(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedGetaffinity implements linux syscall sched_getaffinity(2).

func SchedGetparam

func SchedGetparam(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedGetparam implements linux syscall sched_getparam(2).

func SchedGetscheduler

func SchedGetscheduler(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedGetscheduler implements linux syscall sched_getscheduler(2).

func SchedSetaffinity

func SchedSetaffinity(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedSetaffinity implements linux syscall sched_setaffinity(2).

func SchedSetscheduler

func SchedSetscheduler(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SchedSetscheduler implements linux syscall sched_setscheduler(2).

func SchedYield

SchedYield implements linux syscall sched_yield(2).

func Seccomp

Seccomp implements linux syscall seccomp(2).

func Select

Select implements linux syscall select(2).

func Semctl

Semctl handles: semctl(int semid, int semnum, int cmd, ...)

func Semget

Semget handles: semget(key_t key, int nsems, int semflg)

func Semop

Semop handles: semop(int semid, struct sembuf *sops, size_t nsops)

func Semtimedop

Semtimedop handles: semop(int semid, struct sembuf *sops, size_t nsops, const struct timespec *timeout)

func SendMMsg

SendMMsg implements the linux syscall sendmmsg(2).

func SendMsg

SendMsg implements the linux syscall sendmsg(2).

func SendTo

SendTo implements the linux syscall sendto(2).

func Sendfile

Sendfile implements linux system call sendfile(2).

func SetMempolicy

func SetMempolicy(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SetMempolicy implements the syscall set_mempolicy(2).

func SetRobustList

func SetRobustList(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SetRobustList implements linux syscall set_robust_list(2).

func SetSockOpt

SetSockOpt implements the linux syscall setsockopt(2).

Note that unlike Linux, enabling SO_PASSCRED does not autobind the socket.

func SetTidAddress

func SetTidAddress(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SetTidAddress implements linux syscall set_tid_address(2).

func SetXattr

SetXattr implements linux syscall setxattr(2).

func Setdomainname

func Setdomainname(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

Setdomainname implements Linux syscall setdomainname.

func Setgid

Setgid implements the Linux syscall setgid.

func Setgroups

Setgroups implements the Linux syscall setgroups.

func Sethostname

Sethostname implements Linux syscall sethostname.

func Setitimer

Setitimer implements linux syscall setitimer(2).

func Setpgid

Setpgid implements the linux syscall setpgid(2).

func Setpriority

Setpriority pretends to implement the linux syscall setpriority(2).

This is a stub; real priorities require a full scheduler.

func Setregid

Setregid implements the Linux syscall setregid.

func Setresgid

Setresgid implements the Linux syscall setregid.

func Setresuid

Setresuid implements the Linux syscall setreuid.

func Setreuid

Setreuid implements the Linux syscall setreuid.

func Setrlimit

Setrlimit implements linux syscall setrlimit(2).

func Setsid

Setsid implements the linux syscall setsid(2).

func Setuid

Setuid implements the Linux syscall setuid.

func Shmat

Shmat implements shmat(2).

func Shmctl

Shmctl implements shmctl(2).

func Shmdt

Shmdt implements shmdt(2).

func Shmget

Shmget implements shmget(2).

func Shutdown

Shutdown implements the linux syscall shutdown(2).

func Sigaltstack

Sigaltstack implements linux syscall sigaltstack(2).

func Signalfd

Signalfd implements the linux syscall signalfd(2).

func Signalfd4

Signalfd4 implements the linux syscall signalfd4(2).

func Sigreturn

Sigreturn implements linux syscall sigreturn(2).

func Socket

Socket implements the linux syscall socket(2).

func SocketPair

SocketPair implements the linux syscall socketpair(2).

func Splice

Splice implements splice(2).

func Stat

Stat implements linux syscall stat(2).

func Statfs

Statfs implements linux syscall statfs(2).

func Statx

Statx implements linux syscall statx(2).

Symlink implements linux syscall symlink(2).

func Symlinkat

Symlinkat implements linux syscall symlinkat(2).

func Sync

Sync implements linux system call sync(2).

func SyncFileRange

func SyncFileRange(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SyncFileRange implements linux syscall sync_file_rage(2)

func Syncfs

Syncfs implements linux system call syncfs(2).

func Sysinfo

Sysinfo implements Linux syscall sysinfo(2).

func Syslog

Syslog implements part of Linux syscall syslog.

Only the unpriviledged commands are implemented, allowing applications to read a fun dmesg.

func Tee

Tee imlements tee(2).

func Tgkill

Tgkill implements linux syscall tgkill(2).

func Time

Time implements linux syscall time(2).

func TimerCreate

TimerCreate implements linux syscall timer_create(2).

func TimerDelete

TimerDelete implements linux syscall timer_delete(2).

func TimerGetoverrun

func TimerGetoverrun(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerGetoverrun implements linux syscall timer_getoverrun(2).

func TimerGettime

func TimerGettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerGettime implements linux syscall timer_gettime(2).

func TimerSettime

func TimerSettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerSettime implements linux syscall timer_settime(2).

func TimerfdCreate

func TimerfdCreate(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdCreate implements Linux syscall timerfd_create(2).

func TimerfdGettime

func TimerfdGettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdGettime implements Linux syscall timerfd_gettime(2).

func TimerfdSettime

func TimerfdSettime(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

TimerfdSettime implements Linux syscall timerfd_settime(2).

func Times

Times implements linux syscall times(2).

func Tkill

Tkill implements linux syscall tkill(2).

func Truncate

Truncate implements linux syscall truncate(2).

func Umask

Umask implements linux syscall umask(2).

func Umount2

Umount2 implements Linux syscall umount2(2).

func Uname

Uname implements linux syscall uname.

Unlink implements linux syscall unlink(2).

func Unlinkat

Unlinkat implements linux syscall unlinkat(2).

func Unshare

Unshare implements linux syscall unshare(2).

func Utime

Utime implements linux syscall utime(2).

func Utimensat

Utimensat implements linux syscall utimensat(2).

func Utimes

Utimes implements linux syscall utimes(2).

func Vfork

Vfork implements Linux syscall vfork(2).

func Wait4

Wait4 implements linux syscall wait4(2).

func WaitPid

WaitPid implements linux syscall waitpid(2).

func Waitid

Waitid implements linux syscall waitid(2).

func Write

Write implements linux syscall write(2).

func Writev

Writev implements linux syscall writev(2).

Types

type MessageHeader64

type MessageHeader64 struct {
	// Name is the optional pointer to a network address buffer.
	Name uint64

	// NameLen is the length of the buffer pointed to by Name.
	NameLen uint32

	// Iov is a pointer to an array of io vectors that describe the memory
	// locations involved in the io operation.
	Iov uint64

	// IovLen is the length of the array pointed to by Iov.
	IovLen uint64

	// Control is the optional pointer to ancillary control data.
	Control uint64

	// ControlLen is the length of the data pointed to by Control.
	ControlLen uint64

	// Flags on the sent/received message.
	Flags int32
	// contains filtered or unexported fields
}

MessageHeader64 is the 64-bit representation of the msghdr struct used in the recvmsg and sendmsg syscalls.

+marshal

func (*MessageHeader64) CopyIn

func (m *MessageHeader64) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyIn implements marshal.Marshallable.CopyIn.

func (*MessageHeader64) CopyOut

func (m *MessageHeader64) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyOut implements marshal.Marshallable.CopyOut.

func (*MessageHeader64) CopyOutN

func (m *MessageHeader64) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)

CopyOutN implements marshal.Marshallable.CopyOutN.

func (*MessageHeader64) MarshalBytes

func (m *MessageHeader64) MarshalBytes(dst []byte)

MarshalBytes implements marshal.Marshallable.MarshalBytes.

func (*MessageHeader64) MarshalUnsafe

func (m *MessageHeader64) MarshalUnsafe(dst []byte)

MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.

func (*MessageHeader64) Packed

func (m *MessageHeader64) Packed() bool

Packed implements marshal.Marshallable.Packed.

func (*MessageHeader64) SizeBytes

func (m *MessageHeader64) SizeBytes() int

SizeBytes implements marshal.Marshallable.SizeBytes.

func (*MessageHeader64) UnmarshalBytes

func (m *MessageHeader64) UnmarshalBytes(src []byte)

UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.

func (*MessageHeader64) UnmarshalUnsafe

func (m *MessageHeader64) UnmarshalUnsafe(src []byte)

UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.

func (*MessageHeader64) WriteTo

func (m *MessageHeader64) WriteTo(writer io.Writer) (int64, error)

WriteTo implements io.WriterTo.WriteTo.

type SchedParam

type SchedParam struct {
	// contains filtered or unexported fields
}

SchedParam replicates struct sched_param in sched.h.

+marshal

func (*SchedParam) CopyIn

func (s *SchedParam) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyIn implements marshal.Marshallable.CopyIn.

func (*SchedParam) CopyOut

func (s *SchedParam) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error)

CopyOut implements marshal.Marshallable.CopyOut.

func (*SchedParam) CopyOutN

func (s *SchedParam) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error)

CopyOutN implements marshal.Marshallable.CopyOutN.

func (*SchedParam) MarshalBytes

func (s *SchedParam) MarshalBytes(dst []byte)

MarshalBytes implements marshal.Marshallable.MarshalBytes.

func (*SchedParam) MarshalUnsafe

func (s *SchedParam) MarshalUnsafe(dst []byte)

MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.

func (*SchedParam) Packed

func (s *SchedParam) Packed() bool

Packed implements marshal.Marshallable.Packed.

func (*SchedParam) SizeBytes

func (s *SchedParam) SizeBytes() int

SizeBytes implements marshal.Marshallable.SizeBytes.

func (*SchedParam) UnmarshalBytes

func (s *SchedParam) UnmarshalBytes(src []byte)

UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.

func (*SchedParam) UnmarshalUnsafe

func (s *SchedParam) UnmarshalUnsafe(src []byte)

UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.

func (*SchedParam) WriteTo

func (s *SchedParam) WriteTo(writer io.Writer) (int64, error)

WriteTo implements io.WriterTo.WriteTo.

Directories

Path Synopsis
Package vfs2 provides syscall implementations that use VFS2.
Package vfs2 provides syscall implementations that use VFS2.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL