unsafe_memcpy(9)
π NAME π
okay so bestie, welcome to the unsafe_memcpy(9) page from the Kernel API Manual β yes, the manual name is folded in right here at the top, because we're cute like that π
unsafe_memcpyβ amemcpyimplementation with noFORTIFYbounds checking. literally what it says on the tin, no cap β¨
β¨ SYNOPSIS β¨
unsafe_memcpy (dst , src , bytes , justification );
π¦ ARGUMENTS π¦
dstβ destination memory address to write to πsrcβ source memory address to read from πbytesβ how many bytes to write todstfromsrcπ«Άjustificationβ free-form text or comment describing why the use is needed π
πΈ DESCRIPTION πΈ
okay so real talk: use this for corner cases where the compiler cannot do the right thing, or during transitions between APIs, etc. π§
it should be used very rarely, and it includes a place for justification detailing where bounds checking has happened, and why existing solutions cannot be employed. π
π heads up, bestie: this one has no FORTIFY bounds checking, and the page says it should be used very rarely. not a default flex, fr fr.
π SEE ALSO π
- Kernel file
./include/linux/fortify-string.hπ¦ strnlen(9),strlen(9),strlcat(9),strcat(9),strncat(9),strcpy(9)β the whole friend group, iykyk π
mwah π this page came from the ./include/linux source, dated October 2026, and it's literally unsafe_memcpy(9). bye bestie, go be iconic π«Ά
π¦ 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