函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kasan_kmalloc_large

函数原型:void *__must_check kasan_kmalloc_large(const void *ptr, size_t size, gfp_t flags)

返回类型:void

参数:

类型参数名称
const void *ptr
size_tsize
gfp_tflags
538  如果gfpflags_allow_blocking(flags)则quarantine_reduce()
541  如果此条件成立可能性小(为编译器优化)(ptr == NULL)则返回:NULL
544  page等于virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(ptr)
545  redzone_start等于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.((unsignedlong)(ptr + size), KASAN_SHADOW_SCALE_SIZE)
547  redzone_end等于ptrReturns the number of bytes in this potentially compound page.
549  kasan_unpoison_shadow(ptr, size)
550  Poisons the shadow memory for 'size' bytes starting from 'addr'.* Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE.
553  返回:ptr
调用者
名称描述
kmalloc_large_node_hookHooks for other subsystems that check memory allocations. In a typical* production configuration these hooks all should produce no code at all.
kasan_krealloc
kmalloc_orderTo avoid unnecessary overhead, we pass through large allocation requests* directly to the page allocator. We use __GFP_COMP, because we will need to* know the allocation order to free the pages properly in kfree.