page_mapped_in_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

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