Skip to content

feat(sandbox): virtualize config metadata and CA delivery - #5686

Draft
drew wants to merge 6 commits into
drew/compatible-config-performancefrom
feat/bytes-as-file-ca-bundles/drew
Draft

drew wants to merge 6 commits into
drew/compatible-config-performancefrom
feat/bytes-as-file-ca-bundles/drew

Conversation

@drew

@drew drew commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Deliver the supervisor's public CA certificate and combined trust bundle through sealed memfds. Remove workload CA tmpfs mounts, runtime filesystem writes, and CA-specific Landlock grants. Canonical config and CA paths support read-only opens, stat/statx, and existence/readability checks.

Stacked on #5687.

Changes

  • Share immutable sealed-file backing between provider configs and an independently published, atomic CA pair. Validate the pair before launch and clear stale trust on retries without CA material.
  • Answer path metadata from the same memfd an open receives. Pin the notifying task's address space before validating its notification and writing bounded metadata results.
  • Use WAIT_KILLABLE_RECV on the production listener to prevent handled signals from abandoning a syscall during a metadata write. Preserve capability-free workloads and the non-dumpable runtime.

Compatibility and performance

Only exact canonical file paths are provided. Parent directories, directory navigation, relative aliases, and O_PATH opens are unsupported.

All path-based stat/access calls now incur a notification round trip. A shared-host ARM64 debug-harness run (20,000 operations per thread) measured ordinary stat p50 at 0.46 → 3.23 µs with one thread and 0.53 → 22.13 µs with eight threads; virtual-file stat measured 7.60 / 54.56 µs. These are illustrative measurements under host load, not a performance improvement claim. The parent's contention regression remains unresolved.

Handled signals are deferred after notification receipt until the broker responds. Supervisor admission decisions time out after 30 seconds; blocking loopback connects use the kernel's timeout and can wait longer. Fatal signals still terminate the workload. Pinned /proc task-memory writes can modify private read-only COW output buffers where native stat would return EFAULT; they do not force writes into read-only shared mappings.

Related Issue

Maintainer-requested change; verified repository ADMIN access qualifies for the AGENTS.md exception.

Release Notes

Testing

On Linux ARM64:

  • Before benchmark cleanup: sandbox library with perf-harness, serialized, 371 passed; default library, 362 passed. After cleanup: all-target compile checks with/without perf-harness, strict Clippy, seven task-memory tests, and the real-listener CA test pass.
  • Docker, Podman, and sandbox-backend tests pass; strict Clippy across all four crates/all targets with perf-harness passes with -D warnings.
  • Docker E2E: 26 provider scenarios, CA metadata/requests configuration/Python ssl/OpenSSL/shell checks, provider update/detach, and corporate-proxy verified TLS pass.
  • Gateway and static musl sandbox builds pass; packaged sandbox binary matches the build output.
  • Benchmark extensions are removed with the parent cleanup, including this PR's stat benchmark. The pre-existing upstream harness is unchanged.
  • Rust formatting, Ruff, and Markdown lint pass.

Not exercised: x86-64 execution or Podman/Kubernetes end-to-end lanes.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Relevant documentation updated

@copy-pr-bot

copy-pr-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 18, 2026
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew force-pushed the feat/bytes-as-file-ca-bundles/drew branch from 785709f to 29c1d9e Compare November 18, 2026 04:31
@drew
drew force-pushed the drew/compatible-config-performance branch from 3f3ac0f to 23447e5 Compare November 18, 2026 04:31
drew added 4 commits November 17, 2026 20:42
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew changed the title feat(sandbox): share sealed file delivery with CA trust bundles feat(sandbox): virtualize config metadata and CA delivery Nov 18, 2026
@github-actions

Copy link
Copy Markdown

Signed-off-by: Drew Newberry <anewberry@nvidia.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant