函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__kasan_slab_free

函数原型:static bool __kasan_slab_free(struct kmem_cache *cache, void *object, unsigned long ip, bool quarantine)

返回类型:bool

参数:

类型参数名称
struct kmem_cache *cache
void *object
unsigned longip
boolquarantine
447  tag等于get_tag(object)
448  tagged_object等于object
449  object等于reset_tag(object)
451  如果此条件成立可能性小(为编译器优化)(nearest_obj(cache, virt_to_head_page(object), object) != object)则
453  kasan_report_invalid_free(tagged_object, ip)
454  返回:true
458  如果此条件成立可能性小(为编译器优化)(Used for retrieving partial slabs, etc. & Defer freeing slabs to RCU )则返回:false
461  shadow_byte等于READ_ONCE( * (s8 * )kasan_mem_to_shadow(object))
462  如果shadow_invalid(tag, shadow_byte)则
463  kasan_report_invalid_free(tagged_object, ip)
464  返回:true
467  rounded_up_size等于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.(The size of an object without metadata , KASAN_SHADOW_SCALE_SIZE)
468  Poisons the shadow memory for 'size' bytes starting from 'addr'.* Memory addresses should be aligned to KASAN_SHADOW_SCALE_SIZE.
470  如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KASAN_GENERIC)且非quarantine此条件成立可能性小(为编译器优化)(!(Used for retrieving partial slabs, etc. & SLAB_KASAN))则返回:false
474  kasan_set_free_info(cache, object, tag)
476  quarantine_put(get_free_info(cache, object), cache)
478  返回:IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_KASAN_GENERIC)
调用者
名称描述
kasan_slab_free
kasan_poison_kfree