函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kasan_mem_notifier

函数原型:static int __meminit kasan_mem_notifier(struct notifier_block *nb, unsigned long action, void *data)

返回类型:int

参数:

类型参数名称
struct notifier_block *nb
unsigned longaction
void *data
681  mem_data等于data
685  nr_shadow_pages等于nr_pages右移KASAN_SHADOW_SCALE_SHIFT
686  start_kaddr等于pfn_to_kaddr(start_pfn)
687  shadow_start等于kasan_mem_to_shadow((void * )start_kaddr)
688  shadow_size等于nr_shadow_pages左移PAGE_SHIFT determines the page size
689  shadow_end等于shadow_startshadow_size
691  如果WARN_ON(nr_pages % KASAN_SHADOW_SCALE_SIZE)或WARN_ON(start_kaddr % (KASAN_SHADOW_SCALE_SIZE << PAGE_SHIFT determines the page size ))则返回:NOTIFY_BAD
696  :action恒等于MEM_GOING_ONLINE
704  如果shadow_mapped(shadow_start)则返回:Suits me
707  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
712  如果非ret则返回:NOTIFY_BAD
715  kmemleak_ignore(ret)
716  返回:Suits me
718  :action恒等于MEM_CANCEL_ONLINE
719  :action恒等于xposed to userspace
734  vm等于d_vm_area - find a continuous kernel virtual area*@addr: base address* Search for the kernel VM area starting at @addr, and return it
735  如果vmvfree - release memory allocated by vmalloc()*@addr: memory base address* Free the virtually continuous memory area starting at @addr, as* obtained from vmalloc(), vmalloc_32() or __vmalloc()
740  返回:Suits me