refactor: multiplatform sandbox architecture (sys/linux + sys/windows)#13
Open
fullzer4 wants to merge 6 commits into
Open
refactor: multiplatform sandbox architecture (sys/linux + sys/windows)#13fullzer4 wants to merge 6 commits into
fullzer4 wants to merge 6 commits into
Conversation
606ec39 to
141d8a8
Compare
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
141d8a8 to
41c1687
Compare
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
c9d1727 to
7ea838d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).