vma_modify_flags_uffd(9)
π¦ vma_modify_flags_uffd(9) π¦
okay so bestie, welcome to the manual page for vma_modify_flags_uffd(9) β lowkey the kernel API function that does the pre-game prep before the actual flag glow-up π
β¨ it's giving "backstage crew, not the main character" and honestly? iconic.
πΈ NAME πΈ
vma_modify_flags_uffd β Perform any necessary split/merge in preparation for setting VMA flags to @vm_flags and UFFD context to @new_ctx in the range @start to @end contained within @vma.
β¨ SYNOPSIS β¨
struct vm_area_struct * vma_modify_flags_uffd (struct vma_iterator *vmi
, struct vm_area_struct *prev , struct vm_area_struct *vma , unsigned
long start , unsigned long end , const vma_flags_t *vma_flags , struct
vm_userfaultfd_ctx new_ctx , bool give_up_on_oom );
π ARGUMENTS π
vmiβ a valid VMA iterator, positioned atvma. no cap, it has to be valid.prevβ the VMA immediately prior tovma, orNULLifvmais the first one. first-place energy π₯vmaβ the VMA containing the rangestarttoendthat's getting updated.startβ the start of the range to update. it may be offset withinvma, so don't assume it starts at the very beginning.endβ the exclusive end of the range to update, and yes it may be offset withinvma. exclusive means the end itself is not included, bestie.vma_flagsβ the VMA flags that thestarttoendrange is about to be set to.new_ctxβ the userfaultfd context that thestarttoendrange is about to be set to.give_up_on_oomβ if an out of memory condition occurs on merge, simply give up on it and treat the merge as best-effort. it's the "we tried, it's fine" flag π«Ά
π DESCRIPTION π
IMPORTANT: the actual modification being requested here is NOT applied. periodt. this function is not doing the flag flip or the context swap for you.
instead, the VMA is perhaps split, perhaps merged to accommodate the change β and the caller is expected to perform the actual modification. yes, that means you, the caller. you're the main character now π.
π RETURN π
a VMA which contains the range start to end, ready to have its VMA flags changed to vma_flags and its userfaultfd context changed to new_ctx. it's prepped and ready, like a fit laid out the night before π
π¦ SEE ALSO π¦
Kernel file ./mm/vma.h, plus vma_modify_flags(9), vma_modify_name(9), and vma_modify_policy(9). go read those too, iykyk.
made with π from ./mm Β· October 2026 Β· vma_modify_flags_uffd(9) β slay and stay safe out there π
π¦ 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