clear_user_page(9)
π 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, iykykpageβ 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 π
kmap(9)kunmap(9)kmap_to_page(9)kmap_flush_unused(9)kmap_local_page(9)kmap_local_folio(9)kmap_atomic(9)clear_user_pages(9)clear_user_highpage(9)clear_user_highpages(9)vma_alloc_zeroed_movable_folio(9)memcpy_from_folio(9)memcpy_to_folio(9)folio_zero_tail(9)folio_fill_tail(9)memcpy_from_file_folio(9)folio_zero_segments(9)folio_zero_segment(9)folio_zero_range(9)folio_release_kmap(9)
ngl bestie, that's a whole friend group ofkmapandfoliopages 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
- 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