get_user_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is get_user_pages(9) from the Kernel API Manual, and the name is literally doing the most: get_user_pages β€” pin user pages in memory. that's the whole vibe. ✨


✨ SYNOPSIS ✨

long get_user_pages (unsigned long start , unsigned long nr_pages ,
       unsigned int gup_flags , struct page **pages );

🫢 ARGUMENTS 🫢

  • start β€” starting user address. πŸ“
  • nr_pages β€” number of pages from start to pin. πŸ”’
  • gup_flags β€” flags modifying lookup behaviour. 🚩
  • pages β€” array that receives pointers to the pages pinned. Should be at least nr_pages long. Or NULL, if caller only intends to ensure the pages are faulted in. πŸ“¦

🧚 DESCRIPTION 🧚

This is the same as get_user_pages_remote, just with a less-flexible calling convention where we assume that the mm being operated on belongs to the current task, and doesn't allow passing of a locked parameter. We also obviously don't pass FOLL_REMOTE in here. periodt. πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./mm/gup.c β€” and the see-also squad is: try_grab_folio(9), unpin_user_page(9), unpin_folio(9), folio_add_pin(9), unpin_user_pages_dirty_lock(9), unpin_user_page_range_dirty_lock(9), unpin_user_pages(9), unpin_user_folio(9), unpin_folios(9), try_grab_folio_fast(9), follow_page_mask(9), __get_user_pages(9), fixup_user_fault(9), populate_vma_page_range(9), fault_in_writeable(9), fault_in_subpage_writeable(9), fault_in_readable(9), get_dump_page(9), get_user_pages_remote(9), get_user_pages_fast_only(9), get_user_pages_fast(9), pin_user_pages_fast(9), pin_user_pages_remote(9), pin_user_pages(9), memfd_pin_folios(9), folio_add_pins(9) πŸ¦‹


okay that's the whole page, bestie β€” mwah! πŸ’‹ this one came from ./mm and it's dated October 2026. go pin some pages responsibly πŸ˜ŒπŸ’…

πŸ“¦ where this page comes from