memdup_array_user(9)
π NAME π
okay so bestie, we are in the Kernel API Manual, and the icon, the moment, the whole entire main character is memdup_array_user β duplicate array from user space. No cap, thatβs the name and thatβs the job. π
β¨
β¨ SYNOPSIS β¨
void * memdup_array_user (const void __user *src , size_t n , size_t
size );
π«Ά ARGUMENTS π«Ά
the way that these three are literally just doing their little jobs, one by one, and we love them for it:
srcβ source address in user space πnβ number of array members to copy π’sizeβ size of one array member π
π RETURN π
if things go sideways, you get an ERR_PTR on failure. and listen, the result is physically contiguous, to be freed by kfree. so yeah, that kfree cleanup arc is mandatory, bestie β donβt leave it hanging. π§Ήπ
π¦ SEE ALSO π¦
the page points at the Kernel file ./include/linux/string.h plus this whole SEE ALSO friend group, and yes they all get their exact little names because we do not abbreviate the squad:
- Kernel file
./include/linux/string.h vmemdup_array_user(9)strscpy(9)strscpy_pad(9)mem_is_zero(9)sysfs_match_string(9)memzero_explicit(9)kbasename(9)strtomem_pad(9)strtomem(9)memtostr(9)memtostr_pad(9)memset_after(9)memset_startat(9)str_has_prefix(9)strstarts(9)strends(9)
mwah π this pageβs footer tea is source/version ./include/linux, dated October 2026, and thatβs the cute little sign-off, periodt. πβ¨
π¦ 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