Skip to content

feat(box): add experimental Linux x86-64 support - #398

Merged
kevin-orellana merged 6 commits into
mainfrom
feature/linux-x86-runtime
Nov 11, 2026
Merged

kevin-orellana merged 6 commits into
mainfrom
feature/linux-x86-runtime

Conversation

@kevin-orellana

@kevin-orellana kevin-orellana commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Human readable section

Problem

Box rejects Linux x86-64 before starting a workload. Removing that architecture check alone does not make the tested programs work: Box also blocks system calls that their x86 builds use. Python cannot create a directory or rename a file, Bash cannot create a pipe, and the coding agents cannot complete startup or launch their shell.

Solution

Enable experimental Linux x86-64 support by setting the Box operator environment variable EXPERIMENTAL_X86_SUPPORT to exactly TRUE:

EXPERIMENTAL_X86_SUPPORT=TRUE box run --config box.toml

Without that exact value, Box refuses command execution before reading configuration or starting a workload. The check covers run and policy generate-schema, including their Rust library entry points. Help and version output remain available. ARM64 requires no opt-in, and the old EXPERIMENTAL_LINUX_SUPPORT variable remains inactive. The flag follows the former Linux startup opt-in; it does not change sandbox permissions.

With the opt-in, Box selects the existing Linux sandbox on x86_64 and permits the x86 system-call entry points needed by these programs. The kernel already provides these operations. Box's permit list was missing the entries.

Operation Added x86 permissions
Check and read paths or file metadata access, stat, lstat, readlink, open
Create or change filesystem entries mkdir, rename, unlink, rmdir, chmod, symlink
Wait for events, connect streams, or identify the process group epoll_wait, poll, dup2, pipe, getpgrp
Start a child through the existing Linux process-creation path vfork
Set the address used for per-thread storage Only arch_prctl(ARCH_SET_FS); other commands remain denied

Retain the existing filesystem, network, and restricted-call rules. Reject requested set-user-ID and set-group-ID bits for x86 mkdir and chmod, using their second argument. Apply the existing openat creation checks to open, whose flags and mode are its second and third arguments. An unused mode must not refuse a read. ARM64's permission policy is unchanged.

The new tests check file contents and metadata, permitted writes, refusals for hidden and read-only paths, symbolic links pointing outside grants, and the vfork child’s inherited denial of setuid, even when it requests its unchanged user ID. Tests also distinguish ordinary modes from special permission bits and exercise ignored upper argument bits. The containment instructions record the observed workload calls and their existing Linux counterparts.

Figure 1: Linux x86-64 execution requires the exact startup opt-in. Enabled workloads use the existing sandbox with the x86-only system-call permissions and argument restrictions shown below.

Before this change, Box rejects an x86-64 launch. Afterward, EXPERIMENTAL_X86_SUPPORT=TRUE enables startup using the existing Linux sandbox. Without that exact value, Box refuses command execution before reading configuration. The added x86 system-call permissions cover paths, metadata, filesystem changes, stream and event operations, and child creation. Special permission bits remain restricted for mkdir, chmod, and open. Only ARCH_SET_FS is allowed through arch_prctl.

Editable diagram source.

Decisions the change depends on

The decision log retains ARM64 startup without opt-in and records the experimental x86 startup opt-in.

Trade-off and scope

This lets the tested coding agents complete bounded tasks on x86-64 and repairs the listed native file, pipe, and child-creation operations. The checks below retain a shared Linux timed-wait failure. Full application compatibility, installation, packaging, and release qualification remain in the x86 support tracker, owned by @kevin-orellana. The Box startup flag keeps x86-64 execution opt-in. The standalone containment library still selects its backend by platform and architecture.

The patch leaves shared Node, Python timed-wait, and parallel test-fixture failures outside its implementation scope. Claude's trace also showed a nonfatal link maintenance failure. That call remains unpermitted, so this PR does not claim warning-free operation or complete CLI compatibility.

Description

Add an explicit experimental startup opt-in for Linux x86-64. Enable its existing containment backend and the 18 x86-only permission entries above, including the three file-mode restrictions and the restricted thread-storage command.

