[BUG] Enforce the compatibility offset maximum before file effects #23
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#23
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?
Summary
Regular-file compatibility I/O bounds positions by the native unsigned domain instead of the signed offset maximum of its open description. Atomic append cannot carry that maximum to the provider, so a write can commit bytes beyond the compatibility representation before its cursor is checked.
Reproduction
Source-derived, not executed: admit a regular file whose current EOF is at the signed 64-bit offset maximum, select APPEND, and issue a nonempty Write. The same missing boundary affects a read starting at the maximum before a larger native file's EOF. The newly authored seek/positioned operations make the boundary directly expressible too.
Expected and actual behavior
Expected: no transfer crosses the description's offset maximum. A boundary-crossing transfer can commit its representable prefix; a positive write starting at the maximum reports EFBIG without an effect. A positive read at the maximum reports EOVERFLOW only when before actual EOF, otherwise EOF. Empty I/O retains its normal access checks.
Actual source path: compatibility file admission clips only against u64::MAX, and the provider write family carries no caller-specific end limit. A separate size query cannot fix atomic append because another writer may change EOF between calls. No oversized fixture or runtime execution was used for this report.
Environment and identity
85efb7f9, coordinated feature branch.Evidence and prior checks
The actual file-admission path subtracts the retained position from u64::MAX. Native and private candidate-write bodies contain position, append and data but no end limit. Follow the primary read and write offset-maximum contracts. Tests, builds and CI observation are deferred by user instruction.
Tracking
The positioned/vector I/O and shared-seeking implementation is signed and published: lib-ipc
727b1470, lib-posixabiddc59f2c, posixd1fd58a05, vfsd020e9feb, e2fsda9b91e44, ramfsd03bea99f, fatd8ab6df60, integratione0c9cfc1, docs2c521015. Complete file I/O remains open for actual signal interruption and blocking/wait integration. Checkpoint publication does not accept that unfinished runtime scope.Compatibility1.8 defines exact positioned/vector/seek families, checked borrowed vector sums and signed positions. Pread/Pwrite preserve the shared cursor; Pwrite ignores APPEND. One gathered prefix preserves native append atomicity. Fresh END/DATA/HOLE size comes from the same live admitted candidate and original provider object, including write-only descriptions, without new read authority or path reopening. Streams/channels retain nonblocking behavior and reject positioning. Access checks precede empty I/O.
Disjoint candidate-write version two replaces the superseded API and carries an explicit full-width end limit. Ext/RAM choose EOF, clip the prefix and write in one exclusive turn. Signed boundary writes report EFBIG before effects; boundary reads distinguish EOVERFLOW before EOF from actual EOF. Positive result correlation checks the limit, while zero progress preserves content, timestamps and the shared cursor. Native callers retain their own full-width limits.
Canonical correlated BUSY/RETRY without progress preserves the original fd for a later new call. Malformed/lost/uncertain results retain cleanup-only custody; refused completion never replays an effect. This fixes VFS transient admission, Posixd transient admission and signed offset maxima. The reports use the bug template and remain source-derived, without executed reproduction claims.
Thirty-seven new unit controls are authored and unrun: seven compatibility codec, five IPC codec, two ext, two RAM, two FAT/exFAT, five VFS and fourteen Posixd file/stream/channel controls. The native realm workload covers positioned cursor preservation, append independence, gathered/scattered bytes, shared seeks, fresh EOF after an independent writer and sparse growth. Original native authority and exit/deadline gates are preserved.
Current phase progress is 17.04% weighted and 5.61% whole-item acceptance: 22/460 parents and 442/902 sub-items. Actual signal delivery and blocking waits remain unfinished; transport failure or caller disappearance never fabricates EINTR. Both full EriX guest-build generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed.
Repair within complete positioned/vectored I/O. Replace the candidate-write wire family with a disjoint version carrying an explicit full-width end limit, enforced atomically with EOF selection inside the provider. Retire the superseded API and update every producer/consumer together. Preserve native callers' ability to select their own representable maximum. Track overall work in Integration.
erikinkinen referenced this issue from erix/lib-posixabi2026-09-30 09:18:31 +02:00
erikinkinen referenced this issue from erix/blockd2026-09-30 09:18:32 +02:00
erikinkinen referenced this issue from erix/coreutils2026-09-30 09:18:33 +02:00
erikinkinen referenced this issue from erix/crashd2026-09-30 09:18:33 +02:00
erikinkinen referenced this issue from erix/deviced2026-09-30 09:18:34 +02:00
erikinkinen referenced this issue from erix/docs2026-09-30 09:18:34 +02:00
erikinkinen referenced this issue from erix/drv-acpi2026-09-30 09:18:35 +02:00
erikinkinen referenced this issue from erix/drv-i80422026-09-30 09:18:35 +02:00
erikinkinen referenced this issue from erix/drv-ps2-keyboard2026-09-30 09:18:36 +02:00
erikinkinen referenced this issue from erix/drv-ps2-mouse2026-09-30 09:18:36 +02:00
erikinkinen referenced this issue from erix/drv-rtc-cmos2026-09-30 09:18:37 +02:00
erikinkinen referenced this issue from erix/drv-serial2026-09-30 09:18:37 +02:00
erikinkinen referenced this issue from erix/drv-virtio-block2026-09-30 09:18:38 +02:00
erikinkinen referenced this issue from erix/dynlinkd2026-09-30 09:18:39 +02:00
erikinkinen referenced this issue from erix/e2fsd2026-09-30 09:18:39 +02:00
erikinkinen referenced this issue from erix/exsh2026-09-30 09:18:39 +02:00
erikinkinen referenced this issue from erix/extop2026-09-30 09:18:40 +02:00
erikinkinen referenced this issue from erix/fatd2026-09-30 09:18:41 +02:00
erikinkinen referenced this issue from erix/fbcond2026-09-30 09:18:41 +02:00
erikinkinen referenced this issue from erix/hotplugd2026-09-30 09:18:42 +02:00
erikinkinen referenced this issue from erix/inputd2026-09-30 09:18:42 +02:00
erikinkinen referenced this issue from erix/integration2026-09-30 09:18:43 +02:00
erikinkinen referenced this issue from erix/irqd2026-09-30 09:18:44 +02:00
erikinkinen referenced this issue from erix/kernel2026-09-30 09:18:45 +02:00
erikinkinen referenced this issue from erix/keyd2026-09-30 09:18:46 +02:00
erikinkinen referenced this issue from erix/launchd2026-09-30 09:18:46 +02:00
erikinkinen referenced this issue from erix/lib-block2026-09-30 09:18:47 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-30 09:18:47 +02:00
erikinkinen referenced this issue from erix/lib-capabi2026-09-30 09:18:47 +02:00
erikinkinen referenced this issue from erix/lib-driver2026-09-30 09:18:48 +02:00
erikinkinen referenced this issue from erix/lib-input2026-09-30 09:18:48 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-30 09:18:48 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-30 09:18:49 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-30 09:18:49 +02:00
erikinkinen referenced this issue from erix/lib-posixabi2026-09-30 09:18:50 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-30 09:18:50 +02:00
erikinkinen referenced this issue from erix/lib-stdio2026-09-30 09:18:51 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-30 09:18:51 +02:00
erikinkinen referenced this issue from erix/lib-tty2026-09-30 09:18:51 +02:00
erikinkinen referenced this issue from erix/lib-vfs2026-09-30 09:18:51 +02:00
erikinkinen referenced this issue from erix/loaderd2026-09-30 09:18:51 +02:00
erikinkinen referenced this issue from erix/logd2026-09-30 09:18:52 +02:00
erikinkinen referenced this issue from erix/memd2026-09-30 09:18:52 +02:00
erikinkinen referenced this issue from erix/named2026-09-30 09:18:52 +02:00
erikinkinen referenced this issue from erix/pagerd2026-09-30 09:18:53 +02:00
erikinkinen referenced this issue2026-09-30 09:18:53 +02:00
erikinkinen referenced this issue from erix/powerboxd2026-09-30 09:18:53 +02:00
erikinkinen referenced this issue from erix/probed2026-09-30 09:18:54 +02:00
erikinkinen referenced this issue from erix/procd2026-09-30 09:18:54 +02:00
erikinkinen referenced this issue from erix/ramfsd2026-09-30 09:18:55 +02:00
erikinkinen referenced this issue from erix/rootd2026-09-30 09:18:55 +02:00
erikinkinen referenced this issue from erix/seriald2026-09-30 09:18:55 +02:00
erikinkinen referenced this issue from erix/timed2026-09-30 09:18:56 +02:00
erikinkinen referenced this issue from erix/ttyd2026-09-30 09:18:56 +02:00
erikinkinen referenced this issue from erix/vfsd2026-09-30 09:18:56 +02:00
erikinkinen referenced this issue from erix/vspaced2026-09-30 09:18:57 +02:00