foundry
Foundry OS: the operating system built on the Rustbelt kernel
3118 bytes ยท raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Syscall gaps: which program needs what the kernel lacks
A living list. When a port hits a missing or wrong syscall, add a line here
and ask the kernel side (see kernel-requests.md). Status from Clarke's tests
up to Rustbelt 0.18.0 (proposal section 2.6); 0.19.0 added the vDSO,
static-PIE and `mremap`.
| Gap | Who notices | Status |
|---|---|---|
| `AF_INET6` (EAFNOSUPPORT) | IPv6-only tools | open |
| `ITIMER_VIRTUAL`/`ITIMER_PROF`, CPU-clock timers | profilers, CPU watchdogs | open |
| `timerfd_*` 283/286/287 | event-loop programs | open |
| `/proc/<pid>`, `/proc/mounts`, `/proc/meminfo` | `ps`, `top`, `mount`, `free`, `df` | open |
| `reboot` 169, `mount`/`umount` | `poweroff`, busybox init, `mount` | open |
| permissions stored, not enforced | `test -x` always true | accepted for now |
| no `/etc/passwd` | `getpwuid(0)` fails, `ls -l` owner names | Foundry OS job: `rootfs/etc/` (ships with contract v2) |
| `mremap` 25 | big `realloc`s copied | fixed in 0.19.0 (to re-check) |
| `ttyname()`, fd-message merging, `/proc/self/cwd` (K11) | `tty` | fixed in b0a701d (to re-check) |
| `mknod`/`mknodat` 133/259 (ENOSYS): no FIFOs | sbase `mkfifo`, `mknod NAME p` | open (K14 a) |
| `chroot` 161 (ENOSYS) | sbase `chroot` | open (K14 b) |
| `getdents64` has no `.`/`..`; directory `st_size` = entry count | `ls -a`, `du` of directories | open (K14 c) |
| FAT32/exFAT: no file times (`stat` shows 1970, `utimensat` ignored) | `touch`/`ls -l`/`cp -p` on B: and C: | open (K14 d) |
| `df`, `id` not in sbase 0.1 | M4 test list | not a kernel gap: busybox (M5) has them |
| `LOGNAME` unset, so `logname` fails | sbase `logname` | Foundry OS job: `login` (M6) |
| root image files owned by the build user (uid 1000) | `ls -l` showed `tyler tyler` | fixed in M4: scripts/mkimage-v2.sh sets 0:0 |
## sbase 0.1 on Rustbelt 0.21.1 (M4)
`make test` runs `root/scripts/sbase-test.sh` (86 checks; every tool from
`/usr/lib/sbase/` by full path). Results:
| Area | Tools checked | Result |
|---|---|---|
| text | `sort` (`-n -u -r -t -k`), `uniq -c -d`, `head -n`, `tail -n`/`+N`/`-f`, `cut -d -f -c`, `tr` (`-d -s`), `sed` (`s///g`, `d`, `-n /re/p`, `y`), `grep` (`-c -v`), `wc`, `od -t c`, `printf`, `expr`, `seq` (`-s -w`), `basename`, `dirname`, `paste`, `comm`, `rev`, `fold`, `nl`, `cat` | all pass |
| checksums | `cksum`, `sha256sum` (and `-c`), `md5sum`, `sha1sum` | all pass |
| files | `ls -l`/`-ld`/`-i`, `chmod` (octal, symbolic), `ln` and `ln -s`, `readlink -f`, `touch` (new, `-t`, `-d`), `cp -p`/`-R`, `mv`, `rm -r`, `rmdir`, `mkdir -p`, `dd` (`bs count skip`), `du -k`, `find` (`-name -type -newer`), `xargs` (`-n`), `tee` (`-a`), `test`, `tar c/t/x`, `cmp`, `split`, `mktemp` (`-d`) | all pass on A: (ext2) |
| system | `env -i`/`-u`, `date` (`-u -d`, `+FORMAT`), `yes \| head`, `sleep`, `kill` (TERM, -9, `-l`), `nice`, `renice`, `uname`, `whoami`, `hostname`, `true`/`false`, `getconf PAGESIZE` | all pass |
| known gaps (xfail) | `mkfifo`, `mknod p`, `chroot`, `ls -a` dot entries, `touch` on FAT | kernel, K14 (a)-(d) |
| absent | `df`, `id` | not in sbase 0.1 (ubase tools); busybox at M5 |
|