Feat/page fault handling - #91
Open
yash20720 wants to merge 5 commits into
Open
Conversation
- Add shared diagnostic header BaseHdr/Hal/fault.h - Implement user vs kernel mode fault classification in x86_64 and ARM64 handlers - Gracefully terminate user-space faulting processes instead of halting kernel - Fix GCC/LLVM cross-compilation header issues in timer.h, stdarg.h, string.cpp, and core.c
This reverts commit 4fdcd24.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements graceful page fault handling and exception triage for x86_64 and ARM64 architectures.
Instead of freezing the entire operating system on a crash, the kernel now identifies whether a fault originated from user space or kernel space. For user-space crashes (page faults, GPF, invalid opcodes, stack faults), the kernel logs diagnostic info to the serial console and gracefully terminates only the faulting process, allowing the rest of the OS to keep running. Unrecoverable kernel-mode faults continue to panic safely.
Key updates include creating the shared header BaseHdr/Hal/fault.h, updating exception handlers in x86_64_exception.cpp and vector.c, implementing AuGetRootProcess() for ARM64, and resolving cross-compilation header issues across both GCC and LLVM toolchains. All changes compile cleanly with 0 errors.