occlum/ngo

Track how close are we towards matching the upstream Occlum

tatetian opened this issue · 4 comments

This issue tracks NGO's progress towards matching the functionalities of the upstream Occlum (0.21.0, released on March 3rd, 2021). We quantify the progress in two metrics:

  • Unit tests: the number of unit tests that can pass in NGO versus the one in Occlum.
  • System calls: the number of system calls implemented in NGo versus the one in Occlum.

Currently, the values of the two metrics are

  • Unit tests: 26/45
  • System calls: 87/129.

Read the sections below for more details.

Unit tests

Here is the list of unit tests in NGO. An item is checked if the unit test (at least partially) pass in NGO.

  • access
  • chmod
  • chown
  • cout
  • cpuid
  • device
  • empty
  • emulate_syscall
  • env
  • eventfd
  • exit_group
  • fcntl
  • file
  • fs_perms
  • getpid
  • hello_world
  • hostfs
  • ioctl
  • link
  • malloc
  • mkdir
  • mmap
  • open
  • pipe
  • prctl
  • procfs
  • pthread
  • rdtsc
  • readdir
  • rename
  • rlimit
  • sched
  • server
  • server_epoll
  • signal
  • sleep
  • spawn
  • stat
  • symlink
  • sysinfo
  • time
  • tls
  • truncate
  • uname
  • unix_socket

System calls

Here we list all system calls that are supported in upstream Occlum, but not in NGO, at the time of writing this issue. We keep updating the progress in implementing the missing system calls.

Network-related syscalls (0/12)

