kmsan_copy_page_meta(9)
π kmsan_copy_page_meta(9) β Kernel API Manual, but make it make sense β¨
okay so bestie, welcome to the kmsan_copy_page_meta page π this is the kernel API manual, and honestly? this one's a lil cutie with a big job.
πΈ NAME πΈ
kmsan_copy_page_meta β literally copies KMSAN metadata between two pages, no cap π«Ά
β¨ SYNOPSIS β¨
void kmsan_copy_page_meta (struct page *dst , struct page *src );
that's it. that's the whole vibe check. two struct page * args, zero return value, we move π¦
π ARGUMENTS π
dstβ the destination page, i.e. the one receiving the metadata glow-up πsrcβ the source page, the one being copied from, the main character of this operation π«
π₯ DESCRIPTION π₯
so here's the tea β β KMSAN takes the contents of the metadata pages for src and copies them straight into the metadata pages for dst. like handing your bestie your notes, but make it kernel memory π§
but wait, there's a plot twist π if dst has no associated metadata pages, then literally nothing happens. nothing. zero. a whole void. it's giving shrug emoji π
and if src has no associated metadata pages? then dst's metadata pages get unpoisoned β¨ which is the good ending, honestly π
no guessing here β those are the only three paths in the original, and they all stay faithful π
π¦ SEE ALSO π¦
kernel file ./include/linux/kmsan.h β go read it, iykyk π
and the whole kmsan friend group, because they all show up to the same party π:
kmsan_task_create(9)kmsan_task_exit(9)kmsan_init_shadow(9)kmsan_init_runtime(9)kmsan_memblock_free_pages(9)kmsan_alloc_page(9)kmsan_free_page(9)kmsan_slab_alloc(9)kmsan_slab_free(9)kmsan_kmalloc_large(9)kmsan_kfree_large(9)kmsan_ioremap_page_range(9)kmsan_iounmap_page_range(9)kmsan_handle_dma(9)kmsan_handle_dma_sg(9)kmsan_handle_urb(9)kmsan_unpoison_entry_regs(9)kmsan_get_metadata(9)kmsan_enable_current(9)kmsan_disable_current(9)memset_no_sanitize_memory(9)
like, the whole squad fr fr π
and that's the page, bestie π this icon lives in ./include/linux, stamped October 2026, and goes by kmsan_copy_page_meta(9) β 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