函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__kasan_kmalloc

函数原型:static void *__kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size, gfp_t flags, bool keep_tag)

返回类型:void

参数:

类型参数名称
struct kmem_cache *cache
const void *object
size_tsize
gfp_tflags
boolkeep_tag
491  tag等于0xff
493  如果gfpflags_allow_blocking(flags)则quarantine_reduce()
496  如果此条件成立可能性小(为编译器优化)(object == NULL)则返回:NULL
499  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)(object + size), KASAN_SHADOW_SCALE_SIZE)
501  redzone_end等于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)object + The size of an object without metadata , KASAN_SHADOW_SCALE_SIZE)
504  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KASAN_SW_TAGS)则tag等于This function assigns a tag to an object considering the following:* 1
508  kasan_unpoison_shadow(set_tag(object, tag), size)
509  Poisons the shadow memory for 'size' bytes starting from 'addr'.* Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE.
512  如果Used for retrieving partial slabs, etc. 按位与SLAB_KASANset_track( & alloc_track, flags)
515  返回:set_tag(object, tag)
调用者
名称描述
kasan_slab_alloc
kasan_kmalloc
kasan_krealloc