kmsan_memmove(9)
π kmsan_memmove(9) β the Kernel API Manual moment
okay so bestie, welcome to kmsan_memmove(9), straight out of the Kernel API Manual (that's the manual name, iykyk π«Ά). Lowkey this one's a little helper with main character energy β it just tells KMSAN "hey, a copy happened over here" so the shadow metadata doesn't get left on read. β¨
β¨ NAME β¨
kmsan_memmove β Notify KMSAN about a data copy within kernel.
πΈ SYNOPSIS πΈ
void kmsan_memmove (void *to , const void *from , size_t to_copy );
π ARGUMENTS π
toβ destination address in the kernel. that's where the data's going, bestie πfromβ source address in the kernel. that's where it's coming from π¦to_copyβ-- undescribed --π fr fr the docs literally did not describe this one. not me exposing the manpage like this. it's giving "we left this as an exercise for the reader". π
π DESCRIPTION π
So here's the vibe: you call this after you've already hit the non-instrumented version of memmove/memcpy β you know, the kind implemented using assembly code π₯ β and the whole point is to copy KMSAN's metadata alongside. no cap, that's it. that's the function. it keeps the shadow bookkeeping in sync when the fast hand-written copy path skips the usual instrumentation. iconic, honestly. β
ngl, the "invoked after" part matters β it's a follow-up call, not the copy itself. read the order and slay. π
π SEE ALSO π
- Kernel file
./include/linux/kmsan-checks.h kmsan_poison_memory(9)kmsan_unpoison_memory(9)kmsan_check_memory(9)kmsan_copy_to_user(9)
all the other KMSAN besties are waiting for you in that header file, go say hi ππ«Ά
mwah, that's the whole page π β brought to you by ./include/linux, dated October 2026, from the Kernel API Manual. the way this manpage ate and left zero crumbs. 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