Skip to content

Add shared-memory broker pipe data path#1047

Closed
wdcui wants to merge 2 commits into
uliteboxfrom
wdcui/ulitebox/broker-pipe-shared-memory
Closed

Add shared-memory broker pipe data path#1047
wdcui wants to merge 2 commits into
uliteboxfrom
wdcui/ulitebox/broker-pipe-shared-memory

Conversation

@wdcui

@wdcui wdcui commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • add transport-neutral shared-memory attachments and offset/length pipe operations
  • transfer one sealed memfd per pipe over Unix sockets with separate read/write staging regions
  • keep BrokerCore authoritative through synchronous control requests and preserve inline fallback
  • allow only the Linux-userland syscalls needed to receive and validate shared-memory descriptors

Testing

  • cargo fmt --check
  • cargo test -p litebox_broker_protocol -p litebox_broker_local -p litebox_broker_host -p litebox_broker_transport
  • cargo test -p litebox pipes
  • cargo clippy -p litebox_broker_protocol -p litebox_broker_local -p litebox_broker_host -p litebox_broker_transport -p litebox_platform_linux_userland -p litebox_runner_linux_userland -p litebox --all-targets --all-features -- -D warnings
  • cargo test -p litebox_runner_linux_userland --test run test_runner_broker_integration_with_rewriter -- --exact

wdcui added 2 commits July 18, 2026 17:17
Transfer one sealed memfd per broker pipe over the Unix control channel and use separate read and write staging regions while retaining synchronous broker authorization and inline fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
Account for the two initialization buffers used to validate received memfd metadata and SCM_RIGHTS descriptors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ac86dd2d-0280-4d7b-87a8-5654ad1503a6
@wdcui

wdcui commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

Superseded by the focused stack: #1049 (protocol), #1048 (broker host), #1051 (broker local), and #1050 (Unix transport).

@wdcui wdcui closed this Jul 19, 2026
@github-actions

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure constructible_struct_adds_field: externally-constructible struct adds field ---

Description:
A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field CreatePipeResponse.shared_memory in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/pipe.rs:37

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/enum_variant_added.ron

Failed in:
  variant PipeResponse:ReadShared in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:121
  variant PipeResponse:WriteShared in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:125
  variant PipeRequest:ReadShared in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:80
  variant PipeRequest:WriteShared in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/message.rs:84

--- failure trait_associated_type_added: non-sealed public trait added associated type without default value ---

Description:
A non-sealed trait has gained an associated type without a default value, which breaks downstream implementations of the trait
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/trait_associated_type_added.ron

Failed in:
  trait associated type litebox_broker_protocol::channel::HostControlChannel::SharedMemory in file /home/runner/work/litebox/litebox/litebox_broker_protocol/src/channel.rs:81
  trait associated type litebox_broker_protocol::channel::LocalControlChannel::SharedMemory in file /home/runner/work/litebox/litebox/litebox_broker_protocol/src/channel.rs:51

--- failure trait_method_parameter_count_changed: pub trait method parameter count changed ---

Description:
A trait method now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-item-signature
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/trait_method_parameter_count_changed.ron

Failed in:
  HostControlChannel::send_response now takes 2 instead of 1 parameters, in file /home/runner/work/litebox/litebox/litebox_broker_protocol/src/channel.rs:112

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