函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kasan\tags.c Create Date:2022-07-27 17:29:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:check_memory_region

函数原型:bool check_memory_region(unsigned long addr, size_t size, bool write, unsigned long ret_ip)

返回类型:bool

参数:

类型参数名称
unsigned longaddr
size_tsize
boolwrite
unsigned longret_ip
86  如果此条件成立可能性小(为编译器优化)(size == 0)则返回:true
89  tag等于get_tag((constvoid * )addr)
108  如果tag恒等于ative kernel pointers tag 则返回:true
111  untagged_addr等于reset_tag((constvoid * )addr)
112  如果此条件成立可能性小(为编译器优化)(untagged_addr < kasan_shadow_to_mem((void * )Compiler uses shadow offset assuming that addresses start* from 0. Kernel addresses don't start from 0, so shadow* for kernel really starts from compiler's shadow offset +* 'kernel address space start' >> KASAN_SHADOW_SCALE_SHIFT))则
114  kasan_report(addr, size, write, ret_ip)
115  返回:false
117  shadow_first等于kasan_mem_to_shadow(untagged_addr)
118  shadow_last等于kasan_mem_to_shadow(untagged_addr + size - 1)
119 shadow小于等于shadow_last循环
120  如果shadow不等于tag
122  返回:false
126  返回:true
调用者
名称描述
__kasan_check_write
memset
memmove
memcpy
__asan_loadN
__asan_storeN
__hwasan_load1_noabort
__hwasan_store1_noabort
__hwasan_load2_noabort
__hwasan_store2_noabort
__hwasan_load4_noabort
__hwasan_store4_noabort
__hwasan_load8_noabort
__hwasan_store8_noabort
__hwasan_load16_noabort
__hwasan_store16_noabort
__hwasan_loadN_noabort
__hwasan_storeN_noabort
__kasan_check_read