remap_vmalloc_range_partial(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to remap_vmalloc_range_partial(9) from the Kernel API Manual β€” this is the one where vmalloc pages get mapped to userspace, and it's giving kernel-core πŸ’…βœ¨

✨ NAME ✨

remap_vmalloc_range_partial β€” map vmalloc pages to userspace. Literally what it says on the tin, no cap πŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the exact signature, bestie β€” keep it character-for-character:

       int remap_vmalloc_range_partial (struct vm_area_struct *vma , unsigned
       long uaddr , void *kaddr , unsigned long pgoff , unsigned long size );

πŸŽ€ ARGUMENTS πŸŽ€

Meet the cast, bestie 🫢:

  • vma β€” the vma to cover
  • uaddr β€” target user address to start at
  • kaddr β€” virtual address of vmalloc kernel memory
  • pgoff β€” offset from kaddr to start at
  • size β€” size of map area

πŸ’œ RETURN πŸ’œ

Returns 0 for success, -Exxx on failure. So if you see 0, she ate and left no crumbs; if you see -Exxx, something went sideways 😭

🌸 DESCRIPTION 🌸

okay so here's the tea β˜•: this function checks that kaddr is a valid vmalloc'ed area, and that it is big enough to cover the range starting at uaddr in vma. Will return failure if that criteria isn't met. No pretending, no vibes-only mapping, fr fr.

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

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./mm/vmalloc.c β€” the main character of this section πŸ’…. And here's the whole SEE ALSO squad, every single one, no skipping:

xoxo bestie 🫢 this page's source/version is ./mm, dated October 2026, and the manual page is remap_vmalloc_range_partial(9) β€” now go map those pages and slay βœ¨πŸ’–

πŸ“¦ where this page comes from