函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__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

函数原型:void *__vmalloc_node_range(unsigned long size, unsigned long align, unsigned long start, unsigned long end, gfp_t gfp_mask, pgprot_t prot, unsigned long vm_flags, int node, const void *caller)

返回类型:void

参数:

类型参数名称
unsigned longsize
unsigned longalign
unsigned longstart
unsigned longend
gfp_tgfp_mask
pgprot_tprot
unsigned longvm_flags
intnode
const void *caller
2535  real_size等于size
2537  size等于 align the pointer to the (next) page boundary (size)
2538  如果非sizesize右移PAGE_SHIFT determines the page size 位大于totalram_pages()则转到:fail
2541  area等于__get_vm_area_node(real_size, align, vmalloc() | vm_struct is not fully initialized | vm_flags, start, end, node, gfp_mask, caller)
2543  如果非area则转到:fail
2546  addr等于__vmalloc_area_node(area, gfp_mask, prot, node)
2547  如果非addr则返回:NULL
2555  clear_vm_uninitialized_flag(area)
2557  kmemleak_vmalloc(area, size, gfp_mask)
2559  返回:addr
2561  fail :
2562  warn_alloc(gfp_mask, NULL, "vmalloc: allocation failure: %lu bytes", real_size)
2564  返回:NULL
调用者
名称描述
align_shift_alloc_testThis test case is supposed to be failed.
fix_align_alloc_test
__vmalloc_node
vmalloc_uservmalloc_user - allocate zeroed virtually contiguous memory for userspace*@size: allocation size* The resulting memory area is zeroed so it can be mapped to userspace* without leaking data.* Return: pointer to the allocated memory or %NULL on error
vmalloc_user_node_flagsvmalloc_user_node_flags - allocate memory for userspace on a specific node*@size: allocation size*@node: numa node*@flags: flags for the page level allocator* The resulting memory area is zeroed so it can be mapped to userspace* without leaking data
vmalloc_execvmalloc_exec - allocate virtually contiguous, executable memory*@size: allocation size* Kernel-internal function to allocate enough pages to cover @size* the page level allocator and map them into contiguous and* executable kernel virtual space
vmalloc_32_uservmalloc_32_user - allocate zeroed virtually contiguous 32bit memory*@size: allocation size* The resulting memory area is 32bit addressable and zeroed so it can be* mapped to userspace without leaking data
kasan_module_alloc
kasan_mem_notifier
random_size_align_alloc_test
module_alloc