[FEATURE] Retire fixed-width filesystem and launch path APIs #9

Open
opened 2026-10-13 22:03:31 +02:00 by erikinkinen · 0 comments
Owner

Problem and motivation

The legacy VFS requests store complete paths and directory names in 240-byte arrays. A valid ext directory entry can contain a 255-byte name, and a path containing that entry is longer still. These limits also remain in several client helpers, mount records and loader selectors. Increasing the arrays would create another fixed ceiling and would still narrow FAT names, whose format allows 255 UTF-16 units.

The native filesystem interfaces already accept counted raw components and directory entries. The migration should make these interfaces the normal route and remove the remaining fixed-width convenience APIs.

Proposed behavior and scope

Use the existing native acquisition scope, conditional component acquisition and counted directory protocols. Complete names remain borrowed byte slices; parsers check their declared extents, reserved fields, operation and correlation. Providers enforce their actual format rules: ext has a 255-byte component limit; FAT/exFAT have a 255-UTF-16-unit limit; RAM names consume explicitly supplied record and byte storage.

Keep pathname traversal iterative and relative to original held root/cwd objects. A complete path has no independent VFS width or component-count ceiling. Complete paths and symlink targets may span several existing component or target-page calls. The 32 KiB kernel IPC envelope remains a per-message transport budget, rather than becoming a complete-path limit. Caller-offered reply capacity is checked before publishing an entry, cursor, object or metadata effect. Insufficient capacity returns a definite refusal without shortening the value.

For the full filename fixture, use a narrowly selected native realm-byte-client workload through its existing admitted acquisition scope. It must observe all four policy directories and all five names, including the 255-byte entries and their full absolute paths. Rootd records the distinct complete result; the workload supplies no provider endpoints, guessed handles or additional credentials. The existing generic Rootd namespace endpoint cannot be relabeled as a native job scope.

Migrate the fixed-width namespace/provider, loader and launch-probe helpers together with their actual callers. Replace retained CanonicalPath arrays and mounted-name buffers with counted storage owned by their original deployment records. Reuse existing provider custody and name arenas where they already support the full value. This includes LibIPC, LibVFS, Vfsd, E2fsd, Fatd, Ramfsd, Loaderd, Launchd, Rootd, Deviced, Coreutils and Integration. Bootstrap mount, filesystem-launch and runtime-graph path records need corresponding versioned counted representations in LibBootstrap and BootTool. Docs and the affected component documentation describe the resulting contracts.

Authority, security and reliability

Lengths, path bytes, cursor tokens, inode metadata and cleanup keys confer no authority. Every operation uses the original received endpoint and its existing operation, root, write, lifetime and caller ceiling. Root/cwd and directory grants come from that same admitted source; a convenience adapter cannot create an independent root, bypass a denied search or reconstitute a grant from descriptive metadata.

Register candidate and provider cleanup identities before acquisition. Keep original owners on success, refusal, interruption, malformed framing and lost replies until retirement is positively confirmed. A returned handle from a contradictory reply cannot nominate a cleanup target. Preserve the first operation error while independently retaining each uncertain retirement. Unknown owners prevent success, row reuse and further ordinary work.

Keep cursor reservations on the original open description and publish them only after complete entry/capacity acceptance. Duplicate descriptors share that cursor without making its numeric value authority. Mount overlays retain their original entering-parent/root pins and the complete configured name. Precharge retained path/name bytes and rows from the actual deployment budget before publication; failed preparation must remain independently drainable.

Use new operation/version framing for replacements. Old fixed layouts cannot be accepted as a prefix of the new form, and callers cannot fall back to the legacy family after a refusal. Retire obsolete codecs, constants, adapters and documentation after every selected producer and consumer has migrated. Ordinary native routes preserve their existing raw-byte semantics; filesystem-specific Unicode or UTF-16 rules remain with the provider that requires them.

