vma_modify_flags(9)
π vma_modify_flags(9) β your Kernel API Manual bestie moment π
okay so this is a page straight outta the Kernel API Manual, section 9, and it's all about getting a VMA ready for a flag glow-up β¨ β not actually doing the glow-up. huge difference, we'll get there π
πΈ NAME πΈ
vma_modify_flags β do all the necessary split/merge prep work so you can set the VMA flags to *@vm_flags across the range @start to @end that lives inside @vma. it's giving backstage crew energy π«Ά
β¨ SYNOPSIS β¨
struct vm_area_struct * vma_modify_flags (struct vma_iterator *vmi ,
struct vm_area_struct *prev , struct vm_area_struct *vma , unsigned long
start , unsigned long end , vma_flags_t *vma_flags_ptr );
π¦ ARGUMENTS π¦
vmiβ a valid VMA iterator, and it's gotta be positioned atvma. no vibing off to the side, it has to be literally on it πprevβ the VMA that comes immediately beforevma. orNULLifvmais the first one, in which case, no prev, no problem πvmaβ the VMA that contains the rangestarttoendyou're about to update. this is the main character πstartβ where the range to update begins. it may be offset withinvma, so no cap it can start somewhere in the middle πendβ the exclusive end of the range to update. may also be offset withinvma. exclusive bestie, so don't include it πvma_flags_ptrβ a pointer to the VMA flags that thestarttoendrange is about to be set to. on merge, this gets updated to include the sticky flags. yes, it's a pointer, yes it changes, keep up π§
π DESCRIPTION π
IMPORTANT, read this twice bestie: the actual modification being requested here is NOT applied. periodt. what happens is the VMA is perhaps split, perhaps merged, so it can accommodate the change β and then the caller is expected to perform the actual modification themselves. it's a prep step, not a finish line π
so to account for those sticky VMA flags, the vma_flags_ptr parameter points at the requested flags, and then those flags get updated. that way, if the caller goes ahead and overwrites any existing flags, they correctly retain the sticky ones. highkey thoughtful of it π
β RETURN β
a VMA that contains the range start to end, all ready for its flags to be altered to *vma_flags. slay, hand it over π
π SEE ALSO π
kernel file ./mm/vma.h, plus the whole crew:
iykyk π
π and that's the whole page, bestie! it ships from ./mm, dated October 2026, and yes the page name is literally vma_modify_flags(9) β iconic, no notes, bye πβ¨π¦
π¦ 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