vunmap_range(9)
π vunmap_range(9) β from the Kernel API Manual, bestie β¨
Okay so picture this: you're deep in the kernel, you've got a chunk of virtual address space, and you need it gone. Not "eh, maybe later" gone. Gone gone. That's literally what this page is about, and ngl it's kind of iconic. π
πΈ NAME πΈ
vunmap_range β unmaps kernel virtual addresses. That's it, that's the whole vibe. Bye-bye mappings. π«Ά
β¨ SYNOPSIS β¨
void vunmap_range (unsigned long addr , unsigned long end );
Look at that signature. Clean. Minimal. Main character energy. π
π¦ ARGUMENTS π¦
addrβ where the VM area you're nuking starts. The beginning. The opener. πendβ where that VM area stops β and heads up bestie, it's non-inclusive, soenditself is not part of the range. It's giving "exclusive party, you're not on the list" π
π₯ DESCRIPTION π₯
So what does it actually do? It clears any present PTEs in that virtual address range, then flushes TLBs and caches. Boom. Clean slate. β¨
β οΈ But listen β and I need you to hear me on this one β if anything touches that address after this and before it's been re-mapped? That's a kernel bug. Not a "whoops lol" bug. A real one. Absolutely do not. π
π SEE ALSO π
The whole friend group, fr fr β all of these live in the kernel file ./mm/vmalloc.c:
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_partial(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)
Like, that's the whole squad. Go say hi. π
Okay that's the page!! π
This lil beauty came from ./mm, dated October 2026 β mwah, no notes, periodt. πβ¨
π¦ 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