ENUM VM_FAULT_REASON(9)
β¨ 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β->faultinstalled the pte, not return page πVM_FAULT_LOCKEDβ->faultlocked the returned page π₯VM_FAULT_RETRYβ->faultblocked, must retry πVM_FAULT_FALLBACKβ huge page fault failed, fall back to small πVM_FAULT_DONE_COWβ->faulthas fully handled COW βVM_FAULT_NEEDDSYNCβ->faultdid not modify page tables and needs fsync to complete (for synchronous page faults in DAX) πVM_FAULT_COMPLETEDβ->faultcompleted, 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:
- Kernel file
./include/linux/mm_types.h softleaf_t(9)struct folio(9)struct ptdesc(9)vm_fault_t(9)enum fault_flag(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms