Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • O OSKernel2026-StellaOS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • StellaOS
  • OSKernel2026-StellaOS
  • Merge requests
  • !26

fix(mm): kernel-space page fault detection + interrupt stack for guard page

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged StellaOS requested to merge fix/kernel-page-fault-guard into main Jun 02, 2026
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 7
  • kernel_callback: detect kernel-space StorePageFault/LoadPageFault/ StoreFault (previously only LoadFault was checked), panic with stval and sepc instead of silent triple-fault or misrouted SIGSEGV
  • _interrupt_for_arch: before user-space COW/lazy-alloc, check for kernel-space faults and guard page hits -> clear panic diagnostics
  • KernelStack: expose guard_bottom/guard_top and guard position helper
  • kernelvec S->S path: replace "csrr sp, sscratch" with interrupt stack (static 8KB array in .bss, accessed via la/li/add) so that trap handler can run even when task sp has entered the guard page
  • Verified in QEMU: sp-in-guard-page store now panics with "kernel StorePageFault at 0xffffffffffffa008" + backtrace instead of silent triple-fault hang

Adds KERNEL_STACK_GUARD_SIZE, KERNEL_INTR_STACK_SIZE constants.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/kernel-page-fault-guard