Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This function assigns a tag to an object considering the following:* 1

Proto:static u8 assign_tag(struct kmem_cache *cache, const void *object, bool init, bool keep_tag)

Type:u8

Parameter:

TypeParameterName
struct kmem_cache *cache
const void *object
boolinit
boolkeep_tag
383  If keep_tag Then Return get_tag(object)
390  If Not ctor && Not (Used for retrieving partial slabs, etc. & Defer freeing slabs to RCU ) Then Return If init Then ative kernel pointers tag Else random_tag()
396  Return We want to avoid an expensive divide : (offset / cache->size)* Using the fact that size is a constant for a particular cache,* we can replace (offset / cache->size) by* reciprocal_divide(offset, cache->reciprocal_buffer_size)
Caller
NameDescribe
kasan_init_slab_obj
__kasan_kmalloc