函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ptr_id

函数原型:static int ptr_id(void *ptr)

返回类型:int

参数:

类型参数名称
void *ptr
41  如果ptr恒等于ptr则返回:id
45  sp等于kmalloc(sp的长度, DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear)
46  如果非sp则返回:负ENOMEM
48  ptr等于ptr
49  id等于count自加
51  添加链表项
53  返回:id
调用者
名称描述
shadow_getShadow variable wrapper functions that echo the function and arguments* to the kernel log for testing verification. Don't display raw pointers,* but use the ptr_id() value instead.
shadow_alloc
shadow_get_or_alloc
shadow_free
shadow_free_all
shadow_ctorShadow variable constructor - remember simple pointer data
shadow_dtor
test_klp_shadow_vars_init