函数逻辑报告 |
Source Code:kernel\livepatch\shadow.c |
Create Date:2022-07-27 11:31:15 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__klp_shadow_get_or_alloc
函数原型:static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id, size_t size, gfp_t gfp_flags, klp_shadow_ctor_t ctor, void *ctor_data, bool warn_on_exist)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
void * | obj | |
unsigned long | id | |
size_t | size | |
gfp_t | gfp_flags | |
klp_shadow_ctor_t | ctor | |
void * | ctor_data | |
bool | warn_on_exist |
114 | shadow_data等于klp_shadow_get() - retrieve a shadow variable data pointer*@obj: pointer to parent object*@id: data identifier* Return: the shadow variable data element, NULL on failure. |
115 | 如果shadow_data则转到:exists |
123 | new_shadow等于分配内存并置零 |
124 | 如果非new_shadow则返回:NULL |
128 | spin_lock_irqsave( & klp_shadow_lock provides exclusive access to the klp_shadow_hash and* the shadow variables it references., flags) |
129 | shadow_data等于klp_shadow_get() - retrieve a shadow variable data pointer*@obj: pointer to parent object*@id: data identifier* Return: the shadow variable data element, NULL on failure. |
130 | 如果此条件成立可能性小(为编译器优化)(shadow_data)则 |
135 | spin_unlock_irqrestore( & klp_shadow_lock provides exclusive access to the klp_shadow_hash and* the shadow variables it references., flags) |
136 | kfree(new_shadow) |
137 | 转到:exists |
143 | 如果ctor则 |
147 | 如果err则 |
159 | spin_unlock_irqrestore( & klp_shadow_lock provides exclusive access to the klp_shadow_hash and* the shadow variables it references., flags) |
161 | 返回:data |
163 | exists : |
164 | 如果warn_on_exist则 |
169 | 返回:shadow_data |
名称 | 描述 |
---|---|
klp_shadow_alloc | klp_shadow_alloc() - allocate and add a new shadow variable*@obj: pointer to parent object*@id: data identifier*@size: size of attached data*@gfp_flags: GFP mask for allocation*@ctor: custom constructor to initialize the shadow data (optional)*@ctor_data: |
klp_shadow_get_or_alloc | klp_shadow_get_or_alloc() - get existing or allocate a new shadow variable*@obj: pointer to parent object*@id: data identifier*@size: size of attached data*@gfp_flags: GFP mask for allocation*@ctor: custom constructor to initialize the shadow data |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |