From: Tulio A M Mendes Date: Sun, 8 Feb 2026 11:08:52 +0000 (-0300) Subject: docs: update POSIX roadmap and persistence notes X-Git-Url: https://projects.tadryanom.me/docs/static/gitweb.css?a=commitdiff_plain;h=708d2135d9a29ccfc79c15b81d15dcc90efcf687;p=AdrOS.git docs: update POSIX roadmap and persistence notes --- diff --git a/BUILD_GUIDE.md b/BUILD_GUIDE.md index eaf0a99..6008f82 100644 --- a/BUILD_GUIDE.md +++ b/BUILD_GUIDE.md @@ -49,6 +49,10 @@ This produces `adros-x86.iso`. make ARCH=x86 run ``` +Persistent storage note: +- The x86 QEMU run target attaches a `disk.img` file as an IDE drive (primary master). +- `/persist` is mounted from this disk and is used by userspace smoke tests (e.g. `/persist/counter`). + If you are iterating on kernel changes and want to avoid hanging runs, you can wrap it with a timeout: ```bash timeout 60s make ARCH=x86 run || true diff --git a/README.md b/README.md index 9512e6e..5c35a93 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,9 @@ AdrOS is a multi-architecture operating system developed for research and academ - `SYSCALL_LSEEK`, `SYSCALL_STAT`, `SYSCALL_FSTAT` - `SYSCALL_DUP`, `SYSCALL_DUP2`, `SYSCALL_PIPE` - `SYSCALL_FORK`, `SYSCALL_EXECVE` (with minimal argv/envp stack setup) + - `SYSCALL_SELECT`, `SYSCALL_POLL` + - `SYSCALL_SIGACTION`, `SYSCALL_SIGPROCMASK`, `SYSCALL_KILL` + - `SYSCALL_SETSID`, `SYSCALL_SETPGID`, `SYSCALL_GETPGRP` - Per-process fd table (starting at fd=3) - Centralized user-pointer access API (`user_range_ok`, `copy_from_user`, `copy_to_user`) - Ring3 init program (`/bin/init.elf`) exercising IO + process + exec smoke tests @@ -58,10 +61,15 @@ AdrOS is a multi-architecture operating system developed for research and academ - Echo + backspace handling - Blocking reads with a simple wait queue (multiple waiters) - `fd=0` wired to `tty_read`, `fd=1/2` wired to `tty_write` + - Minimal termios/ioctl support (`TCGETS`, `TCSETS`, `TIOCGPGRP`, `TIOCSPGRP`) + - Basic job control enforcement (`SIGTTIN`/`SIGTTOU` when background pgrp touches the controlling TTY) - **Devices (devfs)** - `/dev` mount - `/dev/null` - `/dev/tty` +- **Persistent storage (x86 / QEMU)** + - ATA PIO driver (primary master IDE) + - Minimal on-disk persistence filesystem mounted at `/persist` (single `counter` file used by smoke tests) - **W^X (Option 1) for user ELFs (x86)** - User segments are mapped RW during load, then write permissions are dropped for non-writable segments - This provides "text is read-only" hardening without requiring NX/PAE @@ -83,16 +91,15 @@ QEMU debug helpers: - Standardize arch entrypoint behavior (`arch_early_setup`) across architectures - **Userspace / POSIX process model** - `brk`/`sbrk` - - Signals (at least `SIGKILL`/`SIGSEGV` basics) + - Signal return ABI (`sigreturn`) and default actions for more signals (current support is minimal) - **Syscalls / ABI** - - `ioctl` (TTY), `getcwd`, `chdir` + - `getcwd`, `chdir` - Userspace `errno` variable + libc-style wrappers (`-1` return + `errno` set) - **Virtual memory hardening** - Option 2: PAE + NX enforcement (execute disable for data/stack) - Guard pages, and tighter user/kernel separation checks - **Filesystem** - - Real persisted storage (ATA/AHCI/virtio-blk or similar) - - Persisted storage (ATA/AHCI/virtio-blk or similar) + - Expand persisted storage beyond the current minimal `/persist` filesystem - Permissions/ownership (`uid/gid`, mode bits) and `umask` - Special files: block devices, `/proc` - Real on-disk fs (ext2/fat) diff --git a/docs/POSIX_ROADMAP.md b/docs/POSIX_ROADMAP.md index 4600a1f..dcedb20 100644 --- a/docs/POSIX_ROADMAP.md +++ b/docs/POSIX_ROADMAP.md @@ -54,6 +54,9 @@ Notes: - [x] `fork()` - [~] `execve()` (loads ELF from InitRD; minimal argv/envp) - [x] `getppid()` +- [x] `select()` / `poll()` (minimal) +- [~] Basic signals (`sigaction`, `sigprocmask`, `kill`) (delivery model is minimal) +- [x] `setsid()` / `setpgid()` / `getpgrp()` (minimal) ### FD layer - [x] Per-process fd table (fd allocation starts at 3) @@ -67,9 +70,14 @@ Notes: - [x] Echo + backspace handling - [x] Blocking reads (process `BLOCKED`) + wait queue (multiple waiters) - [x] `fd=0` wired to `tty_read`, `fd=1/2` wired to `tty_write` -- [ ] Termios-like configuration +- [~] Termios-like configuration (minimal: `TCGETS`/`TCSETS`) +- [~] Sessions / process groups / controlling terminal (minimal: `TIOCGPGRP`/`TIOCSPGRP` + job control checks) - [ ] PTY +### Persistence (x86 / QEMU) +- [x] ATA PIO driver (primary master IDE) +- [x] Minimal on-disk persistence filesystem mounted at `/persist` + --- ## 1) Milestone A1 — Process lifecycle: `waitpid` + cleanup on `exit` @@ -172,20 +180,33 @@ Goal: get a writable filesystem (even if volatile) and a real VFS layout. --- -## 5) Later milestones (not started) +## 5) Later milestones (in progress) ### Process / POSIX expansion - [x] `fork()` - [~] `execve()` - [x] `getppid()` -- [ ] Signals + basic job control +- [~] Signals + basic job control (`SIGTTIN`/`SIGTTOU` for background TTY I/O) ### Pipes + IO multiplexing - [x] `pipe()` - [x] `dup/dup2` -- [ ] `select/poll` +- [x] `select/poll` ### TTY advanced - [ ] termios flags (canonical/raw/echo) -- [ ] controlling terminal, sessions, pgrp +- [~] controlling terminal, sessions, pgrp (minimal) - [ ] PTY for userland shells + +--- + +## 6) Milestone D1 — Persistent storage (minimal on-disk) + +Goal: have at least one end-to-end persisted storage path for smoke tests and future filesystems. + +### Block device +- [x] ATA PIO (primary master IDE) + +### Filesystem +- [x] Minimal persisted filesystem mounted at `/persist` +- [ ] General-purpose on-disk FS (directories, allocation, metadata)