linux

package
v0.0.0-...-38f63e8 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0, MIT Imports: 58 Imported by: 5

Documentation

Overview

Package linux provides syscall tables for amd64 and arm64 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 DirentStructBytesWithoutName = 8 + 8 + 2 + 1 + 1

DirentStructBytesWithoutName is enough to fit (struct linux_dirent) and (struct linux_dirent64) without accounting for the name parameter.

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.SupportedPoint("read", Read, PointRead),
		1:   syscalls.SupportedPoint("write", Write, PointWrite),
		2:   syscalls.SupportedPoint("open", Open, PointOpen),
		3:   syscalls.SupportedPoint("close", Close, PointClose),
		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.Supported("mmap", Mmap),
		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.Supported("ioctl", Ioctl),
		17:  syscalls.SupportedPoint("pread64", Pread64, PointPread64),
		18:  syscalls.SupportedPoint("pwrite64", Pwrite64, PointPwrite64),
		19:  syscalls.SupportedPoint("readv", Readv, PointReadv),
		20:  syscalls.SupportedPoint("writev", Writev, PointWritev),
		21:  syscalls.Supported("access", Access),
		22:  syscalls.SupportedPoint("pipe", Pipe, PointPipe),
		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.SupportedPoint("dup", Dup, PointDup),
		33:  syscalls.SupportedPoint("dup2", Dup2, PointDup2),
		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.SupportedPoint("socket", Socket, PointSocket),
		42:  syscalls.SupportedPoint("connect", Connect, PointConnect),
		43:  syscalls.SupportedPoint("accept", Accept, PointAccept),
		44:  syscalls.Supported("sendto", SendTo),
		45:  syscalls.Supported("recvfrom", RecvFrom),
		46:  syscalls.Supported("sendmsg", SendMsg),
		47:  syscalls.Supported("recvmsg", RecvMsg),
		48:  syscalls.Supported("shutdown", Shutdown),
		49:  syscalls.SupportedPoint("bind", Bind, PointBind),
		50:  syscalls.Supported("listen", Listen),
		51:  syscalls.Supported("getsockname", GetSockName),
		52:  syscalls.Supported("getpeername", GetPeerName),
		53:  syscalls.SupportedPoint("socketpair", SocketPair, PointSocketpair),
		54:  syscalls.Supported("setsockopt", SetSockOpt),
		55:  syscalls.Supported("getsockopt", GetSockOpt),
		56:  syscalls.PartiallySupportedPoint("clone", Clone, PointClone, "Options CLONE_PIDFD, CLONE_NEWCGROUP, CLONE_PARENT, CLONE_NEWTIME, CLONE_CLEAR_SIGHAND, and CLONE_SYSVSEM not supported.", nil),
		57:  syscalls.SupportedPoint("fork", Fork, PointFork),
		58:  syscalls.SupportedPoint("vfork", Vfork, PointVfork),
		59:  syscalls.SupportedPoint("execve", Execve, PointExecve),
		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.Supported("msgget", Msgget),
		69:  syscalls.Supported("msgsnd", Msgsnd),
		70:  syscalls.Supported("msgrcv", Msgrcv),
		71:  syscalls.Supported("msgctl", Msgctl),
		72:  syscalls.SupportedPoint("fcntl", Fcntl, PointFcntl),
		73:  syscalls.Supported("flock", Flock),
		74:  syscalls.Supported("fsync", Fsync),
		75:  syscalls.Supported("fdatasync", Fdatasync),
		76:  syscalls.Supported("truncate", Truncate),
		77:  syscalls.Supported("ftruncate", Ftruncate),
		78:  syscalls.Supported("getdents", Getdents),
		79:  syscalls.Supported("getcwd", Getcwd),
		80:  syscalls.SupportedPoint("chdir", Chdir, PointChdir),
		81:  syscalls.SupportedPoint("fchdir", Fchdir, PointFchdir),
		82:  syscalls.Supported("rename", Rename),
		83:  syscalls.Supported("mkdir", Mkdir),
		84:  syscalls.Supported("rmdir", Rmdir),
		85:  syscalls.SupportedPoint("creat", Creat, PointCreat),
		86:  syscalls.Supported("link", Link),
		87:  syscalls.Supported("unlink", Unlink),
		88:  syscalls.Supported("symlink", Symlink),
		89:  syscalls.Supported("readlink", Readlink),
		90:  syscalls.Supported("chmod", Chmod),
		91:  syscalls.Supported("fchmod", Fchmod),
		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.SupportedPoint("setuid", Setuid, PointSetuid),
		106: syscalls.SupportedPoint("setgid", Setgid, PointSetgid),
		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.SupportedPoint("setsid", Setsid, PointSetsid),
		113: syscalls.Supported("setreuid", Setreuid),
		114: syscalls.Supported("setregid", Setregid),
		115: syscalls.Supported("getgroups", Getgroups),
		116: syscalls.Supported("setgroups", Setgroups),
		117: syscalls.SupportedPoint("setresuid", Setresuid, PointSetresuid),
		118: syscalls.Supported("getresuid", Getresuid),
		119: syscalls.SupportedPoint("setresgid", Setresgid, PointSetresgid),
		120: syscalls.Supported("getresgid", Getresgid),
		121: syscalls.Supported("getpgid", Getpgid),
		122: syscalls.ErrorWithEvent("setfsuid", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		123: syscalls.ErrorWithEvent("setfsgid", linuxerr.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.Supported("mknod", Mknod),
		134: syscalls.Error("uselib", linuxerr.ENOSYS, "Obsolete", nil),
		135: syscalls.ErrorWithEvent("personality", linuxerr.EINVAL, "Unable to change personality.", nil),
		136: syscalls.ErrorWithEvent("ustat", linuxerr.ENOSYS, "Needs filesystem support.", nil),
		137: syscalls.Supported("statfs", Statfs),
		138: syscalls.Supported("fstatfs", Fstatfs),
		139: syscalls.ErrorWithEvent("sysfs", linuxerr.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", linuxerr.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", linuxerr.EPERM, "", nil),
		155: syscalls.Supported("pivot_root", PivotRoot),
		156: syscalls.Error("sysctl", linuxerr.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.SupportedPoint("chroot", Chroot, PointChroot),
		162: syscalls.Supported("sync", Sync),
		163: syscalls.CapError("acct", linux.CAP_SYS_PACCT, "", nil),
		164: syscalls.CapError("settimeofday", linux.CAP_SYS_TIME, "", nil),
		165: syscalls.Supported("mount", Mount),
		166: syscalls.Supported("umount2", Umount2),
		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", linuxerr.ENOSYS, "Not supported in Linux > 2.6.", nil),
		178: syscalls.Error("query_module", linuxerr.ENOSYS, "Not supported in Linux > 2.6.", nil),
		179: syscalls.CapError("quotactl", linux.CAP_SYS_ADMIN, "", nil),
		180: syscalls.Error("nfsservctl", linuxerr.ENOSYS, "Removed after Linux 3.1.", nil),
		181: syscalls.Error("getpmsg", linuxerr.ENOSYS, "Not implemented in Linux.", nil),
		182: syscalls.Error("putpmsg", linuxerr.ENOSYS, "Not implemented in Linux.", nil),
		183: syscalls.PartiallySupported("afs_syscall", AFSSyscall, "Test implementation.", nil),
		184: syscalls.Error("tuxcall", linuxerr.ENOSYS, "Not implemented in Linux.", nil),
		185: syscalls.Error("security", linuxerr.ENOSYS, "Not implemented in Linux.", nil),
		186: syscalls.Supported("gettid", Gettid),
		187: syscalls.Supported("readahead", Readahead),
		188: syscalls.Supported("setxattr", SetXattr),
		189: syscalls.Supported("lsetxattr", Lsetxattr),
		190: syscalls.Supported("fsetxattr", Fsetxattr),
		191: syscalls.Supported("getxattr", GetXattr),
		192: syscalls.Supported("lgetxattr", Lgetxattr),
		193: syscalls.Supported("fgetxattr", Fgetxattr),
		194: syscalls.Supported("listxattr", ListXattr),
		195: syscalls.Supported("llistxattr", Llistxattr),
		196: syscalls.Supported("flistxattr", Flistxattr),
		197: syscalls.Supported("removexattr", RemoveXattr),
		198: syscalls.Supported("lremovexattr", Lremovexattr),
		199: syscalls.Supported("fremovexattr", Fremovexattr),
		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", linuxerr.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", linuxerr.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", linuxerr.ENOSYS, "Deprecated.", nil),
		215: syscalls.ErrorWithEvent("epoll_wait_old", linuxerr.ENOSYS, "Deprecated.", nil),
		216: syscalls.ErrorWithEvent("remap_file_pages", linuxerr.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, "The syscall is 'supported', but ignores all provided advice.", 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", linuxerr.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.Supported("mq_open", MqOpen),
		241: syscalls.Supported("mq_unlink", MqUnlink),
		242: syscalls.ErrorWithEvent("mq_timedsend", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		243: syscalls.ErrorWithEvent("mq_timedreceive", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		244: syscalls.ErrorWithEvent("mq_notify", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		245: syscalls.ErrorWithEvent("mq_getsetattr", linuxerr.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", linuxerr.EACCES, "Not available to user.", nil),
		249: syscalls.Error("request_key", linuxerr.EACCES, "Not available to user.", nil),
		250: syscalls.PartiallySupported("keyctl", Keyctl, "Only supports session keyrings with zero keys in them.", nil),
		251: syscalls.CapError("ioprio_set", linux.CAP_SYS_ADMIN, "", nil),
		252: syscalls.CapError("ioprio_get", linux.CAP_SYS_ADMIN, "", nil),
		253: syscalls.PartiallySupportedPoint("inotify_init", InotifyInit, PointInotifyInit, "inotify events are only available inside the sandbox.", nil),
		254: syscalls.PartiallySupportedPoint("inotify_add_watch", InotifyAddWatch, PointInotifyAddWatch, "inotify events are only available inside the sandbox.", nil),
		255: syscalls.PartiallySupportedPoint("inotify_rm_watch", InotifyRmWatch, PointInotifyRmWatch, "inotify events are only available inside the sandbox.", nil),
		256: syscalls.CapError("migrate_pages", linux.CAP_SYS_NICE, "", nil),
		257: syscalls.SupportedPoint("openat", Openat, PointOpenat),
		258: syscalls.Supported("mkdirat", Mkdirat),
		259: syscalls.Supported("mknodat", Mknodat),
		260: syscalls.Supported("fchownat", Fchownat),
		261: syscalls.Supported("futimesat", Futimesat),
		262: syscalls.Supported("newfstatat", Newfstatat),
		263: syscalls.Supported("unlinkat", Unlinkat),
		264: syscalls.Supported("renameat", Renameat),
		265: syscalls.Supported("linkat", Linkat),
		266: syscalls.Supported("symlinkat", Symlinkat),
		267: syscalls.Supported("readlinkat", Readlinkat),
		268: syscalls.Supported("fchmodat", Fchmodat),
		269: syscalls.Supported("faccessat", Faccessat),
		270: syscalls.Supported("pselect6", Pselect6),
		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.Supported("sync_file_range", SyncFileRange),
		278: syscalls.ErrorWithEvent("vmsplice", linuxerr.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.SupportedPoint("signalfd", Signalfd, PointSignalfd),
		283: syscalls.SupportedPoint("timerfd_create", TimerfdCreate, PointTimerfdCreate),
		284: syscalls.SupportedPoint("eventfd", Eventfd, PointEventfd),
		285: syscalls.PartiallySupported("fallocate", Fallocate, "Not all options are supported.", nil),
		286: syscalls.SupportedPoint("timerfd_settime", TimerfdSettime, PointTimerfdSettime),
		287: syscalls.SupportedPoint("timerfd_gettime", TimerfdGettime, PointTimerfdGettime),
		288: syscalls.SupportedPoint("accept4", Accept4, PointAccept4),
		289: syscalls.SupportedPoint("signalfd4", Signalfd4, PointSignalfd4),
		290: syscalls.SupportedPoint("eventfd2", Eventfd2, PointEventfd2),
		291: syscalls.Supported("epoll_create1", EpollCreate1),
		292: syscalls.SupportedPoint("dup3", Dup3, PointDup3),
		293: syscalls.SupportedPoint("pipe2", Pipe2, PointPipe2),
		294: syscalls.PartiallySupportedPoint("inotify_init1", InotifyInit1, PointInotifyInit1, "inotify events are only available inside the sandbox.", nil),
		295: syscalls.SupportedPoint("preadv", Preadv, PointPreadv),
		296: syscalls.SupportedPoint("pwritev", Pwritev, PointPwritev),
		297: syscalls.Supported("rt_tgsigqueueinfo", RtTgsigqueueinfo),
		298: syscalls.ErrorWithEvent("perf_event_open", linuxerr.ENODEV, "No support for perf counters", nil),
		299: syscalls.Supported("recvmmsg", RecvMMsg),
		300: syscalls.ErrorWithEvent("fanotify_init", linuxerr.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		301: syscalls.ErrorWithEvent("fanotify_mark", linuxerr.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		302: syscalls.SupportedPoint("prlimit64", Prlimit64, PointPrlimit64),
		303: syscalls.Error("name_to_handle_at", linuxerr.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		304: syscalls.Error("open_by_handle_at", linuxerr.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		305: syscalls.CapError("clock_adjtime", linux.CAP_SYS_TIME, "", nil),
		306: syscalls.Supported("syncfs", Syncfs),
		307: syscalls.Supported("sendmmsg", SendMMsg),
		308: syscalls.Supported("setns", Setns),
		309: syscalls.Supported("getcpu", Getcpu),
		310: syscalls.Supported("process_vm_readv", ProcessVMReadv),
		311: syscalls.Supported("process_vm_writev", ProcessVMWritev),
		312: syscalls.CapError("kcmp", linux.CAP_SYS_PTRACE, "", nil),
		313: syscalls.CapError("finit_module", linux.CAP_SYS_MODULE, "", nil),
		314: syscalls.ErrorWithEvent("sched_setattr", linuxerr.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		315: syscalls.ErrorWithEvent("sched_getattr", linuxerr.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		316: syscalls.Supported("renameat2", Renameat2),
		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.SupportedPoint("execveat", Execveat, PointExecveat),
		323: syscalls.ErrorWithEvent("userfaultfd", linuxerr.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", linuxerr.ENOSYS, "", nil),
		327: syscalls.SupportedPoint("preadv2", Preadv2, PointPreadv2),
		328: syscalls.SupportedPoint("pwritev2", Pwritev2, PointPwritev2),
		329: syscalls.ErrorWithEvent("pkey_mprotect", linuxerr.ENOSYS, "", nil),
		330: syscalls.ErrorWithEvent("pkey_alloc", linuxerr.ENOSYS, "", nil),
		331: syscalls.ErrorWithEvent("pkey_free", linuxerr.ENOSYS, "", nil),
		332: syscalls.Supported("statx", Statx),
		333: syscalls.ErrorWithEvent("io_pgetevents", linuxerr.ENOSYS, "", nil),
		334: syscalls.PartiallySupported("rseq", RSeq, "Not supported on all platforms.", nil),

		424: syscalls.ErrorWithEvent("pidfd_send_signal", linuxerr.ENOSYS, "", nil),
		425: syscalls.PartiallySupported("io_uring_setup", IOUringSetup, "Not all flags and functionality supported.", nil),
		426: syscalls.PartiallySupported("io_uring_enter", IOUringEnter, "Not all flags and functionality supported.", nil),
		427: syscalls.ErrorWithEvent("io_uring_register", linuxerr.ENOSYS, "", nil),
		428: syscalls.ErrorWithEvent("open_tree", linuxerr.ENOSYS, "", nil),
		429: syscalls.ErrorWithEvent("move_mount", linuxerr.ENOSYS, "", nil),
		430: syscalls.ErrorWithEvent("fsopen", linuxerr.ENOSYS, "", nil),
		431: syscalls.ErrorWithEvent("fsconfig", linuxerr.ENOSYS, "", nil),
		432: syscalls.ErrorWithEvent("fsmount", linuxerr.ENOSYS, "", nil),
		433: syscalls.ErrorWithEvent("fspick", linuxerr.ENOSYS, "", nil),
		434: syscalls.ErrorWithEvent("pidfd_open", linuxerr.ENOSYS, "", nil),
		435: syscalls.PartiallySupported("clone3", Clone3, "Options CLONE_PIDFD, CLONE_NEWCGROUP, CLONE_INTO_CGROUP, CLONE_NEWTIME, CLONE_CLEAR_SIGHAND, CLONE_PARENT, CLONE_SYSVSEM and, SetTid are not supported.", nil),
		436: syscalls.Supported("close_range", CloseRange),
		439: syscalls.Supported("faccessat2", Faccessat2),
		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, sysno)
		return 0, linuxerr.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.Supported("setxattr", SetXattr),
		6:   syscalls.Supported("lsetxattr", Lsetxattr),
		7:   syscalls.Supported("fsetxattr", Fsetxattr),
		8:   syscalls.Supported("getxattr", GetXattr),
		9:   syscalls.Supported("lgetxattr", Lgetxattr),
		10:  syscalls.Supported("fgetxattr", Fgetxattr),
		11:  syscalls.Supported("listxattr", ListXattr),
		12:  syscalls.Supported("llistxattr", Llistxattr),
		13:  syscalls.Supported("flistxattr", Flistxattr),
		14:  syscalls.Supported("removexattr", RemoveXattr),
		15:  syscalls.Supported("lremovexattr", Lremovexattr),
		16:  syscalls.Supported("fremovexattr", Fremovexattr),
		17:  syscalls.Supported("getcwd", Getcwd),
		18:  syscalls.CapError("lookup_dcookie", linux.CAP_SYS_ADMIN, "", nil),
		19:  syscalls.SupportedPoint("eventfd2", Eventfd2, PointEventfd2),
		20:  syscalls.Supported("epoll_create1", EpollCreate1),
		21:  syscalls.Supported("epoll_ctl", EpollCtl),
		22:  syscalls.Supported("epoll_pwait", EpollPwait),
		23:  syscalls.SupportedPoint("dup", Dup, PointDup),
		24:  syscalls.SupportedPoint("dup3", Dup3, PointDup3),
		25:  syscalls.SupportedPoint("fcntl", Fcntl, PointFcntl),
		26:  syscalls.PartiallySupportedPoint("inotify_init1", InotifyInit1, PointInotifyInit1, "inotify events are only available inside the sandbox.", nil),
		27:  syscalls.PartiallySupportedPoint("inotify_add_watch", InotifyAddWatch, PointInotifyAddWatch, "inotify events are only available inside the sandbox.", nil),
		28:  syscalls.PartiallySupportedPoint("inotify_rm_watch", InotifyRmWatch, PointInotifyRmWatch, "inotify events are only available inside the sandbox.", nil),
		29:  syscalls.Supported("ioctl", Ioctl),
		30:  syscalls.CapError("ioprio_set", linux.CAP_SYS_ADMIN, "", nil),
		31:  syscalls.CapError("ioprio_get", linux.CAP_SYS_ADMIN, "", nil),
		32:  syscalls.Supported("flock", Flock),
		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.Supported("umount2", Umount2),
		40:  syscalls.Supported("mount", Mount),
		41:  syscalls.Supported("pivot_root", PivotRoot),
		42:  syscalls.Error("nfsservctl", linuxerr.ENOSYS, "Removed after Linux 3.1.", nil),
		43:  syscalls.Supported("statfs", Statfs),
		44:  syscalls.Supported("fstatfs", Fstatfs),
		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.SupportedPoint("chdir", Chdir, PointChdir),
		50:  syscalls.SupportedPoint("fchdir", Fchdir, PointFchdir),
		51:  syscalls.SupportedPoint("chroot", Chroot, PointChroot),
		52:  syscalls.Supported("fchmod", Fchmod),
		53:  syscalls.Supported("fchmodat", Fchmodat),
		54:  syscalls.Supported("fchownat", Fchownat),
		55:  syscalls.Supported("fchown", Fchown),
		56:  syscalls.SupportedPoint("openat", Openat, PointOpenat),
		57:  syscalls.SupportedPoint("close", Close, PointClose),
		58:  syscalls.CapError("vhangup", linux.CAP_SYS_TTY_CONFIG, "", nil),
		59:  syscalls.SupportedPoint("pipe2", Pipe2, PointPipe2),
		60:  syscalls.CapError("quotactl", linux.CAP_SYS_ADMIN, "", nil),
		61:  syscalls.Supported("getdents64", Getdents64),
		62:  syscalls.Supported("lseek", Lseek),
		63:  syscalls.SupportedPoint("read", Read, PointRead),
		64:  syscalls.SupportedPoint("write", Write, PointWrite),
		65:  syscalls.SupportedPoint("readv", Readv, PointReadv),
		66:  syscalls.SupportedPoint("writev", Writev, PointWritev),
		67:  syscalls.SupportedPoint("pread64", Pread64, PointPread64),
		68:  syscalls.SupportedPoint("pwrite64", Pwrite64, PointPwrite64),
		69:  syscalls.SupportedPoint("preadv", Preadv, PointPreadv),
		70:  syscalls.SupportedPoint("pwritev", Pwritev, PointPwritev),
		71:  syscalls.Supported("sendfile", Sendfile),
		72:  syscalls.Supported("pselect6", Pselect6),
		73:  syscalls.Supported("ppoll", Ppoll),
		74:  syscalls.SupportedPoint("signalfd4", Signalfd4, PointSignalfd4),
		75:  syscalls.ErrorWithEvent("vmsplice", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/138"}),
		76:  syscalls.Supported("splice", Splice),
		77:  syscalls.Supported("tee", Tee),
		78:  syscalls.Supported("readlinkat", Readlinkat),
		79:  syscalls.Supported("newfstatat", Newfstatat),
		80:  syscalls.Supported("fstat", Fstat),
		81:  syscalls.Supported("sync", Sync),
		82:  syscalls.Supported("fsync", Fsync),
		83:  syscalls.Supported("fdatasync", Fdatasync),
		84:  syscalls.Supported("sync_file_range", SyncFileRange),
		85:  syscalls.SupportedPoint("timerfd_create", TimerfdCreate, PointTimerfdCreate),
		86:  syscalls.SupportedPoint("timerfd_settime", TimerfdSettime, PointTimerfdSettime),
		87:  syscalls.SupportedPoint("timerfd_gettime", TimerfdGettime, PointTimerfdGettime),
		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", linuxerr.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", linuxerr.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.SupportedPoint("setgid", Setgid, PointSetgid),
		145: syscalls.Supported("setreuid", Setreuid),
		146: syscalls.SupportedPoint("setuid", Setuid, PointSetuid),
		147: syscalls.SupportedPoint("setresuid", Setresuid, PointSetresuid),
		148: syscalls.Supported("getresuid", Getresuid),
		149: syscalls.SupportedPoint("setresgid", Setresgid, PointSetresgid),
		150: syscalls.Supported("getresgid", Getresgid),
		151: syscalls.ErrorWithEvent("setfsuid", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/260"}),
		152: syscalls.ErrorWithEvent("setfsgid", linuxerr.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.SupportedPoint("setsid", Setsid, PointSetsid),
		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.Supported("mq_open", MqOpen),
		181: syscalls.Supported("mq_unlink", MqUnlink),
		182: syscalls.ErrorWithEvent("mq_timedsend", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		183: syscalls.ErrorWithEvent("mq_timedreceive", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		184: syscalls.ErrorWithEvent("mq_notify", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		185: syscalls.ErrorWithEvent("mq_getsetattr", linuxerr.ENOSYS, "", []string{"gvisor.dev/issue/136"}),
		186: syscalls.Supported("msgget", Msgget),
		187: syscalls.Supported("msgctl", Msgctl),
		188: syscalls.Supported("msgrcv", Msgrcv),
		189: syscalls.Supported("msgsnd", Msgsnd),
		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.SupportedPoint("socket", Socket, PointSocket),
		199: syscalls.SupportedPoint("socketpair", SocketPair, PointSocketpair),
		200: syscalls.SupportedPoint("bind", Bind, PointBind),
		201: syscalls.Supported("listen", Listen),
		202: syscalls.SupportedPoint("accept", Accept, PointAccept),
		203: syscalls.SupportedPoint("connect", Connect, PointConnect),
		204: syscalls.Supported("getsockname", GetSockName),
		205: syscalls.Supported("getpeername", GetPeerName),
		206: syscalls.Supported("sendto", SendTo),
		207: syscalls.Supported("recvfrom", RecvFrom),
		208: syscalls.Supported("setsockopt", SetSockOpt),
		209: syscalls.Supported("getsockopt", GetSockOpt),
		210: syscalls.Supported("shutdown", Shutdown),
		211: syscalls.Supported("sendmsg", SendMsg),
		212: syscalls.Supported("recvmsg", RecvMsg),
		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", linuxerr.EACCES, "Not available to user.", nil),
		218: syscalls.Error("request_key", linuxerr.EACCES, "Not available to user.", nil),
		219: syscalls.PartiallySupported("keyctl", Keyctl, "Only supports session keyrings with zero keys in them.", nil),
		220: syscalls.PartiallySupportedPoint("clone", Clone, PointClone, "Options CLONE_PIDFD, CLONE_NEWCGROUP, CLONE_PARENT, CLONE_NEWTIME, CLONE_CLEAR_SIGHAND, and CLONE_SYSVSEM not supported.", nil),
		221: syscalls.SupportedPoint("execve", Execve, PointExecve),
		222: syscalls.Supported("mmap", Mmap),
		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", linuxerr.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", linuxerr.ENODEV, "No support for perf counters", nil),
		242: syscalls.SupportedPoint("accept4", Accept4, PointAccept4),
		243: syscalls.Supported("recvmmsg", RecvMMsg),
		260: syscalls.Supported("wait4", Wait4),
		261: syscalls.SupportedPoint("prlimit64", Prlimit64, PointPrlimit64),
		262: syscalls.ErrorWithEvent("fanotify_init", linuxerr.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		263: syscalls.ErrorWithEvent("fanotify_mark", linuxerr.ENOSYS, "Needs CONFIG_FANOTIFY", nil),
		264: syscalls.Error("name_to_handle_at", linuxerr.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		265: syscalls.Error("open_by_handle_at", linuxerr.EOPNOTSUPP, "Not supported by gVisor filesystems", nil),
		266: syscalls.CapError("clock_adjtime", linux.CAP_SYS_TIME, "", nil),
		267: syscalls.Supported("syncfs", Syncfs),
		268: syscalls.Supported("setns", Setns),
		269: syscalls.Supported("sendmmsg", SendMMsg),
		270: syscalls.Supported("process_vm_readv", ProcessVMReadv),
		271: syscalls.Supported("process_vm_writev", ProcessVMWritev),
		272: syscalls.CapError("kcmp", linux.CAP_SYS_PTRACE, "", nil),
		273: syscalls.CapError("finit_module", linux.CAP_SYS_MODULE, "", nil),
		274: syscalls.ErrorWithEvent("sched_setattr", linuxerr.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		275: syscalls.ErrorWithEvent("sched_getattr", linuxerr.ENOSYS, "gVisor does not implement a scheduler.", []string{"gvisor.dev/issue/264"}),
		276: syscalls.Supported("renameat2", Renameat2),
		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.SupportedPoint("execveat", Execveat, PointExecveat),
		282: syscalls.ErrorWithEvent("userfaultfd", linuxerr.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", linuxerr.ENOSYS, "", nil),
		286: syscalls.SupportedPoint("preadv2", Preadv2, PointPreadv2),
		287: syscalls.SupportedPoint("pwritev2", Pwritev2, PointPwritev2),
		288: syscalls.ErrorWithEvent("pkey_mprotect", linuxerr.ENOSYS, "", nil),
		289: syscalls.ErrorWithEvent("pkey_alloc", linuxerr.ENOSYS, "", nil),
		290: syscalls.ErrorWithEvent("pkey_free", linuxerr.ENOSYS, "", nil),
		291: syscalls.Supported("statx", Statx),
		292: syscalls.ErrorWithEvent("io_pgetevents", linuxerr.ENOSYS, "", nil),
		293: syscalls.PartiallySupported("rseq", RSeq, "Not supported on all platforms.", nil),

		424: syscalls.ErrorWithEvent("pidfd_send_signal", linuxerr.ENOSYS, "", nil),
		425: syscalls.PartiallySupported("io_uring_setup", IOUringSetup, "Not all flags and functionality supported.", nil),
		426: syscalls.PartiallySupported("io_uring_enter", IOUringEnter, "Not all flags and functionality supported.", nil),
		427: syscalls.ErrorWithEvent("io_uring_register", linuxerr.ENOSYS, "", nil),
		428: syscalls.ErrorWithEvent("open_tree", linuxerr.ENOSYS, "", nil),
		429: syscalls.ErrorWithEvent("move_mount", linuxerr.ENOSYS, "", nil),
		430: syscalls.ErrorWithEvent("fsopen", linuxerr.ENOSYS, "", nil),
		431: syscalls.ErrorWithEvent("fsconfig", linuxerr.ENOSYS, "", nil),
		432: syscalls.ErrorWithEvent("fsmount", linuxerr.ENOSYS, "", nil),
		433: syscalls.ErrorWithEvent("fspick", linuxerr.ENOSYS, "", nil),
		434: syscalls.ErrorWithEvent("pidfd_open", linuxerr.ENOSYS, "", nil),
		435: syscalls.PartiallySupported("clone3", Clone3, "Options CLONE_PIDFD, CLONE_NEWCGROUP, CLONE_INTO_CGROUP, CLONE_NEWTIME, CLONE_CLEAR_SIGHAND, CLONE_PARENT, CLONE_SYSVSEM and clone_args.set_tid are not supported.", nil),
		436: syscalls.Supported("close_range", CloseRange),
		439: syscalls.Supported("faccessat2", Faccessat2),
		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, sysno)
		return 0, linuxerr.ENOSYS
	},
}

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

Functions

func AFSSyscall

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

AFSSyscall is a gVisor specific implementation of afs_syscall: - if TESTONLY-afs-syscall-panic flag is set it triggers a panic.

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

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

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 Linux syscall chdir(2).

func Chmod

Chmod implements Linux syscall chmod(2).

func Chown

Chown implements Linux syscall chown(2).

func Chroot

Chroot implements Linux syscall chroot(2).

func ClockGetres

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

ClockGetres implements linux syscall clock_getres(2).

func ClockGettime

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

ClockGettime implements linux syscall clock_gettime(2).

func ClockNanosleep

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

ClockNanosleep implements linux syscall clock_nanosleep(2).

func ClockSettime

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

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 Clone3

Clone3 implements linux syscall clone3(2).

func Close

Close implements Linux syscall close(2).

func CloseRange

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

CloseRange implements linux syscall close_range(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 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

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

EpollCreate implements Linux syscall epoll_create(2).

func EpollCreate1

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

EpollCreate1 implements Linux syscall epoll_create1(2).

func EpollCtl

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

EpollCtl implements Linux syscall epoll_ctl(2).

func EpollPwait

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

EpollPwait implements Linux syscall epoll_pwait(2).

func EpollPwait2

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

EpollPwait2 implements Linux syscall epoll_pwait(2).

func EpollWait

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

EpollWait implements Linux syscall epoll_wait(2).

func Eventfd

Eventfd implements linux syscall eventfd(2).

func Eventfd2

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

Eventfd2 implements linux syscall eventfd2(2).

func Execve

Execve implements linux syscall execve(2).

func Execveat

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

Execveat implements linux syscall execveat(2).

func Exit

Exit implements linux syscall exit(2).

func ExitGroup

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

ExitGroup implements linux syscall exit_group(2).

func Faccessat

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

Faccessat implements Linux syscall faccessat(2).

func Faccessat2

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

Faccessat2 implements Linux syscall faccessat2(2).

func Fadvise64

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

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

func Fallocate

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

Fallocate implements linux system call fallocate(2).

func Fchdir

Fchdir implements Linux syscall fchdir(2).

func Fchmod

Fchmod implements Linux syscall fchmod(2).

func Fchmodat

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

Fchmodat implements Linux syscall fchmodat(2).

func Fchown

Fchown implements Linux syscall fchown(2).

func Fchownat

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

Fchownat implements Linux syscall fchownat(2).

func Fcntl

Fcntl implements linux syscall fcntl(2).

func Fdatasync

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

Fdatasync implements Linux syscall fdatasync(2).

func Fgetxattr

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

Fgetxattr implements Linux syscall fgetxattr(2).

func Flistxattr

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

Flistxattr implements Linux syscall flistxattr(2).

func Flock

Flock implements linux syscall flock(2).

func Fork

Fork implements Linux syscall fork(2).

func Fremovexattr

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

Fremovexattr implements Linux syscall fremovexattr(2).

func Fsetxattr

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

Fsetxattr implements Linux syscall fsetxattr(2).

func Fstat

Fstat implements Linux syscall fstat(2).

func Fstatfs

Fstatfs implements Linux syscall fstatfs(2).

func Fsync

Fsync implements Linux syscall fsync(2).

func Ftruncate

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

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

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

Futimesat implements Linux syscall futimesat(2).

func GetMempolicy

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

GetMempolicy implements the syscall get_mempolicy(2).

func GetPeerName

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

GetPeerName implements the linux syscall getpeername(2).

func GetRandom

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

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, sysno uintptr, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

GetRobustList implements linux syscall get_robust_list(2).

func GetSockName

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

GetSockName implements the linux syscall getsockname(2).

func GetSockOpt

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

GetSockOpt implements the linux syscall getsockopt(2).

func GetXattr

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

GetXattr implements Linux syscall getxattr(2).

func Getcpu

Getcpu implements linux syscall getcpu(2).

func Getcwd

Getcwd implements Linux syscall getcwd(2).

func Getdents

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

Getdents implements Linux syscall getdents(2).

func Getdents64

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

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

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

Getgroups implements the Linux syscall getgroups.

func Getitimer

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

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

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

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

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

func Getresgid

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

Getresgid implements the Linux syscall getresgid.

func Getresuid

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

Getresuid implements the Linux syscall getresuid.

func Getrlimit

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

Getrlimit implements linux syscall getrlimit(2).

func Getrusage

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

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, sysno uintptr, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

Gettimeofday implements linux syscall gettimeofday(2).

func Getuid

Getuid implements the Linux syscall getuid.

func HandleIOError

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

HandleIOError 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 IOUringEnter

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

IOUringEnter implements linux syscall io_uring_enter(2).

func IOUringSetup

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

IOUringSetup implements linux syscall io_uring_setup(2).

func InotifyAddWatch

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

InotifyAddWatch implements the inotify_add_watch() syscall.

func InotifyInit

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

InotifyInit implements the inotify_init() syscalls.

func InotifyInit1

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

InotifyInit1 implements the inotify_init1() syscalls.

func InotifyRmWatch

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

InotifyRmWatch implements the inotify_rm_watch() syscall.

func IoCancel

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

IoCancel implements linux syscall io_cancel(2).

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

func IoDestroy

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

IoDestroy implements linux syscall io_destroy(2).

func IoGetevents

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

IoGetevents implements linux syscall io_getevents(2).

func IoSetup

IoSetup implements linux syscall io_setup(2).

func IoSubmit

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

IoSubmit implements linux syscall io_submit(2).

func Ioctl

Ioctl implements Linux syscall ioctl(2).

func Keyctl

Keyctl implements Linux syscall keyctl(2).

func Kill

Kill implements linux syscall kill(2).

func Lchown

Lchown implements Linux syscall lchown(2).

func Lgetxattr

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

Lgetxattr implements Linux syscall lgetxattr(2).

Link implements Linux syscall link(2).

func Linkat

Linkat implements Linux syscall linkat(2).

func ListXattr

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

ListXattr implements Linux syscall listxattr(2).

func Listen

Listen implements the linux syscall listen(2).

func Llistxattr

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

Llistxattr implements Linux syscall llistxattr(2).

func Lremovexattr

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

Lremovexattr implements Linux syscall lremovexattr(2).

func Lseek

Lseek implements Linux syscall lseek(2).

func Lsetxattr

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

Lsetxattr implements Linux syscall lsetxattr(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

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

Membarrier implements syscall membarrier(2).

func MemfdCreate

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

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 Linux syscall mknod(2).

func Mknodat

Mknodat implements Linux syscall mknodat(2).

func Mlock

Mlock implements linux syscall mlock(2).

func Mlock2

Mlock2 implements linux syscall mlock2(2).

func Mlockall

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

Mlockall implements linux syscall mlockall(2).

func Mmap

Mmap implements Linux syscall mmap(2).

func Mount

Mount implements Linux syscall mount(2).

func Mprotect

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

Mprotect implements linux syscall mprotect(2).

func MqOpen

MqOpen implements mq_open(2).

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

MqUnlink implements mq_unlink(2).

func Mremap

Mremap implements linux syscall mremap(2).

func Msgctl

Msgctl implements msgctl(2).

func Msgget

Msgget implements msgget(2).

func Msgrcv

Msgrcv implements msgrcv(2).

func Msgsnd

Msgsnd implements msgsnd(2).

func Msync

Msync implements Linux syscall msync(2).

func Munlock

Munlock implements linux syscall munlock(2).

func Munlockall

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

Munlockall implements linux syscall munlockall(2).

func Munmap

Munmap implements linux syscall munmap(2).

func Nanosleep

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

Nanosleep implements linux syscall Nanosleep(2).

func Newfstatat

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

Newfstatat implements Linux syscall newfstatat, which backs fstatat(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 PivotRoot

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

PivotRoot implements Linux syscall pivot_root(2).

func PointAccept

func PointAccept(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointAccept converts accept(2) syscall to proto.

func PointAccept4

func PointAccept4(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointAccept4 converts accept4(2) syscall to proto.

func PointBind

func PointBind(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointBind converts bind(2) syscall to proto.

func PointChdir

func PointChdir(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointChdir calls pointChdirHelper to convert chdir(2) syscall to proto.

func PointChroot

func PointChroot(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointChroot converts chroot(2) syscall to proto.

func PointClone

func PointClone(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointClone converts clone(2) syscall to proto.

func PointClose

func PointClose(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointClose converts close(2) syscall to proto.

func PointConnect

func PointConnect(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointConnect converts connect(2) syscall to proto.

func PointCreat

func PointCreat(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointCreat converts creat(2) syscall to proto.

func PointDup

func PointDup(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointDup calls pointDupHelper to convert dup(2) syscall to proto.

func PointDup2

func PointDup2(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointDup2 calls pointDupHelper to convert dup2(2) syscall to proto.

func PointDup3

func PointDup3(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointDup3 calls pointDupHelper to convert dup3(2) syscall to proto.

func PointEventfd

func PointEventfd(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointEventfd calls pipeHelper to convert eventfd(2) syscall to proto.

func PointEventfd2

func PointEventfd2(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointEventfd2 calls pipeHelper to convert eventfd2(2) syscall to proto.

func PointExecve

func PointExecve(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointExecve converts execve(2) syscall to proto.

func PointExecveat

func PointExecveat(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointExecveat converts execveat(2) syscall to proto.

func PointFchdir

func PointFchdir(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointFchdir calls pointChdirHelper to convert fchdir(2) syscall to proto.

func PointFcntl

func PointFcntl(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointFcntl converts fcntl(2) syscall to proto.

func PointFork

func PointFork(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointFork converts fork(2) syscall to proto.

func PointInotifyAddWatch

func PointInotifyAddWatch(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointInotifyAddWatch converts inotify_add_watch(2) syscall to proto.

func PointInotifyInit

func PointInotifyInit(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointInotifyInit converts inotify_init(2) syscall to proto.

func PointInotifyInit1

func PointInotifyInit1(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointInotifyInit1 converts inotify_init1(2) syscall to proto.

func PointInotifyRmWatch

func PointInotifyRmWatch(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointInotifyRmWatch converts inotify_add_watch(2) syscall to proto.

func PointOpen

func PointOpen(t *kernel.Task, _ seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointOpen converts open(2) syscall to proto.

func PointOpenat

func PointOpenat(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointOpenat converts openat(2) syscall to proto.

func PointPipe

func PointPipe(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPipe calls pipeHelper to convert pipe(2) syscall to proto.

func PointPipe2

func PointPipe2(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPipe2 calls pipeHelper to convert pipe2(2) syscall to proto.

func PointPread64

func PointPread64(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPread64 converts pread64(2) syscall to proto.

func PointPreadv

func PointPreadv(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPreadv converts preadv(2) syscall to proto.

func PointPreadv2

func PointPreadv2(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPreadv2 converts preadv2(2) syscall to proto.

func PointPrlimit64

func PointPrlimit64(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPrlimit64 call converts prlimit64(2) syscall to proto.

func PointPwrite64

func PointPwrite64(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPwrite64 converts pwrite64(2) syscall to proto.

func PointPwritev

func PointPwritev(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPwritev converts pwritev(2) syscall to proto.

func PointPwritev2

func PointPwritev2(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointPwritev2 converts pwritev2(2) syscall to proto.

func PointRead

func PointRead(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointRead converts read(2) syscall to proto.

func PointReadv

func PointReadv(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointReadv converts readv(2) syscall to proto.

func PointSetgid

func PointSetgid(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSetgid calls pointSetidHelper to convert setgid(2) syscall to proto.

func PointSetresgid

func PointSetresgid(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSetresgid calls pointSetresidHelper to convert setresgid(2) syscall to proto.

func PointSetresuid

func PointSetresuid(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSetresuid calls pointSetresidHelper to convert setresuid(2) syscall to proto.

func PointSetsid

func PointSetsid(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSetsid calls pointSetidHelper to convert setsid(2) syscall to proto.

func PointSetuid

func PointSetuid(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSetuid calls pointSetidHelper to convert setuid(2) syscall to proto.

func PointSignalfd

func PointSignalfd(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSignalfd calls signalfdHelper to convert signalfd(2) syscall to proto.

func PointSignalfd4

func PointSignalfd4(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSignalfd4 calls signalfdHelper to convert signalfd4(2) syscall to proto.

func PointSocket

func PointSocket(_ *kernel.Task, _ seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSocket converts socket(2) syscall to proto.

func PointSocketpair

func PointSocketpair(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointSocketpair converts socketpair(2) syscall to proto.

func PointTimerfdCreate

func PointTimerfdCreate(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointTimerfdCreate converts timerfd_create(2) syscall to proto.

func PointTimerfdGettime

func PointTimerfdGettime(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointTimerfdGettime converts timerfd_gettime(2) syscall to proto.

func PointTimerfdSettime

func PointTimerfdSettime(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointTimerfdSettime converts timerfd_settime(2) syscall to proto.

func PointVfork

func PointVfork(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointVfork converts vfork(2) syscall to proto.

func PointWrite

func PointWrite(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointWrite converts write(2) syscall to proto.

func PointWritev

func PointWritev(t *kernel.Task, fields seccheck.FieldSet, cxtData *pb.ContextData, info kernel.SyscallInfo) (proto.Message, pb.MessageType)

PointWritev converts writev(2) syscall to proto.

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

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

Prlimit64 implements linux syscall prlimit64(2).

func ProcessVMReadv

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

ProcessVMReadv implements process_vm_readv(2).

func ProcessVMWritev

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

ProcessVMWritev implements process_vm_writev(2).

func Pselect6

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

Pselect6 implements linux syscall pselect6(2).

func Ptrace

Ptrace implements linux system call ptrace(2).

func Pwrite64

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

Pwrite64 implements Linux syscall pwrite64(2).

func Pwritev

Pwritev implements Linux syscall pwritev(2).

func Pwritev2

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

Pwritev2 implements Linux syscall pwritev2(2).

func RSeq

RSeq implements syscall rseq(2).

func Read

Read implements Linux syscall read(2).

func Readahead

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

Readahead implements readahead(2).

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

Readlink implements Linux syscall readlink(2).

func Readlinkat

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

Readlinkat implements Linux syscall readlinkat(2).

func Readv

Readv implements Linux syscall readv(2).

func RecvFrom

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

RecvFrom implements the linux syscall recvfrom(2).

func RecvMMsg

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

RecvMMsg implements the linux syscall recvmmsg(2).

func RecvMsg

RecvMsg implements the linux syscall recvmsg(2).

func RemoveXattr

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

RemoveXattr implements Linux syscall removexattr(2).

func Rename

Rename implements Linux syscall rename(2).

func Renameat

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

Renameat implements Linux syscall renameat(2).

func Renameat2

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

Renameat2 implements Linux syscall renameat2(2).

func RestartSyscall

func RestartSyscall(t *kernel.Task, sysno uintptr, 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

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

RtSigaction implements linux syscall rt_sigaction(2).

func RtSigpending

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

RtSigpending implements linux syscall rt_sigpending(2).

func RtSigprocmask

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

RtSigprocmask implements linux syscall rt_sigprocmask(2).

func RtSigqueueinfo

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

RtSigqueueinfo implements linux syscall rt_sigqueueinfo(2).

func RtSigreturn

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

RtSigreturn implements linux syscall rt_sigreturn(2).

func RtSigsuspend

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

RtSigsuspend implements linux syscall rt_sigsuspend(2).

func RtSigtimedwait

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

RtSigtimedwait implements linux syscall rt_sigtimedwait(2).

func RtTgsigqueueinfo

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

RtTgsigqueueinfo implements linux syscall rt_tgsigqueueinfo(2).

func SchedGetPriorityMax

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

SchedGetPriorityMax implements linux syscall sched_get_priority_max(2).

func SchedGetPriorityMin

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

SchedGetPriorityMin implements linux syscall sched_get_priority_min(2).

func SchedGetaffinity

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

SchedGetaffinity implements linux syscall sched_getaffinity(2).

func SchedGetparam

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

SchedGetparam implements linux syscall sched_getparam(2).

func SchedGetscheduler

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

SchedGetscheduler implements linux syscall sched_getscheduler(2).

func SchedSetaffinity

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

SchedSetaffinity implements linux syscall sched_setaffinity(2).

func SchedSetscheduler

func SchedSetscheduler(t *kernel.Task, sysno uintptr, 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

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

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

func SendMMsg

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

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

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

Sendfile implements linux system call sendfile(2).

func SetAFSSyscallPanic

func SetAFSSyscallPanic(v bool)

SetAFSSyscallPanic sets the panic behaviour of afs_syscall. Should only be called based on the config value of TESTONLY-afs-syscall-panic.

func SetMempolicy

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

SetMempolicy implements the syscall set_mempolicy(2).

func SetRobustList

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

SetRobustList implements linux syscall set_robust_list(2).

func SetSockOpt

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

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, sysno uintptr, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error)

SetTidAddress implements linux syscall set_tid_address(2).

func SetXattr

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

SetXattr implements Linux syscall setxattr(2).

func Setdomainname

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

Setdomainname implements Linux syscall setdomainname.

func Setgid

Setgid implements the Linux syscall setgid.

func Setgroups

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

Setgroups implements the Linux syscall setgroups.

func Sethostname

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

Sethostname implements Linux syscall sethostname.

func Setitimer

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

Setitimer implements linux syscall setitimer(2).

func Setns

Setns implements linux syscall setns(2).

func Setpgid

Setpgid implements the linux syscall setpgid(2).

func Setpriority

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

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

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

func Setregid

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

Setregid implements the Linux syscall setregid.

func Setresgid

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

Setresgid implements the Linux syscall setregid.

func Setresuid

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

Setresuid implements the Linux syscall setreuid.

func Setreuid

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

Setreuid implements the Linux syscall setreuid.

func Setrlimit

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

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

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

Shutdown implements the linux syscall shutdown(2).

func Sigaltstack

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

Sigaltstack implements linux syscall sigaltstack(2).

func Signalfd

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

Signalfd implements the linux syscall signalfd(2).

func Signalfd4

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

Signalfd4 implements the linux syscall signalfd4(2).

func Sigreturn

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

Sigreturn implements linux syscall sigreturn(2).

func Socket

Socket implements the linux syscall socket(2).

func SocketPair

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

SocketPair implements the linux syscall socketpair(2).

func Splice

Splice implements Linux syscall 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

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

Symlinkat implements Linux syscall symlinkat(2).

func Sync

Sync implements Linux syscall sync(2).

func SyncFileRange

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

SyncFileRange implements Linux syscall sync_file_range(2).

func Syncfs

Syncfs implements Linux syscall syncfs(2).

func Sysinfo

Sysinfo implements Linux syscall sysinfo(2).

func Syslog

Syslog implements part of Linux syscall syslog.

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

func Tee

Tee implements Linux syscall tee(2).

func Tgkill

Tgkill implements linux syscall tgkill(2).

func Time

Time implements linux syscall time(2).

func TimerCreate

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

TimerCreate implements linux syscall timer_create(2).

func TimerDelete

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

TimerDelete implements linux syscall timer_delete(2).

func TimerGetoverrun

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

TimerGetoverrun implements linux syscall timer_getoverrun(2).

func TimerGettime

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

TimerGettime implements linux syscall timer_gettime(2).

func TimerSettime

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

TimerSettime implements linux syscall timer_settime(2).

func TimerfdCreate

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

TimerfdCreate implements Linux syscall timerfd_create(2).

func TimerfdGettime

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

TimerfdGettime implements Linux syscall timerfd_gettime(2).

func TimerfdSettime

func TimerfdSettime(t *kernel.Task, sysno uintptr, 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

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

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

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

Unlinkat implements Linux syscall unlinkat(2).

func Unshare

Unshare implements linux syscall unshare(2).

func Utime

Utime implements Linux syscall utime(2).

func Utimensat

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

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

type SchedParam

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

SchedParam replicates struct sched_param in sched.h.

+marshal

Jump to

Keyboard shortcuts

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