函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:restore_template_fmt

函数原型:static struct ima_template_desc *restore_template_fmt(char *template_name)

返回类型:struct ima_template_desc

参数:

类型参数名称
char *template_name
275  struct ima_template_desc * template_desc = NULL
278  ret等于template_desc_init_fields(template_name, NULL, NULL)
279  如果ret小于0则
280  打印错误信息("attempting to initialize the template \"%s\" failed\n", template_name)
282  转到:out
285  template_desc等于分配内存并置零
286  如果非template_desc则转到:out
289  name等于""
290  fmt等于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
291  如果非fmt则转到:out
294  加自旋锁
295  添加RCU链表项
296  自旋锁解锁
297  out :
298  返回:template_desc
调用者
名称描述
ima_restore_measurement_listRestore the serialized binary measurement list without extending PCRs.