[FEATURE] Mediate conditional file resizing through counted realm grants #14
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/posixd#14
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
The separately approved native RESIZE_FILE grant can observe retained permissions and conditionally change file length, but realms cannot yet prepare and deliver that grant or mediate its effect under the original sealed client's credentials. Existing directory-metadata and inherited-byte-stream bindings must retain their existing authority.
Proposed behavior and scope
Add an explicit per-client ResizeFile binding, counted from realm admission through preparation, immutable configuration, delivery, serving and disposal. A dedicated public reservation/preparation family authenticates the original supervisor and actual scope receipt. A disjoint private Vfsd resolve operation derives only the original writable regular-file resize grant. The file may initially be empty. Retain original provider identity independently of the operation alias, and share the filesystem source ownership machinery with directory roots without inferring one family from the absence of another.
Add an exact compatibility request naming only that client's immutable file binding and the requested length. Posixd authenticates the actual native CLAIM and original sealed credentials, acquires complete trusted mode/owner/ACL evidence, applies deny-only write permission, and then submits one conditional resize on the same object/revision. Complete ACL intake must precede the effect. Neither UID zero, payload identifiers, a stream descriptor, a directory role nor changed metadata can add native authority. This bound operation is a step toward full descriptor and pathname filesystem support; it does not claim dynamic open/ftruncate or full POSIX filesystem completion.
Authority, security and reliability
The original scope capability and explicit operation select the object. Public role/index/digest fields never identify native slots or replace receipts. Preparation reserves provider and immediate-result custody before effects, authenticates the same supervisor again before publication, and cancels the original cohort on partial or uncertain failure. Cleanup uses only the original private provider identity and route; it must never select another record or create a replacement handle.
The consumer retains original inbound and outbound ownership across metadata pages, conditional effects, refused completion, cancellation and client retirement. Capacity precedes effects. Unknown, malformed, unsupported and incomplete metadata fails closed. Stale comparison produces a definite no-effect refusal without automatic replay; uncertain transport is not stale evidence. Fixed results survive refused delivery without another effect. File bindings do not appear as byte-stream descriptors, add bootstrap grants or widen old directory operations.
Acceptance criteria
Checklist
Alternatives and tradeoffs
Broadening a byte-write or metadata-directory grant would add unwanted explicit authority. Reconstructing a handle from a path, role or digest during cleanup would lose original custody. An explicit file purpose and shared filesystem ownership state preserve operation separation while avoiding parallel cleanup implementations. Retained per-call permission state is bounded by actual packet geometry; no fixed total ACL limit or cached permission decision is added. No performance improvement is claimed without measurement.
Tracking and rollout
Private resize receipt admission is corrected: vfsd
59bce722, docsa80e255e, integration1a9b44d3. Vfsd issue 9 records the source-observed preparation refusal. The private dispatcher recognized resize but omitted its shared filesystem result column from receipt admission. The corrected zero-flag purpose retains Launchd's original scope SEND for native endpoint authentication and existing write-ceiling checks. Metadata, directory, byte-I/O and broker operation authority remain unchanged.Four new complete transfer-frame controls cover valid admission, artifact/arbitrary result columns, wrong provenance/rights and foreign flags. Refusal cases also cover successful and failed original-receipt disposal. Tests are authored and unrun. Rustfmt was applied; the component contract, architecture, README, roadmap and maintained manual TeX are updated. Three signed commits and three Integration catalog selections are published; Cargo pins and the independent Rust helper remain unchanged. Read-only inventory covers 3432 code files across 76 repositories, all below one thousand lines; the changed Rust file is 889 lines.
Full realm open/openat, native acquisition-scope admission, both EriX guest-build generations and external Rust/LLVM guest rebuilding remain unfinished.
Documentation alignment — signed Vfsd follow-up
83119793removes a stale sentence that still described counted file preparation and sealed-client resizing as unfinished. It links the implemented bound-file feature and leaves broader filesystem operations open. Only the maintained contract changes; selected executable source identities remain unchanged. The complete pass comprises 56 implementation/catalog commits plus this documentation-only commit, all signed and pushed. Testing and CI observation remain deferred.Counted bound-file resize — 29 September 2026: lib-ipc
93920c87, lib-posixabid63943f4, launchd92c27f94, vfsd080f48dd, posixdc5fab30e, exsh836d2da2, docs7b5ca67e, integration4ed92218, rootdcb910991.The bound-file feature now connects authenticated supervisor preparation to sealed-client permission mediation and original provider cleanup. Dedicated public begin/prepare and private resolve operations preserve the actual scope receipt, full generations and explicit ResizeFile/Write purpose, including an empty original file. Shared filesystem custody retains original provider identity before alias movement and across partial or uncertain effects. Obsolete directory-only API names are removed; the existing private retirement wire remains stable.
Compatibility 1.3 adds FileResize using only that client's frozen selector and a full-width length. The shared directory/file permission owner requires complete mode/owner/ACL evidence under actual sealed credentials before one conditional effect on the same object/revision. UID zero has no override. Stale comparisons refuse without replay; malformed effects, cancellation and refused completion preserve original custody and fixed results.
Nineteen new host controls are authored and unrun: three shared-IPC, three compatibility-codec, four Launchd, two Vfsd and seven Posixd. Existing producer transcript and scenario controls are updated. The native workload creates an empty file through ordinary shell redirection, requires owner growth and nonowner/absent-selector refusal, then independently reads seven zero bytes plus EOF after all realms retire. Explicit fixture storage is 3096 plan bytes, 36 authorities and 22 Ramfsd handles; existing process and capability pools and lifecycle gates remain. The nested conditional-resize test module path is also corrected after rustfmt exposed its source-resolution error.
All 55 affected repositories are published in 56 signed commits, updating 206 Cargo and 111 catalog selectors. Rootd and both helper catalogs retain the independent Rust helper
eee623e3, separate from the final catalog head. Read-only inventory covers 3387 source files in 76 repositories, all below one thousand lines; the largest changed source has 990 lines. Component contracts and technical manual are updated, and rustfmt was applied.Broader filesystem mediation, dynamic descriptor/pathname operations, both full EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished functional requirements.
Native prerequisite: erix/vfsd#6. Broader permission mediation: #10. Phase completion: erix/integration#65. Coordinated reviews include erix/lib-ipc#2, erix/lib-posixabi#3, erix/launchd#2, erix/vfsd#3 and #5. Test/build/lint/VM/manual/profiler execution and CI observation remain deferred by user instruction. Both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished functional requirements.
Related records and contracts
erikinkinen referenced this issue from erix/blockd2026-09-29 17:05:21 +02:00
erikinkinen referenced this issue from erix/coreutils2026-09-29 17:06:31 +02:00
erikinkinen referenced this issue from erix/crashd2026-09-29 17:06:39 +02:00
erikinkinen referenced this issue from erix/deviced2026-09-29 17:06:49 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 17:07:04 +02:00
erikinkinen referenced this issue from erix/drv-acpi2026-09-29 17:07:11 +02:00
erikinkinen referenced this issue from erix/drv-i80422026-09-29 17:07:15 +02:00
erikinkinen referenced this issue from erix/drv-ps2-keyboard2026-09-29 17:07:19 +02:00
erikinkinen referenced this issue from erix/drv-ps2-mouse2026-09-29 17:07:25 +02:00
erikinkinen referenced this issue from erix/drv-rtc-cmos2026-09-29 17:07:39 +02:00
erikinkinen referenced this issue from erix/drv-serial2026-09-29 17:07:46 +02:00
erikinkinen referenced this issue from erix/drv-virtio-block2026-09-29 17:07:58 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-09-29 17:08:06 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-09-29 17:08:11 +02:00
erikinkinen referenced this issue from erix/exsh2026-09-29 17:08:16 +02:00
erikinkinen referenced this issue from erix/extop2026-09-29 17:08:18 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-29 17:08:19 +02:00
erikinkinen referenced this issue from erix/fbcond2026-09-29 17:08:22 +02:00
erikinkinen referenced this issue from erix/hotplugd2026-09-29 17:08:23 +02:00
erikinkinen referenced this issue from erix/inputd2026-09-29 17:08:24 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 17:08:27 +02:00
erikinkinen referenced this issue from erix/irqd2026-09-29 17:08:30 +02:00
erikinkinen referenced this issue from erix/kernel2026-09-29 17:08:40 +02:00
erikinkinen referenced this issue from erix/keyd2026-09-29 17:08:44 +02:00
erikinkinen referenced this issue from erix/launchd2026-09-29 17:08:45 +02:00
erikinkinen referenced this issue from erix/lib-block2026-09-29 17:08:47 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-29 17:08:49 +02:00
erikinkinen referenced this issue from erix/lib-capabi2026-09-29 17:08:50 +02:00
erikinkinen referenced this issue from erix/lib-driver2026-09-29 17:08:51 +02:00
erikinkinen referenced this issue from erix/lib-input2026-09-29 17:08:52 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-29 17:08:53 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-29 17:08:54 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-29 17:08:55 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-09-29 17:08:56 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-29 17:08:57 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-09-29 17:09:00 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-29 17:09:02 +02:00
erikinkinen referenced this issue from erix/lib-tty2026-09-29 17:09:04 +02:00
erikinkinen referenced this issue from erix/lib-vfs2026-09-29 17:09:06 +02:00
erikinkinen referenced this issue from erix/loaderd2026-09-29 17:09:07 +02:00
erikinkinen referenced this issue from erix/logd2026-09-29 17:09:08 +02:00
erikinkinen referenced this issue from erix/memd2026-09-29 17:09:09 +02:00
erikinkinen referenced this issue from erix/named2026-09-29 17:09:10 +02:00
erikinkinen referenced this issue from erix/pagerd2026-09-29 17:09:11 +02:00
erikinkinen referenced this issue2026-09-29 17:09:12 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-09-29 17:09:13 +02:00
erikinkinen referenced this issue from erix/probed2026-09-29 17:09:14 +02:00
erikinkinen referenced this issue from erix/procd2026-09-29 17:09:14 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-29 17:09:15 +02:00
erikinkinen referenced this issue from erix/rootd2026-09-29 17:09:17 +02:00
erikinkinen referenced this issue from erix/seriald2026-09-29 17:09:17 +02:00
erikinkinen referenced this issue from erix/timed2026-09-29 17:09:18 +02:00
erikinkinen referenced this issue from erix/ttyd2026-09-29 17:09:18 +02:00
erikinkinen referenced this issue from erix/vfsd2026-09-29 17:09:19 +02:00
erikinkinen referenced this issue from erix/vspaced2026-09-29 17:09:20 +02:00
erikinkinen referenced this issue2026-10-12 14:17:45 +02:00