Skip to content

fix(x86): preserve ENTER faults and probe final stack permissions - #11

Merged
gmh5225 merged 1 commit into
masterfrom
codex/enter-fault-semantics
Oct 5, 2026
Merged

gmh5225 merged 1 commit into
masterfrom
codex/enter-fault-semantics

Conversation

@gmh5225

@gmh5225 gmh5225 commented Oct 5, 2026

Copy link
Copy Markdown

ENTER did not check write permission at its final stack pointer. It could incorrectly succeed on an unmapped or read-only final frame location and publish BP/SP instead of faulting.

Probe the complete operand-width span after the real frame stores and before updating either architectural register. Reuse the store permission and invalid-access repair machinery, without a data store, valid-write observation, copy-on-write allocation, or device I/O. Completed frame stores remain visible when a later access faults; fault repair and restart retain the original entry registers.

Validation: all 22 CTest suites passed with x86, ARM and AArch64 enabled. The added x86 regressions cover 48 ordered fault cases, 16 repair/stop/restart cases, 84 overlapping-copy cases, and four write-only final probes across 16/32-bit protected-mode and 16/64-bit long-mode operands. The final-probe regressions fail against the preceding library. Independent original Linux x64 instructions confirmed the required partial-store fault behavior.

@gmh5225
gmh5225 merged commit 596514c into master Oct 5, 2026
59 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants