函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kasan_module_alloc

函数原型:int kasan_module_alloc(void *addr, size_t size)

返回类型:int

参数:

类型参数名称
void *addr
size_tsize
604  shadow_start等于kasan_mem_to_shadow(addr)
605  scaled_size等于sizeKASAN_SHADOW_MASK右移KASAN_SHADOW_SCALE_SHIFT
606  shadow_size等于und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(scaled_size, PAGE_SIZE)
608  如果WARN_ON(!st whether an address (unsigned long or pointer) is aligned to PAGE_SIZE (shadow_start))则返回:负EINVAL
611  ret等于__vmalloc_node_range - allocate virtually contiguous memory*@size: allocation size*@align: desired alignment*@start: vm area range start*@end: vm area range end*@gfp_mask: flags for the page level allocator*@prot: protection mask for the allocated pages
617  如果ret
618  内存设置(ret, KASAN_SHADOW_INIT, shadow_size)
619  flags或等于has allocated kasan shadow memory
620  kmemleak_ignore(ret)
621  返回:0
624  返回:负ENOMEM
调用者
名称描述
module_alloc