Related Issues

Related to #45. This PR completes part of that tracker; it does not close it.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other

Testing

Experimental startup gate

Revision: f78391bfae2b571c83396474030fa35de2e3a9c4. The native checks bind the changed source files to this revision. ARM uses a preserved checkout with the same verified source files; it is not claimed as a clean checkout of the new commit. The documentation-only follow-up at 75c85772f33d22cc38870b0272b576fd4dcf4dd9 changes the decision log; runtime source and binaries remain unchanged. Its 27 site-manifest tests pass.

Check Result
x86 command-line and embedded startup Passed. Missing, empty, lowercase, numeric, false, whitespace-padded, and non-UTF-8 values refuse execution. Only exact TRUE admits startup. The old Linux variable alone cannot enable x86. Help and version output remain available. Refusal occurs before configuration reads, host callbacks, or hardening.
Real x86 workload Passed all four controls. The earlier binary runs without opt-in; the new binary refuses before creating Box state or the workload marker. The same configuration succeeds with TRUE and writes the expected file. The native outside control also passes. The operator flag is absent from the workload environment.
ARM startup and workload Passed command-line and embedded checks. An outside control and five contained native Python cases completed, including unset, invalid, and enabled flag values. Separate embedded probes also reach configuration validation without opt-in. Neither operator flag enters the workload environment.
Deliberately omitted startup check Removing only the shared startup check makes both new regression paths fail: the command-line path reaches configuration without opt-in, and the embedded path invokes its callback. Compilation succeeds, neither failure is a timeout, and exact source hashes match after restoration. Both restored tests pass.
Native x86 package Passed: 1,420 tests passed, zero failed, and seven were ignored; the standalone embedded harness also completed. The log retains 54 explicit runtime skips, which are not qualified coverage. Package Clippy passed with the repository allowances.
Native ARM package Failed: 1,424 passed, two failed, and seven were ignored; the standalone embedded harness completed. Both failures occur while starting an unchanged alias test fixture, before the tested alias runs. All nine fixture tests pass when run serially with the same test binary; that diagnostic does not turn the full run green.
Deterministic containment suite Passed: 131 passes, zero failures or errors, and 10 declared skips. All 141 expected cases were recorded; the full coverage gate passed with no quarantine or integrity problems. Per-case results match the earlier compatibility campaign.
Final build and workspace checks The changed Box package builds without default features. The paired all-features restore, formatting, and canonical package/workspace Clippy passed. The native x86 full workspace script passed with 5,312 top-level passes, zero failures, and 20 ignored tests; one nested child result is excluded. The log retains runtime skips, and its examples phase ran no scripted examples. The final x86 binaries match the bundle used for the four native controls. ARM build, focused tests, Clippy, and formatting also completed; its final binary bundle passed the six native controls and three explicit library controls.
Hosted continuous integration for the flag CI run 43070373752 passed. It tested merge fc61d27448acdac36ec3425748a2ed48afc922f5, combining f78391bf with mainline 20aab41a; its tree differs from the native-test revision. None of the upstream changes overlap the flag's 13 changed files. Both deterministic runs recorded all 141 cases with zero failures or errors: ARM64 had 131 passes and 10 declared skips; macOS had 129 passes and 12 declared skips. Both full coverage gates passed with no quarantine or integrity problems.
Automated source analysis for the flag CodeQL run 43070360771 passed all five analyses for f78391bf. Each fresh analysis reports zero findings; the Rust analysis has no warning or error.
Documentation-only follow-up Commit 75c85772f33d22cc38870b0272b576fd4dcf4dd9 changes only docs/design/decisions.md. Native and completed flag-revision results above remain attributed to their tested revisions. CI run 43074457904 and CodeQL run 43074445405 passed. CI tested merge c160f2ab6b4458c5a8614a62606a5db8c8c54354, combining this commit with mainline 20aab41a; only the decision-log blob differs from the earlier tested merge. Both workspace jobs, both deterministic jobs, lint, packaging, site validation, and CI Gate passed. The deterministic results remain 131 passes/10 declared skips on ARM64 and 129 passes/12 declared skips on macOS, with all 141 cases recorded, zero failures or errors, full coverage gates, and no quarantine or integrity problems. All five fresh CodeQL analyses report zero findings, warnings, or errors.

