page_ext_from_phys(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ page_ext_from_phys(9) β€” a Kernel API Manual moment ✨

okay bestie, buckle up, this is a page from the Kernel API Manual and it's lowkey iconic πŸ’…


✨ NAME ✨

page_ext_from_phys β€” get the page_ext structure for a physical address, no cap πŸŽ€


🌸 SYNOPSIS 🌸

struct page_ext * page_ext_from_phys (phys_addr_t phys );

🫢 ARGUMENTS 🫢

  • phys β€” the physical address you wanna query, bestie. that's the whole assignment πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so this function safely gets the struct page_ext that's associated with a given physical address. the way it does it is honestly so responsible of it β€” it performs validation to make sure the address actually corresponds to a valid, online struct page before it even thinks about accessing it πŸ™ˆ like, it does a whole vibe check first, which is main character energy fr fr.

and if the vibe check fails? it returns NULL for MMIO, ZONE_DEVICE, holes and offline memory. periodt. πŸ’―


⭐ RETURN ⭐

NULL if no page_ext exists for this physical address. that's it, that's the tea πŸ“


πŸ’œ CONTEXT πŸ’œ

any context works here, bestie β€” it's giving flexible ✨

⚠️ but listen: the caller may not sleep until they have called page_ext_put. do not nap on the job, i'm so serious 😭

🌈 SEE ALSO 🌈

kernel file ./mm/page_ext.c and its besties page_ext_lookup(9), page_ext_get(9), page_ext_put(9) β€” go read them, iykyk πŸ‘‘


mwah πŸ’‹ that's a wrap! this lil page lives in the ./mm source and it's dated October 2026 β€” go off, kernel docs, you ate πŸŽ€πŸ’–πŸ§š

πŸ“¦ where this page comes from