page_mapped_in_vma(9)
π page_mapped_in_vma(9) β like, the Kernel API Manual, bestie β¨
okay so before we even start: this is a page from the kernel API manual, section 9, and it's literally called page_mapped_in_vma. it's giving "one very specific job and it does it perfectly" energy. slay. let's get into it π
β¨ NAME β¨
page_mapped_in_vma β check whether a page is really mapped in a VMA π«Ά
like yes bestie, we're doing a vibe check on a page to see if it's actually showing up in that VMA. no cap, that's the whole thing.
πΈ SYNOPSIS πΈ
unsigned long page_mapped_in_vma (const struct page *page , struct vm_area_struct *vma );
look at her go. two arguments, one unsigned long coming back at you. iconic. π
π¦ ARGUMENTS π¦
pageβ the page we're testing. that's our main character right there πvmaβ the VMA we're testing it against. the VMA in question, if you will π
π₯ RETURN π₯
so here's what you get back, and this part matters, so pay attention bestie:
- if the page is inside the range covered by the VMA and it's present in the page table β you get the address the page is mapped at. cute! π
- if the page is outside the VMA or it's just not present β you get
-EFAULT. sad but honest π
β οΈ ok real talk: this is only valid for normal file or anonymous VMAs. do not come in here with anything else, it will not go well. that's the caveat, don't skip it π
π SEE ALSO π
- Kernel file
./mm/page_vma_mapped.cπ check_pte(9)page_vma_mapped_walk(9)
go read those if you wanna see the whole friend group, iykyk π
and that's the page, fr fr. this little gem lives in ./mm, and the manual's dated October 2026 β so yeah, slightly future-flavoured, main character energy only π§β¨ bye bestie, go map some pages responsibly π
π¦ 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