Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\kasan\common.c Create Date:2022-07-28 15:51:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__kasan_kmalloc

Proto:static void *__kasan_kmalloc(struct kmem_cache *cache, const void *object, size_t size, gfp_t flags, bool keep_tag)

Type:void

Parameter:

TypeParameterName
struct kmem_cache *cache
const void *object
size_tsize
gfp_tflags
boolkeep_tag
491  tag = 0xff
493  If gfpflags_allow_blocking(flags) Then quarantine_reduce()
496  If Value for the false possibility is greater at compile time(object == NULL) Then Return 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  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KASAN_SW_TAGS) Then 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  If Used for retrieving partial slabs, etc. & SLAB_KASAN Then set_track( & alloc_track, flags)
515  Return set_tag(object, tag)
Caller
NameDescribe
kasan_slab_alloc
kasan_kmalloc
kasan_krealloc