The ARM failures are fallback_closes_inherited_and_broker_descriptors and an_incompatible_frame_after_readiness_fails_without_fallback, both with Text file busy at mcp_alias_fallback.rs:128. The fixture is byte-identical to the PR base and the earlier tested revisions. The pre-flag ARM campaign records the same error at the same location. This change leaves that fixture untouched. ARM Clippy also reports six existing vendored Shell diagnostics, and the build reports 68 existing containment warnings. All affected files are byte-identical to the PR base; no diagnostic points to the changed Box code.

The updated diagram uses the pinned draw.io 32.4.1 container at scale 2 and border 20. The unchanged control render was byte-identical to the previous PNG. The edited figure passed the layout checks and was visually inspected.

Earlier compatibility campaign

The following results cover the compatibility revision before adding the startup flag. The coding-agent tasks were not rerun for the flag change; the new startup controls above cover that change separately.

Revision: 379c173ec02de570a727bf28267a9208b6925222. Base: 8a5f9ba262a5260b269b25ac6a75bf74abcdc89c. Native tests use Amazon Linux 2023 with the glibc 2.34 C runtime library: x86 kernel 6.12.113-138.209.amzn2023.x86_64 and ARM kernel 6.12.114-139.210.amzn2023.aarch64.

Check Result
New syscall and mode regressions The same compiled tests fail with the missing permissions and pass with the repairs. The final raw-call test checks 42 outcomes inside and outside Box. The permission test checks 128 outcomes per environment on x86 and 80 on ARM. Ordinary operations succeed; forbidden modes and filesystem access remain refused.
Directory cleanup The bot reported that missing rmdir breaks cleanup. Complete-Box controls reproduced failures in native Python os.rmdir, Python shutil.rmtree, and git clean -fd on x86; all outside and ARM controls succeeded. The same three workflows pass after the repair. The same final compiled regression fails before the repair and passes afterward, checking removal from writable scope and unchanged directories in read-only and hidden scopes.
Deliberately broken permission checks Before the cleanup follow-up, the unchanged mode tests caught all five mutations: missing mkdir/chmod restrictions, the wrong mode index for those calls, missing open restrictions, the wrong open mode index, and checking unused open modes. Correct source and executables were restored and the tests passed again. The cleanup follow-up does not change those mode rules or tests.
Alternate system-call interfaces Before the final rmdir addition, native x86-64 getpid succeeds. The i386 call succeeds outside Box; its contained child receives SIGSYS and is reaped. An x32-tagged call returns ENOSYS outside and EPERM inside. This kernel cannot provide functional x32 application coverage. The cleanup change leaves the architecture guards unchanged.
Native Python, Bash, and Git The final x86 campaign recorded 21 completed workflows, six expected access refusals, and one shared timed-wait failure. ARM recorded 22 completed workflows and six expected refusals. All 56 outside controls passed. Protected files and source, runtime, and executable hashes stayed unchanged. The failure and its paired diagnostic are explained below.
Coding-agent tasks Codex and Claude Code each made the requested edit, passed two unchanged native Python tests, and ran Git on both architectures. Completed tool output, the host command journal, and an independent host retest confirm execution. Codex also ran the unchanged native Python boundary probe: permitted reads/writes succeeded, excluded reads/writes returned ENOENT, and the canary remained unchanged.
Interactive coding-agent tasks All eight combinations passed using binaries built from the final source. Codex and Claude each accepted a task submitted through the real terminal by automated keystrokes, edited calc.py, passed two unchanged native Python tests, ran Git diff, and exited normally, inside and outside Box on both architectures. Completed tool output and independent host retests verify the work; contained runs also record the exact native command arguments.
Native x86 workspace script Passed: 5,311 top-level passes, zero failures, and 20 ignored tests. One nested child result is excluded. Earlier x86 and ARM full-workspace attempts received Text file busy in the unchanged host alias fixture; all nine fixture tests passed serially. No fixture code changed, so this successful run does not establish a repair for that intermittent failure.
Native x86 deterministic suite Passed with 131 passes, zero failures or errors, and 10 skips. All 141 expected cases were recorded; the full coverage gate passed with no quarantine or integrity problems.
ARM regression checks The final-source paired build and all 694 containment tests passed, with zero failures or ignored tests. The broader earlier ARM workspace recorded 5,339 passes, two alias-fixture Text file busy failures, and 20 ignored tests before the final x86-only process-creation and cleanup additions. All nine fixture tests passed serially. That earlier full ARM workspace script remains failed.
Build, formatting, and lint The paired Box/containment build, containment build without default features, formatting, and canonical workspace Clippy command passed. The final x86 executable hashes match the bundle used for the app checks.
Hosted continuous integration CI run 43049388207 passed on merge 756126e2, whose source tree matches this revision. ARM64 and macOS unit and deterministic jobs, lint, packaging, and CI Gate succeeded. Each deterministic run recorded all 141 expected cases with zero failures or errors: ARM64 had 131 passes and 10 skips; macOS had 129 passes and 12 skips. Both full coverage gates passed with no quarantine or integrity problems.
Automated source analysis CodeQL run 43049199682 passed all five language analyses for this revision. The Rust analysis reports zero findings, warnings, or errors. CodeQL marks the prior user-ID logging alert as fixed.