(Getsockname = 51) => do_getsockname(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
(Getsockopt = 55) => do_getsockopt(fd: c_int, level: c_int, optname: c_int, optval: *mut c_void, optlen: *mut libc::socklen_t),
(Getpeername = 52) => do_getpeername(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
(Socketpair = 53) => do_socketpair(domain: c_int, socket_type: c_int, protocol: c_int, sv: *mut c_int),
(Sigaltstack = 131) => do_sigaltstack(ss: *const stack_t, old_ss: *mut stack_t, context: *const CpuContext),
(Shutdown = 48) => do_shutdown(fd: c_int, how: c_int),
(Setsockopt = 54) => do_setsockopt(fd: c_int, level: c_int, optname: c_int, optval: *const c_void, optlen: libc::socklen_t),
(Sendfile = 40) => do_sendfile(out_fd: FileDesc, in_fd: FileDesc, offset_ptr: *mut off_t, count: usize),
(Sendmsg = 46) => do_sendmsg(fd: c_int, msg_ptr: *const msghdr, flags_c: c_int),
(Sendto = 44) => do_sendto(fd: c_int, base: *const c_void, len: size_t, flags: c_int, addr: *const libc::sockaddr, addr_len: libc::socklen_t),
(Recvfrom = 45) => do_recvfrom(fd: c_int, base: *mut c_void, len: size_t, flags: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
(Recvmsg = 47) => do_recvmsg(fd: c_int, msg_mut_ptr: *mut msghdr_mut, flags_c: c_int),

Poll-related syscalls (0/7)

(EpollCreate = 213) => do_epoll_create(size: c_int),
(EpollCreate1 = 291) => do_epoll_create1(flags: c_int),
(EpollCtl = 233) => do_epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *const libc::epoll_event),
(EpollPwait = 281) => do_epoll_pwait(epfd: c_int, events: *mut libc::epoll_event, maxevents: c_int, timeout: c_int, sigmask: *const usize),
(EpollWait = 232) => do_epoll_wait(epfd: c_int, events: *mut libc::epoll_event, maxevents: c_int, timeout: c_int),

(Select = 23) => do_select(nfds: c_int, readfds: *mut libc::fd_set, writefds: *mut libc::fd_set, exceptfds: *mut libc::fd_set, timeout: *mut timeval_t),

(Poll = 7) => do_poll(fds: *mut libc::pollfd, nfds: libc::nfds_t, timeout: c_int),

FS-related syscalls (0/4)

(Ioctl = 16) => do_ioctl(fd: FileDesc, cmd: u32, argp: *mut u8),
(Fallocate = 285) => do_fallocate(fd: FileDesc, mode: u32, offset: off_t, len: off_t),
(Fcntl = 72) => do_fcntl(fd: FileDesc, cmd: u32, arg: u64),
(Getdents64 = 217) => do_getdents64(fd: FileDesc, buf: *mut u8, buf_size: usize),

User/group-related syscalls (0/4)

(Getegid = 108) => do_getegid(),
(Geteuid = 107) => do_geteuid(),
(Getgid = 104) => do_getgid(),
(Getpgid = 121) => do_getpgid(),

Sched-related syscalls (0/3)

(SchedGetaffinity = 204) => do_sched_getaffinity(pid: pid_t, cpusize: size_t, buf: *mut c_uchar),
(SchedSetaffinity = 203) => do_sched_setaffinity(pid: pid_t, cpusize: size_t, buf: *const c_uchar),
(Nanosleep = 35) => do_nanosleep(req_u: *const timespec_t, rem_u: *mut timespec_t),

Misc syscalls (0/3)

(Prctl = 157) => do_prctl(option: i32, arg2: u64, arg3: u64, arg4: u64, arg5: u64),
(SysInfo = 99) => do_sysinfo(info: *mut sysinfo_t),
(Uname = 63) => do_uname(name: *mut utsname_t),

Unit tests: 28/45

  • New: sleep / sched

System calls: 91/129

  • New: nanosleep / schedsetaffinity / schedgetaffinity / getcpu

NGO Syscalls Lists (compared with occlum v0.17, date: 2021.08.09) :

(Read = 0) => do_read(fd: FileDesc, buf: *mut u8, size: usize),
(Write = 1) => do_write(fd: FileDesc, buf: *const u8, size: usize),
(Open = 2) => do_open(path: *const i8, flags: u32, mode: u32),
(Close = 3) => do_close(fd: FileDesc),
(Stat = 4) => do_stat(path: *const i8, stat_buf: *mut StatBuf),
(Fstat = 5) => do_fstat(fd: FileDesc, stat_buf: *mut StatBuf),
(Lstat = 6) => do_lstat(path: *const i8, stat_buf: *mut StatBuf),
// (Poll = 7) => do_poll(fds: *mut libc::pollfd, nfds: libc::nfds_t, timeout: c_
(Lseek = 8) => do_lseek(fd: FileDesc, offset: off_t, whence: i32),
(Mmap = 9) => do_mmap(addr: usize, size: usize, perms: i32, flags: i32, fd: File
(Mprotect = 10) => do_mprotect(addr: usize, len: usize, prot: u32),
(Munmap = 11) => do_munmap(addr: usize, size: usize),
(Brk = 12) => do_brk(new_brk_addr: usize),
(RtSigaction = 13) => do_rt_sigaction(signum_c: c_int, new_sa_c: *const sigactio
(RtSigprocmask = 14) => do_rt_sigprocmask(how: c_int, set: *const sigset_t, olds
(RtSigreturn = 15) => do_rt_sigreturn(),
// (Ioctl = 16) => do_ioctl(fd: FileDesc, cmd: u32, argp: *mut u8),
(Pread64 = 17) => do_pread(fd: FileDesc, buf: *mut u8, size: usize, offset: off_
(Pwrite64 = 18) => do_pwrite(fd: FileDesc, buf: *const u8, size: usize, offset: 
(Readv = 19) => do_readv(fd: FileDesc, iov: *mut iovec_t, count: i32),
(Writev = 20) => do_writev(fd: FileDesc, iov: *const iovec_t, count: i32),
(Access = 21) => do_access(path: *const i8, mode: u32),
(Pipe = 22) => do_pipe(fds_u: *mut i32),
// (Select = 23) => do_select(nfds: c_int, readfds: *mut libc::fd_set, writefds:
(SchedYield = 24) => do_sched_yield(),
(Mremap = 25) => do_mremap(old_addr: usize, old_size: usize, new_size: usize, fl
(Msync = 26) => do_msync(addr: usize, size: usize, flags: u32),
(Mincore = 27) => handle_unsupported(),
(Madvise = 28) => handle_unsupported(),
(Shmget = 29) => handle_unsupported(),
(Shmat = 30) => handle_unsupported(),
(Shmctl = 31) => handle_unsupported(),
(Dup = 32) => do_dup(old_fd: FileDesc),
(Dup2 = 33) => do_dup2(old_fd: FileDesc, new_fd: FileDesc),
(Pause = 34) => handle_unsupported(),
(Nanosleep = 35) => do_nanosleep(req_u: *const timespec_t, rem_u: *mut timesp
(Getitimer = 36) => handle_unsupported(),
(Alarm = 37) => handle_unsupported(),
(Setitimer = 38) => handle_unsupported(),
(Getpid = 39) => do_getpid(),
// (Sendfile = 40) => do_sendfile(out_fd: FileDesc, in_fd: FileDesc, offset_ptr:
(Socket = 41) => do_socket(domain: c_int, socket_type: c_int, protocol: c_int),
(Connect = 42) => do_connect(fd: c_int, addr: *const libc::sockaddr, addr_len: l
(Accept = 43) => do_accept(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut 
// (Sendto = 44) => do_sendto(fd: c_int, base: *const c_void, len: size_t, flags
// (Recvfrom = 45) => do_recvfrom(fd: c_int, base: *mut c_void, len: size_t, fla
// (Sendmsg = 46) => do_sendmsg(fd: c_int, msg_ptr: *const msghdr, flags_c: c_in
// (Recvmsg = 47) => do_recvmsg(fd: c_int, msg_mut_ptr: *mut msghdr_mut, flags_c
// (Shutdown = 48) => do_shutdown(fd: c_int, how: c_int),
(Bind = 49) => do_bind(fd: c_int, addr: *const libc::sockaddr, addr_len: libc::s
(Listen = 50) => do_listen(fd: c_int, backlog: c_int),
// (Getsockname = 51) => do_getsockname(fd: c_int, addr: *mut libc::sockaddr, ad
// (Getpeername = 52) => do_getpeername(fd: c_int, addr: *mut libc::sockaddr, ad
// (Socketpair = 53) => do_socketpair(domain: c_int, socket_type: c_int, protoco
// (Setsockopt = 54) => do_setsockopt(fd: c_int, level: c_int, optname: c_int, o
// (Getsockopt = 55) => do_getsockopt(fd: c_int, level: c_int, optname: c_int, o
(Clone = 56) => do_clone(flags: u32, stack_addr: usize, ptid: *mut pid_t, ctid: 
(Fork = 57) => handle_unsupported(),
(Vfork = 58) => handle_unsupported(),
(Execve = 59) => handle_unsupported(),
(Exit = 60) => do_exit(exit_status: i32),
(Wait4 = 61) => do_wait4(pid: i32, _exit_status: *mut i32),
(Kill = 62) => do_kill(pid: i32, sig: c_int),
// (Uname = 63) => do_uname(name: *mut utsname_t),
(Semget = 64) => handle_unsupported(),
(Semop = 65) => handle_unsupported(),
(Semctl = 66) => handle_unsupported(),
(Shmdt = 67) => handle_unsupported(),
(Msgget = 68) => handle_unsupported(),
(Msgsnd = 69) => handle_unsupported(),
(Msgrcv = 70) => handle_unsupported(),
(Msgctl = 71) => handle_unsupported(),
// (Fcntl = 72) => do_fcntl(fd: FileDesc, cmd: u32, arg: u64),
(Flock = 73) => handle_unsupported(),
(Fsync = 74) => do_fsync(fd: FileDesc),
(Fdatasync = 75) => do_fdatasync(fd: FileDesc),
(Truncate = 76) => do_truncate(path: *const i8, len: usize),
(Ftruncate = 77) => do_ftruncate(fd: FileDesc, len: usize),
// (Getdents = 78) => do_getdents(fd: FileDesc, buf: *mut u8, buf_size: usize),
(Getcwd = 79) => do_getcwd(buf: *mut u8, size: usize),
(Chdir = 80) => do_chdir(path: *const i8),
(Fchdir = 81) => handle_unsupported(),
(Rename = 82) => do_rename(oldpath: *const i8, newpath: *const i8),
(Mkdir = 83) => do_mkdir(path: *const i8, mode: usize),
(Rmdir = 84) => do_rmdir(path: *const i8),
(Creat = 85) => handle_unsupported(),
(Link = 86) => do_link(oldpath: *const i8, newpath: *const i8),
(Unlink = 87) => do_unlink(path: *const i8),
(Symlink = 88) => do_symlink(target: *const i8, link_path: *const i8),
(Readlink = 89) => do_readlink(path: *const i8, buf: *mut u8, size: usize),
(Chmod = 90) => do_chmod(path: *const i8, mode: u16),
(Fchmod = 91) => do_fchmod(fd: FileDesc, mode: u16),
(Chown = 92) => do_chown(path: *const i8, uid: u32, gid: u32),
(Fchown = 93) => do_fchown(fd: FileDesc, uid: u32, gid: u32),
(Lchown = 94) => do_lchown(path: *const i8, uid: u32, gid: u32),
(Umask = 95) => handle_unsupported(),
(Gettimeofday = 96) => do_gettimeofday(tv_u: *mut timeval_t),
(Getrlimit = 97) => handle_unsupported(),
(Getrusage = 98) => handle_unsupported(),
// (SysInfo = 99) => do_sysinfo(info: *mut sysinfo_t),
(Times = 100) => handle_unsupported(),
(Ptrace = 101) => handle_unsupported(),
// (Getuid = 102) => do_getuid(),
(SysLog = 103) => handle_unsupported(),
// (Getgid = 104) => do_getgid(),
(Setuid = 105) => handle_unsupported(),
(Setgid = 106) => handle_unsupported(),
// (Geteuid = 107) => do_geteuid(),
// (Getegid = 108) => do_getegid(),
(Setpgid = 109) => handle_unsupported(),
(Getppid = 110) => do_getppid(),
(Getpgrp = 111) => handle_unsupported(),
(Setsid = 112) => handle_unsupported(),
(Setreuid = 113) => handle_unsupported(),
(Setregid = 114) => handle_unsupported(),
(Getgroups = 115) => handle_unsupported(),
(Setgroups = 116) => handle_unsupported(),
(Setresuid = 117) => handle_unsupported(),
(Getresuid = 118) => handle_unsupported(),
(Setresgid = 119) => handle_unsupported(),
(Getresgid = 120) => handle_unsupported(),
// (Getpgid = 121) => do_getpgid(),
(Setfsuid = 122) => handle_unsupported(),
(Setfsgid = 123) => handle_unsupported(),
(Getsid = 124) => handle_unsupported(),
(Capget = 125) => handle_unsupported(),
(Capset = 126) => handle_unsupported(),
(RtSigpending = 127) => do_rt_sigpending(buf_ptr: *mut sigset_t, buf_size: usize
(RtSigtimedwait = 128) => do_rt_sigtimedwait(mask_ptr: *const sigset_t, info_ptr
(RtSigqueueinfo = 129) => handle_unsupported(),
(RtSigsuspend = 130) => handle_unsupported(),
(Sigaltstack = 131) => do_sigaltstack(ss: *const stack_t, old_ss: *mut stack_t),
(Utime = 132) => handle_unsupported(),
(Mknod = 133) => handle_unsupported(),
(Uselib = 134) => handle_unsupported(),
(Personality = 135) => handle_unsupported(),
(Ustat = 136) => handle_unsupported(),
(Statfs = 137) => handle_unsupported(),
(Fstatfs = 138) => handle_unsupported(),
(SysFs = 139) => handle_unsupported(),
(Getpriority = 140) => handle_unsupported(),
(Setpriority = 141) => handle_unsupported(),
(SchedSetparam = 142) => handle_unsupported(),
(SchedGetparam = 143) => handle_unsupported(),
(SchedSetscheduler = 144) => handle_unsupported(),
(SchedGetscheduler = 145) => handle_unsupported(),
(SchedGetPriorityMax = 146) => handle_unsupported(),
(SchedGetPriorityMin = 147) => handle_unsupported(),
(SchedRrGetInterval = 148) => handle_unsupported(),
(Mlock = 149) => handle_unsupported(),
(Munlock = 150) => handle_unsupported(),
(Mlockall = 151) => handle_unsupported(),
(Munlockall = 152) => handle_unsupported(),
(Vhangup = 153) => handle_unsupported(),
(ModifyLdt = 154) => handle_unsupported(),
(PivotRoot = 155) => handle_unsupported(),
(SysCtl = 156) => handle_unsupported(),
// (Prctl = 157) => do_prctl(option: i32, arg2: u64, arg3: u64, arg4: u64, arg5:
(ArchPrctl = 158) => do_arch_prctl(code: u32, addr: *mut usize),
(Adjtimex = 159) => handle_unsupported(),
(Setrlimit = 160) => handle_unsupported(),
(Chroot = 161) => handle_unsupported(),
(Sync = 162) => do_sync(),
(Acct = 163) => handle_unsupported(),
(Settimeofday = 164) => handle_unsupported(),
(Mount = 165) => handle_unsupported(),
(Umount2 = 166) => handle_unsupported(),
(Swapon = 167) => handle_unsupported(),
(Swapoff = 168) => handle_unsupported(),
(Reboot = 169) => handle_unsupported(),
(Sethostname = 170) => handle_unsupported(),
(Setdomainname = 171) => handle_unsupported(),
(Iopl = 172) => handle_unsupported(),
(Ioperm = 173) => handle_unsupported(),
(CreateModule = 174) => handle_unsupported(),
(InitModule = 175) => handle_unsupported(),
(DeleteModule = 176) => handle_unsupported(),
(GetKernelSyms = 177) => handle_unsupported(),
(QueryModule = 178) => handle_unsupported(),
(Quotactl = 179) => handle_unsupported(),
(Nfsservctl = 180) => handle_unsupported(),
(Getpmsg = 181) => handle_unsupported(),
(Putpmsg = 182) => handle_unsupported(),
(AfsSysCall = 183) => handle_unsupported(),
(Tuxcall = 184) => handle_unsupported(),
(Security = 185) => handle_unsupported(),
// (Gettid = 186) => do_gettid(),
(Readahead = 187) => handle_unsupported(),
(Setxattr = 188) => handle_unsupported(),
(Lsetxattr = 189) => handle_unsupported(),
(Fsetxattr = 190) => handle_unsupported(),
(Getxattr = 191) => handle_unsupported(),
(Lgetxattr = 192) => handle_unsupported(),
(Fgetxattr = 193) => handle_unsupported(),
(Listxattr = 194) => handle_unsupported(),
(Llistxattr = 195) => handle_unsupported(),
(Flistxattr = 196) => handle_unsupported(),
(Removexattr = 197) => handle_unsupported(),
(Lremovexattr = 198) => handle_unsupported(),
(Fremovexattr = 199) => handle_unsupported(),
(Tkill = 200) => do_tkill(tid: pid_t, sig: c_int),
(Time = 201) => handle_unsupported(),
(Futex = 202) => do_futex(futex_addr: *const i32, futex_op: u32, futex_val: i32,
(SchedSetaffinity = 203) => do_sched_setaffinity(pid: pid_t, cpusize: size_t, bu
(SchedGetaffinity = 204) => do_sched_getaffinity(pid: pid_t, cpusize: size_t, bu
(SetThreadArea = 205) => handle_unsupported(),
(IoSetup = 206) => handle_unsupported(),
(IoDestroy = 207) => handle_unsupported(),
(IoGetevents = 208) => handle_unsupported(),
(IoSubmit = 209) => handle_unsupported(),
(IoCancel = 210) => handle_unsupported(),
(GetThreadArea = 211) => handle_unsupported(),
(LookupDcookie = 212) => handle_unsupported(),
// (EpollCreate = 213) => do_epoll_create(size: c_int),
(EpollCtlOld = 214) => handle_unsupported(),
(EpollWaitOld = 215) => handle_unsupported(),
(RemapFilePages = 216) => handle_unsupported(),
// (Getdents64 = 217) => do_getdents64(fd: FileDesc, buf: *mut u8, buf_size: usi
(SetTidAddress = 218) => do_set_tid_address(tidptr: *mut pid_t),
(RestartSysCall = 219) => handle_unsupported(),
(Semtimedop = 220) => handle_unsupported(),
(Fadvise64 = 221) => handle_unsupported(),
(TimerCreate = 222) => handle_unsupported(),
(TimerSettime = 223) => handle_unsupported(),
(TimerGettime = 224) => handle_unsupported(),
(TimerGetoverrun = 225) => handle_unsupported(),
(TimerDelete = 226) => handle_unsupported(),
(ClockSettime = 227) => handle_unsupported(),
(ClockGettime = 228) => do_clock_gettime(clockid: clockid_t, ts_u: *mut timespec
(ClockGetres = 229) => do_clock_getres(clockid: clockid_t, res_u: *mut timespec_
(ClockNanosleep = 230) => handle_unsupported(),
(ExitGroup = 231) => do_exit_group(exit_status: i32),
// (EpollWait = 232) => do_epoll_wait(epfd: c_int, events: *mut libc::epoll_even
// (EpollCtl = 233) => do_epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *c
(Tgkill = 234) => do_tgkill(pid: i32, tid: pid_t, sig: c_int),
(Utimes = 235) => handle_unsupported(),
(Vserver = 236) => handle_unsupported(),
(Mbind = 237) => handle_unsupported(),
(SetMempolicy = 238) => handle_unsupported(),
(GetMempolicy = 239) => handle_unsupported(),
(MqOpen = 240) => handle_unsupported(),
(MqUnlink = 241) => handle_unsupported(),
(MqTimedsend = 242) => handle_unsupported(),
(MqTimedreceive = 243) => handle_unsupported(),
(MqNotify = 244) => handle_unsupported(),
(MqGetsetattr = 245) => handle_unsupported(),
(KexecLoad = 246) => handle_unsupported(),
(Waitid = 247) => handle_unsupported(),
(AddKey = 248) => handle_unsupported(),
(RequestKey = 249) => handle_unsupported(),
(Keyctl = 250) => handle_unsupported(),
(IoprioSet = 251) => handle_unsupported(),
(IoprioGet = 252) => handle_unsupported(),
(InotifyInit = 253) => handle_unsupported(),
(InotifyAddWatch = 254) => handle_unsupported(),
(InotifyRmWatch = 255) => handle_unsupported(),
(MigratePages = 256) => handle_unsupported(),
(Openat = 257) => do_openat(dirfd: i32, path: *const i8, flags: u32, mode: u32),
(Mkdirat = 258) => do_mkdirat(dirfd: i32, path: *const i8, mode: usize),
(Mknodat = 259) => handle_unsupported(),
(Fchownat = 260) => do_fchownat(dirfd: i32, path: *const i8, uid: u32, gid: u32,
(Futimesat = 261) => handle_unsupported(),
(Fstatat = 262) => do_fstatat(dirfd: i32, path: *const i8, stat_buf: *mut StatBu
(Unlinkat = 263) => do_unlinkat(dirfd: i32, path: *const i8, flags: i32),
(Renameat = 264) => do_renameat(olddirfd: i32, oldpath: *const i8, newdirfd: i32
(Linkat = 265) => do_linkat(olddirfd: i32, oldpath: *const i8, newdirfd: i32, ne
(Symlinkat = 266) => do_symlinkat(target: *const i8, new_dirfd: i32, link_path: 
(Readlinkat = 267) => do_readlinkat(dirfd: i32, path: *const i8, buf: *mut u8, s
(Fchmodat = 268) => do_fchmodat(dirfd: i32, path: *const i8, mode: u16),
(Faccessat = 269) => do_faccessat(dirfd: i32, path: *const i8, mode: u32, flags:
(Pselect6 = 270) => handle_unsupported(),
(Ppoll = 271) => handle_unsupported(),
(Unshare = 272) => handle_unsupported(),
(SetRobustList = 273) => handle_unsupported(),
(GetRobustList = 274) => handle_unsupported(),
(Splice = 275) => handle_unsupported(),
(Tee = 276) => handle_unsupported(),
(SyncFileRange = 277) => handle_unsupported(),
(Vmsplice = 278) => handle_unsupported(),
(MovePages = 279) => handle_unsupported(),
(Utimensat = 280) => handle_unsupported(),
// (EpollPwait = 281) => do_epoll_pwait(epfd: c_int, events: *mut libc::epoll_ev
(Signalfd = 282) => handle_unsupported(),
(TimerfdCreate = 283) => handle_unsupported(),
(Eventfd = 284) => do_eventfd(init_val: u32),
(Fallocate = 285) => handle_unsupported(),
(TimerfdSettime = 286) => handle_unsupported(),
(TimerfdGettime = 287) => handle_unsupported(),
(Accept4 = 288) => do_accept4(fd: c_int, addr: *mut libc::sockaddr, addr_len: *m
(Signalfd4 = 289) => handle_unsupported(),
(Eventfd2 = 290) => do_eventfd2(init_val: u32, flags: i32),
// (EpollCreate1 = 291) => do_epoll_create1(flags: c_int),
(Dup3 = 292) => do_dup3(old_fd: FileDesc, new_fd: FileDesc, flags: u32),
(Pipe2 = 293) => do_pipe2(fds_u: *mut i32, flags: u32),
(InotifyInit1 = 294) => handle_unsupported(),
(Preadv = 295) => handle_unsupported(),
(Pwritev = 296) => handle_unsupported(),
(RtTgsigqueueinfo = 297) => handle_unsupported(),
(PerfEventOpen = 298) => handle_unsupported(),
(Recvmmsg = 299) => handle_unsupported(),
(FanotifyInit = 300) => handle_unsupported(),
(FanotifyMark = 301) => handle_unsupported(),
(Prlimit64 = 302) => do_prlimit(pid: pid_t, resource: u32, new_limit: *const rli
(NameToHandleAt = 303) => handle_unsupported(),
(OpenByHandleAt = 304) => handle_unsupported(),
(ClockAdjtime = 305) => handle_unsupported(),
(Syncfs = 306) => handle_unsupported(),
(Sendmmsg = 307) => handle_unsupported(),
(Setns = 308) => handle_unsupported(),
(Getcpu = 309) => do_getcpu(cpu_ptr: *mut u32, node_ptr: *mut u32),
(ProcessVmReadv = 310) => handle_unsupported(),
(ProcessVmWritev = 311) => handle_unsupported(),
(Kcmp = 312) => handle_unsupported(),
(FinitModule = 313) => handle_unsupported(),
(SchedSetattr = 314) => handle_unsupported(),
(SchedGetattr = 315) => handle_unsupported(),
(Renameat2 = 316) => handle_unsupported(),
(Seccomp = 317) => handle_unsupported(),
(Getrandom = 318) => handle_unsupported(),
(MemfdCreate = 319) => handle_unsupported(),
(KexecFileLoad = 320) => handle_unsupported(),
(Bpf = 321) => handle_unsupported(),
(Execveat = 322) => handle_unsupported(),
(Userfaultfd = 323) => handle_unsupported(),
(Membarrier = 324) => handle_unsupported(),
(Mlock2 = 325) => handle_unsupported(),

To Do:

  • (Poll = 7) => do_poll(fds: *mut libc::pollfd, nfds: libc::nfds_t, timeout: c_int),
  • (Ioctl = 16) => do_ioctl(fd: FileDesc, cmd: u32, argp: *mut u8),
  • (Select = 23) => do_select(nfds: c_int, readfds: *mut libc::fd_set, writefds: *mut libc::fd_set, exceptfds: *mut libc::fd_set, timeout: *mut timeval_t),
  • (Sendfile = 40) => do_sendfile(out_fd: FileDesc, in_fd: FileDesc, offset_ptr: *mut off_t, count: usize),
  • (Sendto = 44) => do_sendto(fd: c_int, base: *const c_void, len: size_t, flags: c_int, addr: *const libc::sockaddr, addr_len: libc::socklen_t),
  • (Recvfrom = 45) => do_recvfrom(fd: c_int, base: *mut c_void, len: size_t, flags: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
  • (Sendmsg = 46) => do_sendmsg(fd: c_int, msg_ptr: *const msghdr, flags_c: c_int),
  • (Recvmsg = 47) => do_recvmsg(fd: c_int, msg_mut_ptr: *mut msghdr_mut, flags_c: c_int),
  • (Shutdown = 48) => do_shutdown(fd: c_int, how: c_int),
  • (Getsockname = 51) => do_getsockname(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
  • (Getpeername = 52) => do_getpeername(fd: c_int, addr: *mut libc::sockaddr, addr_len: *mut libc::socklen_t),
  • (Socketpair = 53) => do_socketpair(domain: c_int, socket_type: c_int, protocol: c_int, sv: *mut c_int),
  • (Setsockopt = 54) => do_setsockopt(fd: c_int, level: c_int, optname: c_int, optval: *const c_void, optlen: libc::socklen_t),
  • (Getsockopt = 55) => do_getsockopt(fd: c_int, level: c_int, optname: c_int, optval: *mut c_void, optlen: *mut libc::socklen_t),
  • (Uname = 63) => do_uname(name: *mut utsname_t),
  • (Fcntl = 72) => do_fcntl(fd: FileDesc, cmd: u32, arg: u64),
  • (Getdents = 78) => do_getdents(fd: FileDesc, buf: *mut u8, buf_size: usize),
  • (SysInfo = 99) => do_sysinfo(info: *mut sysinfo_t),
  • (Getuid = 102) => do_getuid(),
  • (Getgid = 104) => do_getgid(),
  • (Geteuid = 107) => do_geteuid(),
  • (Getegid = 108) => do_getegid(),
  • (Getpgid = 121) => do_getpgid(),
  • (Prctl = 157) => do_prctl(option: i32, arg2: u64, arg3: u64, arg4: u64, arg5: u64),
  • (Gettid = 186) => do_gettid(),
  • (EpollCreate = 213) => do_epoll_create(size: c_int),
  • (Getdents64 = 217) => do_getdents64(fd: FileDesc, buf: *mut u8, buf_size: usize),
  • (EpollWait = 232) => do_epoll_wait(epfd: c_int, events: *mut libc::epoll_event, maxevents: c_int, timeout: c_int),
  • (EpollCtl = 233) => do_epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *const libc::epoll_event),
  • (EpollPwait = 281) => do_epoll_pwait(epfd: c_int, events: *mut libc::epoll_event, maxevents: c_int, timeout: c_int, sigmask: *const usize),
  • (EpollCreate1 = 291) => do_epoll_create1(flags: c_int),

[Unit Test] To Do:

  • cout
  • device
  • env
  • fcntl
  • fs_perms
  • hostfs
  • ioctl
  • open
  • pipe
  • procfs
  • readdir
  • server
  • server_epoll
  • unix_socket