Acceptance criteria

  • Parse and encode complete 255-byte ext names, full paths beyond 240 bytes, FAT names beyond 255 UTF-8 bytes, raw non-UTF-8 ext/RAM names and multi-message logical traversal. Exercise exact/short/excessive counts, overflow, unknown versions, trailing bytes and malformed reserved fields.
  • Keep output, cursor and provider state unchanged on caller-capacity refusal. Reject truncated names and paths, including a valid prefix with missing final bytes.
  • Exercise original root/cwd ceilings, denied search, write attenuation, foreign scopes, stale generations, conditional permission changes, symlink loops and long streamed targets. No pathname, object metadata or cursor may substitute for a grant.
  • Exercise acquisition interruption, lost/malformed replies, first-error preservation and independent retirement uncertainty. Confirm original cleanup keys cannot select another scope or recycled owner.
  • Run the genuine native filename workload against all 20 independently generated records. Check full name bytes, file metadata, complete payload, EOF, exact inventory, cursor progress and cleanup. A 16-case transitional check does not satisfy this criterion.
  • Preserve encrypted namespace-write denials, existing ordinary filesystem controls and every original scenario deadline. Source-only mode controls, generated-media controls and guest acceptance remain separate.
  • Run fmt, strict Clippy, units, private/public warning-denied rustdoc and affected native builds for each changed repository; add meaningful parser/provider/VM controls and inspect the exact signed full CI runs. Keep authored code below 1,000 lines and remove superseded APIs.

Alternatives and tradeoffs

Widening the 240-byte arrays retains an arbitrary whole-path limit, embeds a filesystem-specific name ceiling in shared protocols and increases copied retained state. The existing native counted interfaces already separate logical traversal from message capacity and carry original cleanup obligations, so they are the preferred route.

A new generic path-staging protocol would add another parser and lifetime owner. Reuse existing component acquisition and streamed target/report mechanisms first. Any remaining administrative operation that genuinely needs counted retained input must have an explicit source, storage budget and retirement contract before implementation; it cannot borrow a job scope's authority by changing a selector.

Tracking and rollout

Track this migration with the phase 6 requirements. Freeze the exact original producers, consumers, grant routes and retained-storage definitions before changing the ABI. Complete the native 20-case workload using the existing admitted scope, then migrate each remaining fixed-width family and remove its old callers and codecs. Publish coherent signed dependency selections and catalogs after each complete interface slice. Preserve earlier refusals and historical inputs without treating them as acceptance of newer heads.

