vmemdup_array_user(9)
π vmemdup_array_user(9) π
okay bestie, welcome to the Kernel API Manual β yes we're reading kernel docs together, this is our bonding time now π«Ά
β¨ NAME β¨
vmemdup_array_user β duplicate an array from user space πΈ like, take that array and give it a little twin
π¦ SYNOPSIS π¦
void * vmemdup_array_user (const void __user *src , size_t n , size_t size );
π ARGUMENTS π
srcβ the source address, and it lives in user space, so be normal about it π«nβ how many array members you wanna copy, aka the headcount π§sizeβ the size of one single array member, one (1) lil guy π
π₯ RETURN π₯
on failure you get an ERR_PTR π and ngl, the result may not be physically contiguous β it's giving "spiritually contiguous at best" π
free it with kvfree, that's the whole vibe check, no cap π
β SEE ALSO β
- Kernel file
./include/linux/string.h memdup_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)
go read those next, iykyk πβ¨
lowkey a whole reading list, but you got this bestie π
and that's the page!! brought to you by the fine folks at ./include/linux, dated October 2026, answering to the name vmemdup_array_user(9) β slay, periodt, see you in the next man 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