Coverage limits

The native app checks use CPython 3.9.25, Bash 5.2.15, Git 2.50.1, Codex 0.167.0, and Claude Code 2.1.319. Each coding agent completes one bounded arithmetic-edit task with two unchanged native Python tests and a Git command. Codex's inner sandbox is disabled for these Box checks. Its interactive checks use --no-daemon; Codex's default background-service path remains untested. Interactive coverage is one short coding task per app and configuration. The apps' tool-approval prompts were disabled; Box policy stayed active inside Box. These checks do not qualify long sessions, reconnects, or every interactive feature. No new filesystem boundary probes ran in these interactive tasks. Claude's separate boundary probe remains untested because its earlier outside control refused the request before running tools.

The final x86 captured-subprocess case received the child's output and successful exit, but the parent failed during a timed wait. CPython uses pselect6 for its short sleep; Box's common permit table refuses that call. Standalone time.sleep(0.001) probes reproduce the refusal on both architectures, with valid outside controls. A contemporaneous earlier-bundle subprocess control passed without entering that sleep path. The failed final case remains recorded; this PR does not change the shared wait policy.

The separate tempfile.TemporaryDirectory cleanup probe remains untested: both contained hosts failed to load the libcrypto.so.3 runtime dependency under that probe's profile. The observed os.rmdir, shutil.rmtree, and Git results above do not establish TemporaryDirectory behavior.

Some existing Linux integration tests still return early on x86 because their fixture requires ARM64. A passing workspace count does not qualify those paths. The separate Node probes fail on both hosts; no Node repair or general Node-application compatibility is claimed here. The host kernels differ by one patch version, so paired results do not isolate CPU architecture as the only possible cause of a difference.

The exact strict workspace Clippy command ran and failed on six diagnostics in bundled shell files. All four affected files are byte-identical to the PR base. The repository’s canonical command, with its documented allowances, passed without warnings. The build without default features emitted 68 warnings in unchanged files; workspace tests emitted eight warnings in an unchanged shell test file. No separate base build was rerun. Both workspace scripts reported that no scripted examples remain, so example execution is untested.

Review follow-up

The automated assessment of f78391bf found a documentation conflict: the decision log still said all Linux startup required no opt-in. The follow-up scopes that earlier decision to ARM64 and records the authorized experimental x86 opt-in, including its caller setup cost. No runtime or policy change was needed for this correction. The current automated assessment accepts the correction, recommends approval, and reports no new findings. Its formal review is COMMENTED; this is not human approval.

