remap_vmalloc_range_partial(9)
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 coveruaddrβ target user address to start atkaddrβ virtual address of vmalloc kernel memorypgoffβ offset fromkaddrto start atsizeβ 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:
vunmap_range(9)vmap_pages_range(9)vm_area_map_pages(9)vm_area_unmap_pages(9)new_vmap_block(9)vm_unmap_aliases(9)vm_unmap_ram(9)vm_map_ram(9)vm_area_add_early(9)vm_area_register_early(9)get_vm_area(9)find_vm_area(9)remove_vm_area(9)vfree_atomic(9)vfree(9)vunmap(9)vmap(9)vmap_pfn(9)__vmalloc_node_range(9)__vmalloc_node(9)vmalloc(9)vmalloc_huge_node(9)vzalloc(9)vmalloc_user(9)vmalloc_node(9)vzalloc_node(9)vrealloc_node_align(9)vmalloc_32(9)vmalloc_32_user(9)vread_iter(9)remap_vmalloc_range(9)pvm_find_va_enclose_addr(9)pvm_determine_end_from_reverse(9)pcpu_get_vm_areas(9)pcpu_free_vm_areas(9)
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
- 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