[FEATURE] Retain native fault continuations through scheduler handoff #122
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/kernel#122
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
Native fault handling needs an explicit owner for the execution, frame, stack and mapping resources that remain involved while userspace receives a fault and chooses its disposition.
Proposed behavior and scope
Kernel fault handling transfers one original continuation through entry completion, scheduler handoff, userspace delivery and final return or disposal. Reserve a separate per-CPU continuation stack during fallible CPU setup; architectural interrupt stacks keep their existing roles. Coordinate Kernel, lib-ipc and Pagerd consumers.
Authority, security and reliability
A continuation retains its actual original execution, frame, stack and mapping owners. Addresses, process identifiers, source withdrawal and acknowledgements do not establish physical retirement. Partial handoff failures preserve those same resources and the first error. Release execution and memory resources only after their actual outstanding uses end. Do not allocate in interrupt or queue commit paths, hold mutable guards across interruptible waits, or lose timer/device work on contention.
Acceptance criteria
Alternatives and tradeoffs
A separate retained continuation stack adds per-CPU storage but makes stack ownership explicit. Reusing an architectural interrupt stack would couple unrelated roles. A queued completion flag cannot replace the actual handoff and retirement resources.
Tracking and rollout
Part of Alpha 1 acceptance. Keep native admission disabled until the complete handoff, userspace consumers and failure paths are reviewed together. Source-model tests alone do not establish physical execution.