You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design question: multi-memory → distinct native regions (MPU-protectable) vs single shared memory — which isolation model for the dissolved library-OS? #404
Design question, not a bug — wanted synth's stance before gale commits an inter-component isolation model for the dissolved library-OS (gale#86, gale#89).
The two models
A dissolved image with multiple mutually-distrusting components needs memory isolation between them (verification stays the primary line; this is containment for the unverified/untrusted seam + 3rd-party components). Two shapes:
Single shared memory + MPU carving. What we do today: meld fuse --memory shared → one linear memory → synth lowers to one native region; the embedder/TCB carves MPU sub-regions per component by hand. Lowerable now, but the protection regions are bolted on, not structural.
Which model does synth want to be the supported MCU path?
If multi-memory → per-region: would synth lower N memories to N native bases (region-relative addressing within each, cross-memory ops emitted explicitly rather than skipped), exposing the per-memory base/size so an embedder can map each to an MPU/PMP region? That makes "memory structure = protection structure" — arguably the right isolation primitive.
If single-shared only: synth stays single-memory, and isolation is entirely the embedder's MPU-carving on one region (gale#86) — simpler backend, isolation regions hand-managed.
Why it matters / what we'll do with the answer
gale's BYO-OS isolation design (gale#86) forks on this. If synth intends multi-memory→region lowering, we'd pursue multi-memory ↔ MPU-region (structural). If not, we commit to shared + MPU-carve. Either is fine — we just shouldn't build against an assumption synth doesn't hold.
Kill-criterion for "we picked the right one"
"The chosen model can give per-component MPU-enforced isolation on an M-class MCU after dissolve, with region boundaries that don't require hand-maintained address maps." Refs: synth#369 (cross-memory loud-skip), meld#172, gale#86, gale#89.
Design question, not a bug — wanted synth's stance before gale commits an inter-component isolation model for the dissolved library-OS (gale#86, gale#89).
The two models
A dissolved image with multiple mutually-distrusting components needs memory isolation between them (verification stays the primary line; this is containment for the unverified/untrusted seam + 3rd-party components). Two shapes:
Single shared memory + MPU carving. What we do today:
meld fuse --memory shared→ one linear memory → synth lowers to one native region; the embedder/TCB carves MPU sub-regions per component by hand. Lowerable now, but the protection regions are bolted on, not structural.Multi-memory → one native region per wasm memory. Keep each component in its own wasm memory; synth places
memory[k]at a distinct native base, so the memory boundary is the MPU region boundary — protection is structural (the embedder just programs an MPU region per memory). Cleaner, but today synth loud-skips cross-memory ops (arm backend uses soft-float for all f32/f64 — hardware FPU never used (cortex-m4f/m7/m7dp identical); blocks REQ-PIX-001 hard-float #369) and there's no single-address-space lowering for multi-memory (meld#172).The question for synth
Which model does synth want to be the supported MCU path?
Why it matters / what we'll do with the answer
gale's BYO-OS isolation design (gale#86) forks on this. If synth intends multi-memory→region lowering, we'd pursue multi-memory ↔ MPU-region (structural). If not, we commit to shared + MPU-carve. Either is fine — we just shouldn't build against an assumption synth doesn't hold.
Kill-criterion for "we picked the right one"
"The chosen model can give per-component MPU-enforced isolation on an M-class MCU after dissolve, with region boundaries that don't require hand-maintained address maps." Refs: synth#369 (cross-memory loud-skip), meld#172, gale#86, gale#89.