函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_policy.c Create Date:2022-07-27 22:02:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ima_lsm_copy_rule

函数原型:static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry)

返回类型:struct ima_rule_entry

参数:

类型参数名称
struct ima_rule_entry *entry
268  nentry等于开辟内存
269  如果非nentry则返回:NULL
276  memcpy(nentry, entry, nentry的长度)
277  memset(lsm, 0, sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structima_rule_entry, lsm))
279 i小于MAX_LSM_RULES循环
280  如果非 audit value 则继续下一循环
283  audit type 等于 audit type
284  audit value 等于kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
286  如果非 audit value 则转到:out_err
289  security_filter_rule_init( audit type , Audit_equal, audit value , & LSM file metadata specific )
293  如果非 LSM file metadata specific 打印警告信息("rule for LSM \'%s\' is undefined\n", (char * ) audit value )
297  返回:nentry
299  out_err :
300  ima_lsm_free_rule(nentry)
301  返回:NULL
调用者
名称描述
ima_lsm_update_rule