/linux/arch/x86/mm/ |
H A 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/mm/kasan/ |
H A 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()
|
H A D | shadow.c | 143 shadow_start = kasan_mem_to_shadow(addr); in kasan_poison() 144 shadow_end = kasan_mem_to_shadow(addr + size); in kasan_poison() 157 u8 *shadow = (u8 *)kasan_mem_to_shadow(addr + size); in kasan_poison_last_granule() 222 shadow_start = (unsigned long)kasan_mem_to_shadow((void *)start_kaddr); in kasan_mem_notifier() 333 shadow_start = (unsigned long)kasan_mem_to_shadow((void *)addr); in kasan_populate_vmalloc() 334 shadow_end = (unsigned long)kasan_mem_to_shadow((void *)addr + size); in kasan_populate_vmalloc() 516 shadow_start = kasan_mem_to_shadow((void *)region_start); in kasan_release_vmalloc() 517 shadow_end = kasan_mem_to_shadow((void *)region_end); in kasan_release_vmalloc() 588 shadow_start = (unsigned long)kasan_mem_to_shadow(addr); in kasan_alloc_module_shadow() 628 vfree(kasan_mem_to_shadow(vm->addr)); in kasan_free_module_shadow()
|
H A D | generic.c | 47 s8 shadow_value = *(s8 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_1() 60 u8 *shadow_addr = (u8 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_2_4_8() 74 u16 *shadow_addr = (u16 *)kasan_mem_to_shadow(addr); in memory_is_poisoned_16() 129 ret = memory_is_nonzero(kasan_mem_to_shadow(addr), in memory_is_poisoned_n() 130 kasan_mem_to_shadow(addr + size - 1) + 1); in memory_is_poisoned_n() 134 s8 *last_shadow = (s8 *)kasan_mem_to_shadow(last_byte); in memory_is_poisoned_n() 199 shadow_byte = READ_ONCE(*(s8 *)kasan_mem_to_shadow(addr)); in kasan_byte_accessible() 499 if (*(u8 *)kasan_mem_to_shadow(object) != KASAN_SLAB_FREE_META) in release_free_meta() 503 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE; in release_free_meta() 582 *(u8 *)kasan_mem_to_shadow(object) = KASAN_SLAB_FREE_META; in kasan_save_free_info()
|
H A 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_FREE_META) { 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()
|
H A 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()
|
H A D | init.c | 464 addr = (unsigned long)kasan_mem_to_shadow(start); in kasan_remove_zero_shadow() 499 shadow_start = kasan_mem_to_shadow(start); in kasan_add_zero_shadow()
|
/linux/arch/riscv/mm/ |
H A D | kasan_init.c | 447 kasan_populate(kasan_mem_to_shadow(start), in kasan_populate_early_vm_area_shadow() 448 kasan_mem_to_shadow(start + size)); in kasan_populate_early_vm_area_shadow() 494 kasan_populate_early_shadow((void *)kasan_mem_to_shadow((void *)FIXADDR_START), in kasan_init() 495 (void *)kasan_mem_to_shadow((void *)VMALLOC_START)); in kasan_init() 499 (void *)kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 500 (void *)kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 503 (void *)kasan_mem_to_shadow((void *)MODULES_VADDR), in kasan_init() 504 (void *)kasan_mem_to_shadow((void *)MODULES_END)); in kasan_init() 506 kasan_populate_early_shadow((void *)kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 507 (void *)kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() [all …]
|
/linux/arch/powerpc/mm/kasan/ |
H A 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()
|
H A 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()
|
H A 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()
|
H A D | 8xx.c | 42 unsigned long k_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_init_region() 43 unsigned long k_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_init_region()
|
H A 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/arch/loongarch/include/asm/ |
H A D | kasan.h | 72 #define kasan_mem_to_shadow kasan_mem_to_shadow macro 73 void *kasan_mem_to_shadow(const void *addr); 87 return (kasan_mem_to_shadow((void *)addr) != NULL); in addr_has_metadata()
|
/linux/arch/arm/mm/ |
H A D | kasan_init.c | 199 shadow_start = kasan_mem_to_shadow(start); in create_mapping() 200 shadow_end = kasan_mem_to_shadow(end); in create_mapping() 245 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 246 kasan_mem_to_shadow((void *)VMALLOC_END)); in kasan_init() 248 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_END), in kasan_init() 249 kasan_mem_to_shadow((void *)-1UL) + 1); in kasan_init()
|
/linux/arch/arm64/mm/ |
H A D | kasan_init.c | 309 kimg_shadow_start = (u64)kasan_mem_to_shadow(KERNEL_START) & PAGE_MASK; in kasan_init_shadow() 310 kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(KERNEL_END)); in kasan_init_shadow() 312 mod_shadow_start = (u64)kasan_mem_to_shadow((void *)MODULES_VADDR); in kasan_init_shadow() 314 vmalloc_shadow_end = (u64)kasan_mem_to_shadow((void *)VMALLOC_END); in kasan_init_shadow() 345 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)PAGE_END), in kasan_init_shadow() 359 kasan_map_populate((unsigned long)kasan_mem_to_shadow(start), in kasan_init_shadow() 360 (unsigned long)kasan_mem_to_shadow(end), in kasan_init_shadow() 390 shadow_start = (unsigned long)kasan_mem_to_shadow(start); in kasan_populate_early_vm_area_shadow() 392 shadow_end = (unsigned long)kasan_mem_to_shadow(start + size); in kasan_populate_early_vm_area_shadow()
|
/linux/arch/loongarch/mm/ |
H A D | kasan_init.c | 45 void *kasan_mem_to_shadow(const void *addr) in kasan_mem_to_shadow() function 298 kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), in kasan_init() 299 kasan_mem_to_shadow((void *)KFENCE_AREA_END)); in kasan_init() 311 kasan_map_populate((unsigned long)kasan_mem_to_shadow(start), in kasan_init() 312 (unsigned long)kasan_mem_to_shadow(end), NUMA_NO_NODE); in kasan_init() 316 kasan_map_populate((unsigned long)kasan_mem_to_shadow((void *)MODULES_VADDR), in kasan_init() 317 (unsigned long)kasan_mem_to_shadow((void *)MODULES_END), NUMA_NO_NODE); in kasan_init()
|
/linux/scripts/gdb/linux/ |
H A D | kasan.py | 37 shadow_addr = self.kasan_mem_to_shadow(addr) 41 def kasan_mem_to_shadow(self, addr): member in KasanMemToShadow
|
/linux/arch/xtensa/mm/ |
H A 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/include/linux/ |
H A D | kasan.h | 58 #ifndef kasan_mem_to_shadow 59 static inline void *kasan_mem_to_shadow(const void *addr) in kasan_mem_to_shadow() function
|
/linux/Documentation/translations/zh_TW/dev-tools/ |
H A D | kasan.rst | 252 static inline void *kasan_mem_to_shadow(const void *addr)
|
/linux/Documentation/translations/zh_CN/dev-tools/ |
H A D | kasan.rst | 270 static inline void *kasan_mem_to_shadow(const void *addr)
|
/linux/arch/s390/boot/ |
H A D | vmem.c | 49 #define __sha(x) ((unsigned long)kasan_mem_to_shadow((void *)x))
|
/linux/Documentation/dev-tools/ |
H A D | kasan.rst | 318 static inline void *kasan_mem_to_shadow(const void *addr)
|