## Problem and motivation The legacy VFS requests store complete paths and directory names in 240-byte arrays. A valid ext directory entry can contain a 255-byte name, and a path containing that entry is longer still. These limits also remain in several client helpers, mount records and loader selectors. Increasing the arrays would create another fixed ceiling and would still narrow FAT names, whose format allows 255 UTF-16 units. The native filesystem interfaces already accept counted raw components and directory entries. The migration should make these interfaces the normal route and remove the remaining fixed-width convenience APIs. ## Proposed behavior and scope Use the existing native acquisition scope, conditional component acquisition and counted directory protocols. Complete names remain borrowed byte slices; parsers check their declared extents, reserved fields, operation and correlation. Providers enforce their actual format rules: ext has a 255-byte component limit; FAT/exFAT have a 255-UTF-16-unit limit; RAM names consume explicitly supplied record and byte storage. Keep pathname traversal iterative and relative to original held root/cwd objects. A complete path has no independent VFS width or component-count ceiling. Complete paths and symlink targets may span several existing component or target-page calls. The 32 KiB kernel IPC envelope remains a per-message transport budget, rather than becoming a complete-path limit. Caller-offered reply capacity is checked before publishing an entry, cursor, object or metadata effect. Insufficient capacity returns a definite refusal without shortening the value. For the full filename fixture, use a narrowly selected native realm-byte-client workload through its existing admitted acquisition scope. It must observe all four policy directories and all five names, including the 255-byte entries and their full absolute paths. Rootd records the distinct complete result; the workload supplies no provider endpoints, guessed handles or additional credentials. The existing generic Rootd namespace endpoint cannot be relabeled as a native job scope. Migrate the fixed-width namespace/provider, loader and launch-probe helpers together with their actual callers. Replace retained `CanonicalPath` arrays and mounted-name buffers with counted storage owned by their original deployment records. Reuse existing provider custody and name arenas where they already support the full value. This includes LibIPC, LibVFS, Vfsd, E2fsd, Fatd, Ramfsd, Loaderd, Launchd, Rootd, Deviced, Coreutils and Integration. Bootstrap mount, filesystem-launch and runtime-graph path records need corresponding versioned counted representations in LibBootstrap and BootTool. Docs and the affected component documentation describe the resulting contracts. ## Authority, security and reliability Lengths, path bytes, cursor tokens, inode metadata and cleanup keys confer no authority. Every operation uses the original received endpoint and its existing operation, root, write, lifetime and caller ceiling. Root/cwd and directory grants come from that same admitted source; a convenience adapter cannot create an independent root, bypass a denied search or reconstitute a grant from descriptive metadata. Register candidate and provider cleanup identities before acquisition. Keep original owners on success, refusal, interruption, malformed framing and lost replies until retirement is positively confirmed. A returned handle from a contradictory reply cannot nominate a cleanup target. Preserve the first operation error while independently retaining each uncertain retirement. Unknown owners prevent success, row reuse and further ordinary work. Keep cursor reservations on the original open description and publish them only after complete entry/capacity acceptance. Duplicate descriptors share that cursor without making its numeric value authority. Mount overlays retain their original entering-parent/root pins and the complete configured name. Precharge retained path/name bytes and rows from the actual deployment budget before publication; failed preparation must remain independently drainable. Use new operation/version framing for replacements. Old fixed layouts cannot be accepted as a prefix of the new form, and callers cannot fall back to the legacy family after a refusal. Retire obsolete codecs, constants, adapters and documentation after every selected producer and consumer has migrated. Ordinary native routes preserve their existing raw-byte semantics; filesystem-specific Unicode or UTF-16 rules remain with the provider that requires them. ## Acceptance criteria - Parse and encode complete 255-byte ext names, full paths beyond 240 bytes, FAT names beyond 255 UTF-8 bytes, raw non-UTF-8 ext/RAM names and multi-message logical traversal. Exercise exact/short/excessive counts, overflow, unknown versions, trailing bytes and malformed reserved fields. - Keep output, cursor and provider state unchanged on caller-capacity refusal. Reject truncated names and paths, including a valid prefix with missing final bytes. - Exercise original root/cwd ceilings, denied search, write attenuation, foreign scopes, stale generations, conditional permission changes, symlink loops and long streamed targets. No pathname, object metadata or cursor may substitute for a grant. - Exercise acquisition interruption, lost/malformed replies, first-error preservation and independent retirement uncertainty. Confirm original cleanup keys cannot select another scope or recycled owner. - Run the genuine native filename workload against all 20 independently generated records. Check full name bytes, file metadata, complete payload, EOF, exact inventory, cursor progress and cleanup. A 16-case transitional check does not satisfy this criterion. - Preserve encrypted namespace-write denials, existing ordinary filesystem controls and every original scenario deadline. Source-only mode controls, generated-media controls and guest acceptance remain separate. - Run fmt, strict Clippy, units, private/public warning-denied rustdoc and affected native builds for each changed repository; add meaningful parser/provider/VM controls and inspect the exact signed full CI runs. Keep authored code below 1,000 lines and remove superseded APIs. ## Alternatives and tradeoffs Widening the 240-byte arrays retains an arbitrary whole-path limit, embeds a filesystem-specific name ceiling in shared protocols and increases copied retained state. The existing native counted interfaces already separate logical traversal from message capacity and carry original cleanup obligations, so they are the preferred route. A new generic path-staging protocol would add another parser and lifetime owner. Reuse existing component acquisition and streamed target/report mechanisms first. Any remaining administrative operation that genuinely needs counted retained input must have an explicit source, storage budget and retirement contract before implementation; it cannot borrow a job scope's authority by changing a selector. ## Tracking and rollout Track this migration with the [phase 6 requirements](https://git.erikinkinen.fi/erix/integration/issues/65). Freeze the exact original producers, consumers, grant routes and retained-storage definitions before changing the ABI. Complete the native 20-case workload using the existing admitted scope, then migrate each remaining fixed-width family and remove its old callers and codecs. Publish coherent signed dependency selections and catalogs after each complete interface slice. Preserve earlier refusals and historical inputs without treating them as acceptance of newer heads.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:47 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/lib-ipc#9
No description provided.