ENUM VM_FAULT_REASON(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum vm_fault_reason(9) ✨

okay so bestie, welcome to the enum vm_fault_reason man page from the Kernel API Manual πŸ’– this is genuinely one of those pages that looks scary and then turns out to be a whole mood board of "what happened when the fault got handled" flags, and honestly? iconic.

The core lore: page fault handlers return a bitmask made of these values to tell the core VM what actually went down while handling the fault. And the core VM uses that info to decide whether a process gets delivered SIGBUS or just gets its major/minor fault counters bumped up. no cap, that's the whole drama πŸŽ€


✨ SYNOPSIS ✨

enum vm_fault_reason {
    VM_FAULT_OOM ,
    VM_FAULT_SIGBUS ,
    VM_FAULT_MAJOR ,
    VM_FAULT_HWPOISON ,
    VM_FAULT_HWPOISON_LARGE ,
    VM_FAULT_SIGSEGV ,
    VM_FAULT_NOPAGE ,
    VM_FAULT_LOCKED ,
    VM_FAULT_RETRY ,
    VM_FAULT_FALLBACK ,
    VM_FAULT_DONE_COW ,
    VM_FAULT_NEEDDSYNC ,
    VM_FAULT_COMPLETED ,
    VM_FAULT_HINDEX_MASK

};

🌸 Constants 🌸

like, every single one, in order, no skips, we eating the whole plate πŸ“

  • VM_FAULT_OOM β€” Out Of Memory πŸ’€
  • VM_FAULT_SIGBUS β€” Bad access 😭
  • VM_FAULT_MAJOR β€” Page read from storage πŸ¦‹
  • VM_FAULT_HWPOISON β€” Hit poisoned small page 🧚
  • VM_FAULT_HWPOISON_LARGE β€” Hit poisoned large page. Index encoded in upper bits ✨
  • VM_FAULT_SIGSEGV β€” segmentation fault πŸ™ˆ
  • VM_FAULT_NOPAGE β€” ->fault installed the pte, not return page πŸ’…
  • VM_FAULT_LOCKED β€” ->fault locked the returned page πŸ”₯
  • VM_FAULT_RETRY β€” ->fault blocked, must retry πŸ‘‘
  • VM_FAULT_FALLBACK β€” huge page fault failed, fall back to small 🌈
  • VM_FAULT_DONE_COW β€” ->fault has fully handled COW ⭐
  • VM_FAULT_NEEDDSYNC β€” ->fault did not modify page tables and needs fsync to complete (for synchronous page faults in DAX) πŸ’œ
  • VM_FAULT_COMPLETED β€” ->fault completed, meanwhile mmap lock released 🫢
  • VM_FAULT_HINDEX_MASK β€” mask HINDEX value πŸ’–
bestie the ->fault notation is literal, don't rename it, it's giving "pointer to the fault callback" and it's staying exactly like that πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're all in the same friend group:


okay that's the whole page, you ate that πŸ’… this one lives in ./include/linux and the date on it is October 2026, so yeah, your girl is timestamped and documented, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from