get_user(9)
π
get_user(9) β Kernel API Manual π
okay so bestie, welcome to the get_user(9) page β it's the Kernel API Manual entry for the tiny little macro that grabs one simple variable from user space. π§π
β¨ NAME β¨
get_user β get a simple variable from user space. π«Ά
πΈ SYNOPSIS πΈ
get_user (x , ptr );
π ARGUMENTS π
xβ the variable where you store the result. πptrβ the source address, in user space. π¦
π¦ CONTEXT π¦
User context only. π This function may sleep if pagefaults are enabled. no cap, that's the context vibe check.
π DESCRIPTION π
This macro copies a single simple variable from user space to kernel space. β¨ It supports simple types like char and int, but not larger data types like structures or arrays. π So don't try to shove a whole struct through this thing, bestie β it's giving simple-variable-only energy.
ptr must have pointer-to-simple-variable type, and the result of dereferencing ptr must be assignable to x without a cast. periodt. π
π₯ RETURN π₯
zero on success, or -EFAULT on error. π On error, the variable x is set to zero β not me getting reset to zero energy, fr fr.
π SEE ALSO π
Kernel file ./arch/x86/include/asm/uaccess.h β plus __get_user(9), put_user(9), and __put_user(9). π Go read those too, iykyk.
mwah π this page is from ./arch/x86/include/asm, dated October 2026, and it's literally the get_user(9) page. ππ
π¦ 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