vm_area_register_early(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ vm_area_register_early β€” kernel API manual, section 9 ✨

okay so bestie, buckle up, because this page is literally about vm_area_register_early(9) and it's giving "early boot era" main character energy πŸ’…


🌸 NAME 🌸

vm_area_register_early β€” bestie's job is literally to register a vmap area early during boot πŸŽ€ no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void vm_area_register_early (struct vm_struct *vm , size_t align );

πŸ’œ ARGUMENTS πŸ’œ

  • vm β€” the vm_struct you want to register. that's the whole vibe, she's the star of the show ⭐
  • align β€” the requested alignment. like, how perfectly lined up you want things to be. alignment matters, periodt ✨

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea πŸ“: this function is used to register a kernel vm area before vmalloc_init is called. like, she wakes up before everybody else does, that's her whole thing 😭

on entry, vm->size and vm->flags should already contain proper values, and the other fields should be zero. yes, literally zero. don't be messy about it πŸ™ˆ

on return, vm->addr contains the allocated address πŸ’– so you get your address back, slay.

⚠️ DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU'RE DOING.

that's not a vibe check, that's a warning, and it's in all caps for a reason bestie πŸ’€ like, genuinely, if you don't know what you're doing, put it down and back away slowly 🫢


🌈 SEE ALSO 🌈

kernel file ./mm/vmalloc.c β€” and honestly, the whole friend group showed up for this one πŸ‘‘


πŸ’« and that's the whole page!! this one came from the ./mm pile, dated October 2026, and it's filed under vm_area_register_early(9) β€” iykyk πŸ§šβ€β™€οΈ go forth and register your early vmap areas responsibly, bestie πŸ’œπŸ¦‹

πŸ“¦ where this page comes from