probe_subpage_writeable(9)
Welcome to the Kernel API Manual, bestie π β the page we're vibing with is literally probe_subpage_writeable(9), and it's giving very specific kernel energy, no cap.
πΈ NAME πΈ
probe_subpage_writeable β probe the user range for write faults at sub-page granularity (e.g. arm64 MTE) π
β¨ SYNOPSIS β¨
size_t probe_subpage_writeable (char __user *uaddr , size_t size );
π ARGUMENTS π
uaddrβ start of address range π, aka where the range begins.sizeβ size of address range π, aka how many bytes we're looking at.
π DESCRIPTION π
Okay so the tea β: this returns 0 on success, and on a fault it returns the number of bytes not probed. That's the whole return contract, periodt.
It is expected that the caller checked for the write permission of each page in the range either by put_user or GUP. Bestie, that's not optional background noise β it's expected. π
The architecture port can implement a more efficient get_user probing if the same sub-page faults are triggered by either a read or a write. Highkey architecture-specific efficiency moment β¨.
π¦ SEE ALSO π¦
Kernel file ./include/linux/uaccess.h and these iconic (9) besties:
__copy_to_user_inatomic(9)copy_struct_from_user(9)copy_struct_to_user(9)get_kernel_nofault(9)__scoped_user_access_begin(9)__scoped_user_access(9)scoped_user_read_access_size(9)scoped_user_read_access(9)scoped_user_write_access_size(9)scoped_user_write_access(9)scoped_user_rw_access_size(9)scoped_user_rw_access(9)get_user_inline(9)put_user_inline(9)
This cutie lives in ./include/linux, is dated October 2026, and answers to probe_subpage_writeable(9) β mwah πβ¨
π¦ 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