Independent source review found no new defect in the x86 argument restrictions or process-creation path. Reviewers checked the failing-before/passing-after results, five deliberately broken permission checks, native command journals, unchanged canaries, and alternate-interface refusals. The current mkdir, chmod, and open calls have argument restrictions and regression coverage. This PR adds no guard that automatically covers future aliases such as creat.

The earlier review's rmdir finding is repaired and checked through complete Box launches. Its separate link suggestion remains deferred with the documented CLI maintenance limitation. Test failure messages no longer print user-ID arrays; both identity assertions remain.

The earlier automated assessment for 379c173e recommends approval and reports no new blocking finding. It accepts the cleanup repair and explicitly accepts deferring link. The bot records its formal review as COMMENTED; its recommendation is not human approval.

GitHub requires one approving review and resolution of open review threads. The earlier rmdir and decision-log threads are resolved after the bot accepted both repairs.

  • I ran the relevant suites (just check, or cargo test --workspace --all-features)
  • If I touched Rust, I ran cargo fmt --all and cargo clippy --workspace --all-targets --all-features -- -D warnings

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new warnings

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

## Problem

Box rejects Linux x86-64 before workload startup. Removing that check alone
leaves runtime calls blocked by the system-call filter.

## Solution

Select the existing Linux namespace backend on x86-64. Add x86-only
permissions for epoll_wait, dup2, poll, readlink, and getpgrp. Permit
arch_prctl only for ARCH_SET_FS, matching the command's lower 32 bits.
Test permitted thread setup, denied commands, architecture selection, and
the expected permit counts. Correct the architecture-selection docs.

This implements part of #45. Broader x86 qualification and release work
remain outside this draft.

## Tests

Builds with all features and without default features pass. Formatting,
workspace Clippy with the repository's allowances, the focused thread
setup test, and the native x86 smoke checks pass.
Six isolated behavior changes were detected at their intended test assertions.

The full script suite reports one failure: the deferred x86 rename gap.
The deterministic gate is red: 108 passes, 22 failures, one error, and
10 declared platform skips. The PR records the coverage limits.
@kevin-orellana
kevin-orellana marked this pull request as ready for review November 11, 2026 07:29
@kevin-orellana
kevin-orellana enabled auto-merge (squash) November 11, 2026 07:30
@github-actions

Copy link
Copy Markdown

Assessment: Request Changes

The architecture switch and the scoped arch_prctl rule are correct, and I confirmed them on an x86-64 runner. There is one blocking problem: x86 workloads still go through a legacy call, access(2), that is not in the permit list. On x86 this gives silently wrong existence and executable checks, and those checks pass on ARM64.

Checks that held
  • Selecting by architecture is consistent: linux_mechanism and TargetArch both use the compile-time std::env::consts::ARCH, so they cannot disagree.
  • The arch_prctl rule allows only ARCH_SET_FS, and the Dword match is the same as the kernel's int option. glibc, CPython, and Node startup issue only ARCH_SET_FS.
  • ABI bypass is closed: x32 (nr | 0x40000000) returns EPERM, and an i386 int 0x80 is killed with SIGSYS. Both were measured under the real filters.
  • None of the six new permits is an alias of a MEDIATED call. Each one matches an ARM64 call that is already permitted and not mediated.
  • alarm/pause also return silently wrong results on x86, but ARM64 does the same (it has no setitimer/rt_sigsuspend permit), so this PR introduces no regression there.
  • The four new or changed tests pass on x86-64 (cargo test -p strands-box-containment --all-features).

The PR description is thorough about the x86 gaps that remain, and that helped this review.

## Problem

Native Git on x86 fails when the filter rejects access on its configuration
paths, although the equivalent faccessat operation is already permitted.

## Solution

Permit access only on x86 and test existing and absent paths under the real
filters. Document the measured call use and pinned thread-setup constants.
Correct the architecture decision note and add the initial-startup diagram.

## Tests

The new effect test fails before the permit and passes afterward. All 489
containment library tests pass. Native smoke, alternate-ABI probes, and the
full Git identity permit/deny case pass with the repaired executable bundle.
Owned-package Clippy passes without owned warnings. The strict workspace
command still reports six existing diagnostics in unchanged vendored code.
Broader native and hosted regression suites are being repeated separately.
@github-actions

