remap_vmalloc_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– remap_vmalloc_range(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for remap_vmalloc_range(9) β€” it's giving β€œmap vmalloc pages to userspace” and it's lowkey iconic. no cap, let's get into it 🫢✨


πŸ’– NAME πŸ’–

remap_vmalloc_range β€” map vmalloc pages to userspace 🌈


✨ SYNOPSIS ✨

int remap_vmalloc_range (struct vm_area_struct *vma , void *addr ,
       unsigned long pgoff );

πŸŽ€ ARGUMENTS πŸŽ€

  • vma β€” the vma to cover, bestie: map the full range of vma. πŸ’…
  • addr β€” vmalloc memory. literally the memory in question.
  • pgoff β€” number of pages into addr before the first page to map. yes, that's the offset vibe.

🌸 RETURN 🌸

0 for success, -Exxx on failure. that's it, that's the whole return section πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function checks that addr is a valid vmalloc'ed area, and that it is big enough to cover the vma. Will return failure if that criteria isn't met. periodt.

Similar to remap_pfn_range (see mm/memory.c). πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./mm/vmalloc.c β€” and here's the whole friend group, bestie:


xoxo, bestie β€” this page's source/version is ./mm, dated October 2026 πŸ’…βœ¨

πŸ“¦ where this page comes from