/linux-6.6.21/arch/x86/mm/ |
D | kasan_init_64.c | 162 start = (unsigned long)kasan_mem_to_shadow(pfn_to_kaddr(range->start)); in map_range() 163 end = (unsigned long)kasan_mem_to_shadow(pfn_to_kaddr(range->end)); in map_range() 321 unsigned long shadow = (unsigned long)kasan_mem_to_shadow((void *)va); in kasan_mem_to_shadow_align_down() 328 unsigned long shadow = (unsigned long)kasan_mem_to_shadow((void *)va); in kasan_mem_to_shadow_align_up() 377 kasan_mem_to_shadow((void *)PAGE_OFFSET)); in kasan_init() 392 kasan_mem_to_shadow((void *)PAGE_OFFSET + MAXMEM), in kasan_init() 393 kasan_mem_to_shadow((void *)VMALLOC_START)); in kasan_init() 402 kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 403 kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 406 kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() [all …]
|
/linux-6.6.21/mm/kasan/ |
D | report_sw_tags.c | 42 while (p < end && tag == *(u8 *)kasan_mem_to_shadow(p)) in kasan_find_first_bad_addr() 62 shadow = (u8 *)kasan_mem_to_shadow(object); in kasan_get_alloc_size() 76 memcpy(buffer, kasan_mem_to_shadow(row), META_BYTES_PER_ROW); in kasan_metadata_fetch_row() 81 u8 *shadow = (u8 *)kasan_mem_to_shadow(addr); in kasan_print_tags()
|
D | shadow.c | 147 shadow_start = kasan_mem_to_shadow(addr); in kasan_poison() 148 shadow_end = kasan_mem_to_shadow(addr + size); in kasan_poison() 161 u8 *shadow = (u8 *)kasan_mem_to_shadow(addr + size); in kasan_poison_last_granule() 241 shadow_start = (unsigned long)kasan_mem_to_shadow((void *)start_kaddr); in kasan_mem_notifier() 352 shadow_start = (unsigned long)kasan_mem_to_shadow((void *)addr); in kasan_populate_vmalloc() 353 shadow_end = (unsigned long)kasan_mem_to_shadow((void *)addr + size); in kasan_populate_vmalloc() 535 shadow_start = kasan_mem_to_shadow((void *)region_start); in kasan_release_vmalloc() 536 shadow_end = kasan_mem_to_shadow((void *)region_end); in kasan_release_vmalloc() 607 shadow_start = (unsigned long)kasan_mem_to_shadow(addr); in kasan_alloc_module_shadow() 647 vfree(kasan_mem_to_shadow(vm->addr)); in kasan_free_module_shadow()
|
D | report_generic.c | 40 while (p < addr + size && !(*(u8 *)kasan_mem_to_shadow(p))) in kasan_find_first_bad_addr() 60 shadow = (u8 *)kasan_mem_to_shadow(object); in kasan_get_alloc_size() 79 shadow_addr = (u8 *)kasan_mem_to_shadow(info->first_bad_addr); in get_shadow_bug_type() 176 if (*(u8 *)kasan_mem_to_shadow(info->object) == KASAN_SLAB_FREETRACK) { in kasan_complete_mode_report_info() 186 memcpy(buffer, kasan_mem_to_shadow(row), META_BYTES_PER_ROW); in kasan_metadata_fetch_row() 308 shadow_ptr = kasan_mem_to_shadow((void *)aligned_addr); in get_address_stack_frame_info() 309 shadow_bottom = kasan_mem_to_shadow(end_of_stack(current)); in get_address_stack_frame_info()
|
D | generic.c | 45 s8 shadow_value = *(s8 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_1() 58 u8 *shadow_addr = (u8 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_2_4_8() 72 u16 *shadow_addr = (u16 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_16() 127 ret = memory_is_nonzero(kasan_mem_to_shadow(addr), in memory_is_poisoned_n() 128 kasan_mem_to_shadow(addr + size - 1) + 1); in memory_is_poisoned_n() 132 s8 *last_shadow = (s8 *)kasan_mem_to_shadow(last_byte); in memory_is_poisoned_n() 197 shadow_byte = READ_ONCE(*(s8 *)kasan_mem_to_shadow(addr)); in kasan_byte_accessible() 524 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREETRACK; in kasan_save_free_info()
|
D | sw_tags.c | 111 shadow_first = kasan_mem_to_shadow(untagged_addr); in kasan_check_range() 112 shadow_last = kasan_mem_to_shadow(untagged_addr + size - 1); in kasan_check_range() 131 shadow_byte = READ_ONCE(*(u8 *)kasan_mem_to_shadow(untagged_addr)); in kasan_byte_accessible()
|
D | init.c | 458 addr = (unsigned long)kasan_mem_to_shadow(start); in kasan_remove_zero_shadow() 493 shadow_start = kasan_mem_to_shadow(start); in kasan_add_zero_shadow()
|
D | quarantine.c | 164 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE; in qlink_free()
|
/linux-6.6.21/arch/arm64/mm/ |
D | kasan_init.c | 222 kimg_shadow_start = (u64)kasan_mem_to_shadow(KERNEL_START) & PAGE_MASK; in kasan_init_shadow() 223 kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(KERNEL_END)); in kasan_init_shadow() 225 mod_shadow_start = (u64)kasan_mem_to_shadow((void *)MODULES_VADDR); in kasan_init_shadow() 227 vmalloc_shadow_end = (u64)kasan_mem_to_shadow((void *)VMALLOC_END); in kasan_init_shadow() 245 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)PAGE_END), in kasan_init_shadow() 259 kasan_map_populate((unsigned long)kasan_mem_to_shadow(start), in kasan_init_shadow() 260 (unsigned long)kasan_mem_to_shadow(end), in kasan_init_shadow() 290 shadow_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_populate_early_vm_area_shadow() 292 shadow_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_populate_early_vm_area_shadow()
|
/linux-6.6.21/arch/loongarch/include/asm/ |
D | kasan.h | 63 #define kasan_mem_to_shadow kasan_mem_to_shadow macro 64 void *kasan_mem_to_shadow(const void *addr); 78 return (kasan_mem_to_shadow((void *)addr) != NULL); in addr_has_metadata()
|
/linux-6.6.21/arch/powerpc/mm/kasan/ |
D | init_32.c | 57 unsigned long k_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_init_region() 58 unsigned long k_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_init_region() 114 unsigned long k_start = (unsigned long)kasan_mem_to_shadow((void *)VMALLOC_START); in kasan_unmap_early_shadow_vmalloc() 115 unsigned long k_end = (unsigned long)kasan_mem_to_shadow((void *)VMALLOC_END); in kasan_unmap_early_shadow_vmalloc() 120 k_start = (unsigned long)kasan_mem_to_shadow((void *)MODULES_VADDR); in kasan_unmap_early_shadow_vmalloc() 121 k_end = (unsigned long)kasan_mem_to_shadow((void *)MODULES_END); in kasan_unmap_early_shadow_vmalloc()
|
D | init_book3s_64.c | 32 k_start = ALIGN_DOWN((unsigned long)kasan_mem_to_shadow(start), PAGE_SIZE); in kasan_init_phys_region() 33 k_end = ALIGN((unsigned long)kasan_mem_to_shadow(end), PAGE_SIZE); in kasan_init_phys_region() 53 void *k_start = kasan_mem_to_shadow((void *)RADIX_VMALLOC_END); in kasan_init() 54 void *k_end = kasan_mem_to_shadow((void *)RADIX_VMEMMAP_END); in kasan_init()
|
D | book3s_32.c | 11 unsigned long k_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_init_region() 12 unsigned long k_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_init_region() 57 memset(kasan_mem_to_shadow(start), 0, k_end - k_start); in kasan_init_region()
|
D | 8xx.c | 37 unsigned long k_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_init_region() 38 unsigned long k_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_init_region()
|
D | init_book3e_64.c | 74 k_start = ALIGN_DOWN((unsigned long)kasan_mem_to_shadow(start), PAGE_SIZE); in kasan_init_phys_region() 75 k_end = ALIGN((unsigned long)kasan_mem_to_shadow(end), PAGE_SIZE); in kasan_init_phys_region()
|
/linux-6.6.21/arch/arm/mm/ |
D | kasan_init.c | 193 shadow_start = kasan_mem_to_shadow(start); in create_mapping() 194 shadow_end = kasan_mem_to_shadow(end); in create_mapping() 239 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 240 kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 242 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_END), in kasan_init() 243 kasan_mem_to_shadow((void *)-1UL) + 1); in kasan_init()
|
/linux-6.6.21/arch/riscv/mm/ |
D | kasan_init.c | 483 kasan_populate_early_shadow((void *)kasan_mem_to_shadow((void *)FIXADDR_START), in kasan_init() 484 (void *)kasan_mem_to_shadow((void *)VMALLOC_START)); in kasan_init() 488 (void *)kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 489 (void *)kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 492 (void *)kasan_mem_to_shadow((void *)MODULES_VADDR), in kasan_init() 493 (void *)kasan_mem_to_shadow((void *)MODULES_END)); in kasan_init() 495 kasan_populate_early_shadow((void *)kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 496 (void *)kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 507 kasan_populate(kasan_mem_to_shadow(start), kasan_mem_to_shadow(end)); in kasan_init() 511 kasan_populate(kasan_mem_to_shadow((const void *)MODULES_END), in kasan_init() [all …]
|
/linux-6.6.21/arch/loongarch/mm/ |
D | kasan_init.c | 38 void *kasan_mem_to_shadow(const void *addr) in kasan_mem_to_shadow() function 262 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 263 kasan_mem_to_shadow((void *)KFENCE_AREA_END)); in kasan_init() 275 kasan_map_populate((unsigned long)kasan_mem_to_shadow(start), in kasan_init() 276 (unsigned long)kasan_mem_to_shadow(end), NUMA_NO_NODE); in kasan_init() 280 kasan_map_populate((unsigned long)kasan_mem_to_shadow((void *)MODULES_VADDR), in kasan_init() 281 (unsigned long)kasan_mem_to_shadow((void *)MODULES_END), NUMA_NO_NODE); in kasan_init()
|
/linux-6.6.21/arch/xtensa/mm/ |
D | kasan_init.c | 85 populate(kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 86 kasan_mem_to_shadow((void *)XCHAL_KSEG_BYPASS_VADDR)); in kasan_init()
|
/linux-6.6.21/include/linux/ |
D | kasan.h | 57 #ifndef kasan_mem_to_shadow 58 static inline void *kasan_mem_to_shadow(const void *addr) in kasan_mem_to_shadow() function
|
/linux-6.6.21/Documentation/translations/zh_CN/dev-tools/ |
D | kasan.rst | 252 static inline void *kasan_mem_to_shadow(const void *addr)
|
/linux-6.6.21/arch/s390/boot/ |
D | vmem.c | 44 #define __sha(x) ((unsigned long)kasan_mem_to_shadow((void *)x))
|
/linux-6.6.21/Documentation/dev-tools/ |
D | kasan.rst | 294 static inline void *kasan_mem_to_shadow(const void *addr)
|