Copy link
Copy Markdown

Assessment: Approve

I re-reviewed at 54e9271. The changes since 90c5d89 are the x86 access permit, a test that checks its effect, the ARCH_SET_FS exception and the x86 measurements in crates/containment/AGENTS.md, and documentation and diagram updates. They fix the blocking finding from the previous review. I found no new correctness or security problems in these changes.

Checks that held
  • The access fix covers the failure it names. With the real filters on x86-64, shutil.which('git') now finds the program, os.access returns true for an existing file, and it returns false (ENOENT) for a missing one.
  • access adds no new authority. The kernel implements it as faccessat(AT_FDCWD, …, 0), which is already permitted and isn't in MEDIATED.
  • The new test would catch a regression. It calls SYS_access directly and runs an unfiltered control first.
  • The arch_prctl rule, the system-call interface bypass checks, and arch selection didn't change since my last review. These are the arch_prctl low-32-bit ARCH_SET_FS rule, x32 → EPERM, i386 → SIGSYS, and compile-time arch selection.
  • The libc numbering rule is now satisfied. ARCH_SET_FS is recorded as a named exception in AGENTS.md.
  • Tests pass. The four x86 tests and the permit-count test pass on x86-64.

Non-blocking follow-up for #45: on x86-64, glibc 2.39's __xstat/__lxstat compatibility wrappers still issue SYS_stat/SYS_lstat, which the filter refuses. Binaries linked against glibc older than 2.33 call them; java -version is one example. These two calls aren't in the tracker's list of ten missing calls.

@kevin-orellana kevin-orellana changed the title feat(containment): enable Linux x86-64 runtime startup feat(containment): enable Linux x86-64 workloads Nov 11, 2026
@github-actions

Copy link
Copy Markdown

Assessment: Request Changes

I re-reviewed at 2221689. Since 54e9271 this PR has added ten x86 permits and argument rules for mkdir, chmod, and open. The security side holds: I measured it under the real filters on x86-64 and found no way past the set-ID or filesystem rules. The one remaining problem is compatibility. x86 rmdir is still refused, and that breaks common Python and Git cleanup (see the inline comment).

Checks that held
  • Set-ID bits are refused through the x86 calls. I measured each case with raw syscalls. mkdir with 04755 → EPERM, and 02755 with upper argument bits set → EPERM. chmod 02755 → EPERM. open(O_CREAT, 04755) → EPERM, and open(O_TMPFILE, 02755) → EPERM. Ordinary modes succeed, and so does open(O_RDONLY) with an unused 04755 mode.
  • Argument positions match the kernel. mkdir/chmod take the mode in arg 1, and open takes flags in arg 1 and mode in arg 2. The kernel creation test uses O_CREAT|__O_TMPFILE, and a lone __O_TMPFILE is EINVAL, so the O_TMPFILE mask behaves the same as on openat.
  • The remaining aliases stay refused. creat, mknod, link, chown, utimes, and futimesat all return EPERM. None of them bypasses a MEDIATED rule.
  • The other new permits add no authority. stat, lstat, rename, unlink, symlink, pipe, and vfork each match an already-permitted call that isn't mediated (clone for vfork).
  • The new tests pass on x86-64. x86_syscalls_linux.rs and file_permissions_linux.rs pass, after disabling AppArmor's unprivileged-userns restriction on this runner.
  • The docs match the code. docs/design/containment.md and AGENTS.md describe the new argument positions correctly.

Non-blocking: the description says the earlier legacy-alias guard suggestion "is implemented". What was added is the mkdir/chmod/open mediation. No test checks that a future alias such as creat gets a MEDIATED entry. That still matters, because #45 lists creat as a missing call.

@github-actions

Copy link
Copy Markdown

Assessment: Approve

I re-reviewed at 379c173. The only change since 2221689 is an x86-only rmdir permit, with a test of its effect and updates to the docs and diagram. That fixes the remaining finding, and I found no new problems with correctness or security.

