Skip to content

refactor: multiplatform sandbox architecture (sys/linux + sys/windows)#13

Open
fullzer4 wants to merge 6 commits into
mainfrom
refactor/multiplatform-sandbox
Open

refactor: multiplatform sandbox architecture (sys/linux + sys/windows)#13
fullzer4 wants to merge 6 commits into
mainfrom
refactor/multiplatform-sandbox

Conversation

@fullzer4

@fullzer4 fullzer4 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Move 7 Linux-specific modules into src/sys/linux/, create sys.rs dispatch hub (crosvm pattern), add Windows stubs with matching security layers (Job Objects, AppContainer, Restricted Tokens, ETW).

  • Move executor, monitor, workspace, sysinfo, notify to sys/linux/
  • Merge isolation/lockdown.rs + rlimits.rs into sys/linux/lockdown.rs
  • Extract virtual_fs.rs to crate root (platform-agnostic)
  • Add sys/linux/policy.rs (Plan → Linux primitives compilation)
  • Add complete sys/windows/ stubs with Win32 API documentation
  • Make evalbox-sys, libc, rustix, mio Linux-only deps
  • Guard build.rs C payload compilation with cfg(target_os = "linux")
  • Add #[non_exhaustive] to ExecutorError, Event, Status
  • CI: Windows x86_64 + ARM64, Linux x86_64 + ARM64, cross-compile
  • Update deny.toml with all 4 target triples
  • Bump workspace version to 0.2.0

@fullzer4 fullzer4 self-assigned this Jun 1, 2026
@fullzer4 fullzer4 force-pushed the refactor/multiplatform-sandbox branch from 606ec39 to 141d8a8 Compare June 1, 2026 19:36
Move 7 Linux-specific modules into src/sys/linux/, create sys.rs
dispatch hub (crosvm pattern), add Windows stubs with matching
security layers (Job Objects, AppContainer, Restricted Tokens, ETW).

- Move executor, monitor, workspace, sysinfo, notify to sys/linux/
- Merge isolation/lockdown.rs + rlimits.rs into sys/linux/lockdown.rs
- Extract virtual_fs.rs to crate root (platform-agnostic)
- Add sys/linux/policy.rs (Plan → Linux primitives compilation)
- Add complete sys/windows/ stubs with Win32 API documentation
- Make evalbox-sys, libc, rustix, mio Linux-only deps
- Guard build.rs C payload compilation with cfg(target_os = "linux")
- Add #[non_exhaustive] to ExecutorError, Event, Status
- CI: Windows x86_64 + ARM64, Linux x86_64 + ARM64, cross-compile
- Update deny.toml with all 4 target triples
- Bump workspace version to 0.2.0
@fullzer4 fullzer4 force-pushed the refactor/multiplatform-sandbox branch from 141d8a8 to 41c1687 Compare June 1, 2026 19:49
fullzer4 added 4 commits June 1, 2026 16:52
SYS_fadvise64 and SYS_sendfile do not exist in the aarch64 syscall
table. Gate them with #[cfg(target_arch)] and use SYS_sendfile64
on aarch64 instead.
The Rust libc crate does not export SYS_sendfile (71) or
SYS_fadvise64 (223) for aarch64-unknown-linux-gnu, despite
these existing in the kernel's generic syscall table. Define
them as raw constants in a `nr` module and use them in the
seccomp BPF whitelist so sandboxed processes on ARM64 can
call sendfile() and fadvise64() without being killed by SIGSYS.

Also fix the test that asserted SYS_sendfile presence without
an architecture guard.
- Remove aarch64-unknown-linux-gnu from cross-compile (redundant
  with native linux-arm64 runner on ubuntu-24.04-arm)
- Remove windows-11-arm matrix entry (preview runner, unstable)
- Keep aarch64-pc-windows-msvc as cross-compile check
- Simplify Windows job to single x86_64 runner
- Rename arm64 job to linux-arm64 for clarity
@fullzer4 fullzer4 force-pushed the refactor/multiplatform-sandbox branch from c9d1727 to 7ea838d Compare June 1, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant