函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ma_alloc_init_template - create and initialize a new template entry

函数原型:int ima_alloc_init_template(struct ima_event_data *event_data, struct ima_template_entry **entry, struct ima_template_desc *desc)

返回类型:int

参数:

类型参数名称
struct ima_event_data *event_data
struct ima_template_entry **entry
struct ima_template_desc *desc
41  result等于0
43  如果desctemplate_desc等于desc
45  否则template_desc等于ima_template_desc_current()
48  entry等于分配内存并置零
50  如果非entry则返回:负ENOMEM
53  template descriptor 等于template_desc
54 i小于num_fields循环
55  field等于fields[i]
59  result等于field_init(event_data, & ( template related data [i]))
61  如果result不等于0则转到:out
64  len等于len
65  template_data_len加等于len的长度
66  template_data_len加等于len
68  返回:0
69  out :
70  ma_free_template_entry - free an existing template entry
71  * entry = NULL
72  返回:result
调用者
名称描述
process_buffer_measurementprocess_buffer_measurement - Measure the buffer to ima log
ima_add_violationma_add_violation - add violation to measurement list.* Violations are flagged in the measurement list with zero hash values.* By extending the PCR with 0xFF's instead of with zeroes, the PCR* value is invalidated.
ima_store_measurementma_store_measurement - store file measurement* Create an "ima" template and then store the template by calling* ima_store_template