Checks that held
  • rmdir adds no authority. The kernel implements it as unlinkat(AT_FDCWD, path, AT_REMOVEDIR), which is already permitted and isn't mediated. It also takes no mode argument, so the set-ID rules don't apply.
  • The fix covers the failures it names. Under the real filters on x86-64, TemporaryDirectory, shutil.rmtree, and git clean -fd now finish cleanup. A non-empty directory still gets ENOTEMPTY.
  • Grants still apply. The new test checks that the writable scope actually removes the directory, and that the read-only and hidden scopes keep it unchanged.
  • Nothing else changed since my last review. The set-ID mediation for mkdir/chmod/open, the refusal of the remaining legacy calls, and the arch_prctl, x32, and i386 handling are the same.
  • Tests pass on x86-64. That covers x86_syscalls_linux.rs, file_permissions_linux.rs, and the permit-count test.

The non-blocking note from the previous summary still stands. No test makes sure that a later alias such as creat gets a MEDIATED entry. Please add that guard in the PR that adds creat for #45.

@kevin-orellana kevin-orellana changed the title feat(containment): enable Linux x86-64 workloads feat(box): add experimental Linux x86-64 support Nov 11, 2026
Comment thread crates/box/src/command/platform.rs Resolved
@github-actions

Copy link
Copy Markdown

Assessment: Comment

I re-reviewed at f78391b. The one change since 379c173 is a new startup gate: on Linux x86-64, Box now runs only when EXPERIMENTAL_X86_SUPPORT=TRUE is set. The gate code works as described. The one open item is that a recorded decision rejects this kind of gate (see the inline comment). The containment work I approved earlier is unchanged.

Checks that held
  • The gate covers every path that starts a workload. run and generate_policy_schema both go through command::execute, and main.rs only delegates to them. Nothing in crates/box/src or containment re-executes strands-box through execute. The checks that don't start anything (check_policy, check_read_grant, check_workload_env, reload) stay ungated, which matches the docs.
  • Refusal happens before any side effect. preflight runs before Hardening::apply, runtime creation, on_ready, and configuration reads. The PR_GET_DUMPABLE and callback assertions in box_library.rs confirm this.
  • Only the exact value TRUE is accepted. On x86-64: with the variable unset, the CLI refuses; TRUE reaches the "cannot read configuration" error; true refuses policy generate-schema.
  • Non-x86 targets are unchanged. Both the check and the error variant are cfg(all(linux, x86_64)).
  • The flag doesn't reach the workload. Workload spawns in trampoline.rs and supervise.rs call env_clear().
  • Tests pass on x86-64. linux_startup (4/4) and box_library pass.

The non-blocking creat/MEDIATED guard note from earlier still applies to the follow-up for #45.

@github-actions

Copy link
Copy Markdown

Assessment: Approve

I re-reviewed at 75c8577. The only change since f78391b is in docs/design/decisions.md, and it fixes the decision-log conflict I raised last round. I have no new findings.

Checks that held
  • The decision log matches the code. The new x86 entry's claims about refusal order, which commands are covered, and the ARM64, macOS, and containment-library exclusions all match command::execute and platform::preflight.
  • The ARM64 entry keeps its anchor. #linux-evaluation-requires-explicit-consent didn't move, so existing links still work. Its rationale is now limited to ARM64, so it no longer contradicts the x86 gate.
  • The rest of the decision log is consistent. The line about the namespace launcher on "ARM64 or x86-64" (around line 1309) is still accurate with the opt-in.
  • The runtime code is unchanged. This commit only touches docs, so the gate checks from the last round (all workload entry points covered, refusal before hardening, exact TRUE only, the flag never reaches the workload) still apply.
  • site_manifest passes (27/27).

The non-blocking note still applies to the follow-up for #45: no test makes sure a future legacy call like creat gets a MEDIATED entry.

Comment thread docs/design/decisions.md Resolved
@kevin-orellana
kevin-orellana merged commit a41332d into main Nov 11, 2026
25 checks passed
@kevin-orellana
kevin-orellana deleted the feature/linux-x86-runtime branch November 11, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants