clear_user_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clear_user_page(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is the clear_user_page page and it's literally about clearing a page so it can be mapped into user space 🫢


🌸 NAME 🌸

clear_user_page β€” clear a page to be mapped to user space


✨ SYNOPSIS ✨

void clear_user_page (void *addr , unsigned long vaddr , struct page *page );

πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” the address of the page, periodt πŸ’…
  • vaddr β€” the address of the user mapping, iykyk
  • page β€” the page. that's it. that's the page πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe: we condition the definition of clear_user_page on the architecture not having a custom clear_user_highpage. and why, you ask? πŸ‘€ because if there's some special flushing needed for clear_user_highpage, then it's likely that clear_user_page also needs some magic too πŸ”₯ so like, they go together, no cap.

and honestly? since our only caller is the generic clear_user_highpage, not defining it is not much of a loss πŸ™ˆ like, it's giving "we're fine actually" energy fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/highmem.h β€” yes bestie, that's where the lore lives πŸ“–


ngl bestie, that's a whole friend group of kmap and folio pages right there β€” go read them, they ate πŸ’€βœ¨

mwah πŸ’‹ this page lives in ./include/linux, dated October 2026, and it's literally called clear_user_page(9) ⭐ slay and goodbye ⭐ πŸ§šπŸ’œ

πŸ“¦ where this page comes from