Skip to content

Feat/page fault handling - #91

Open
yash20720 wants to merge 5 commits into
manaskamal:masterfrom
yash20720:feat/page-fault-handling
Open

Feat/page fault handling#91
yash20720 wants to merge 5 commits into
manaskamal:masterfrom
yash20720:feat/page-fault-handling

Conversation

@yash20720

Copy link
Copy Markdown
Contributor

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.

- 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
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.

1 participant