fix(arm64): achieve full Copy-on-Write parity with x86-64 #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes multiple ARM64 Copy-on-Write implementation issues to achieve complete parity with x86-64. All 6 CoW tests now pass on ARM64.
Fixes Implemented
tlbi vmalle1isin context_switch.rs and syscall_entry.rs - ARM64 requires explicit TLB invalidation unlike x86-64's automatic CR3 behavior>=instead of==for page alignmentTest Results (ARM64)
6/6 tests pass - Full CoW parity achieved.
Files Changed
kernel/src/arch_impl/aarch64/context_switch.rs- TLB flushkernel/src/arch_impl/aarch64/exception.rs- CoW stats, SIGSEGV handlingkernel/src/arch_impl/aarch64/syscall_entry.rs- TLB flushkernel/src/interrupts.rs- Re-export shared cow_stats modulekernel/src/memory/cow_stats.rs- NEW: Shared CoW statistics modulekernel/src/memory/layout.rs- Stack address validation fixkernel/src/memory/mod.rs- Add cow_stats modulekernel/src/process/manager.rs- HHDM-based fork stack copykernel/src/process/process.rs- cleanup_cow_frames implementationlibs/libbreenix/src/memory.rs- sbrk page alignment fixuserspace/tests/cow_oom_test.rs- Test design fixdocs/planning/ARM64_TEST_CATALOG.md- NEW: Comprehensive test catalog🤖 Generated with Claude Code