kmsan_ioremap_page_range(9)
β¨ kmsan_ioremap_page_range(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is literally about telling KMSAN that somebody called ioremap_page_range(). like, a little heads-up note passed between kernel functions π«Ά no cap.
πΈ NAME πΈ
kmsan_ioremap_page_range β notify KMSAN about an ioremap_page_range() call. that's it, that's the whole vibe π
π SYNOPSIS π
int kmsan_ioremap_page_range (unsigned long addr , unsigned long end ,
phys_addr_t phys_addr , pgprot_t prot , unsigned int page_shift );
look at her go β¨ five params, one int coming back at you.
π¦ ARGUMENTS π¦
addrβ where the range starts, bestie. the beginning. the main character of the address space πendβ where the range ends. the grand finale π¬phys_addrβ the start of the physical range. yes, physical, not virtual, keep up πprotβ the page protection flags used forioremap_page_range. protection is important, periodt π‘οΈpage_shiftβ literally just thepage_shiftargument that gets passed tovmap_range_noflush. nothing more, nothing less, iykyk π
π DESCRIPTION π
so here's the tea β β KMSAN creates new metadata pages for the physical pages that get mapped into virtual memory. that's the whole job. she's a metadata girlie π§
it returns 0 on success. and this part is important, so listen up:
callers must check for a non-zero return value. like, actually check it. don't just ignore the return and hope for the best, that's not the move π
β SEE ALSO β
- kernel file
./include/linux/kmsan.h 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_copy_page_meta(9)kmsan_slab_alloc(9)kmsan_slab_free(9)kmsan_kmalloc_large(9)kmsan_kfree_large(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)
that's the whole friend group right there, go say hi to all of them π«ΆπΈ
and that's a wrap, bestie π this lil page lives in ./include/linux, dated October 2026, and she goes by kmsan_ioremap_page_range(9). slay, go check your return values, mwah π
β¨
π¦ 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