函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ma_add_template_entry helper function:* - Add template entry to the measurement list and hash table, for* all entries except those carried across kexec.* (Called with ima_extend_list_mutex held.)

函数原型:static int ima_add_digest_entry(struct ima_template_entry *entry, bool update_htable)

返回类型:int

参数:

类型参数名称
struct ima_template_entry *entry
boolupdate_htable
100  qe等于开辟内存
101  如果(qe == NULL)则
102  打印错误信息("OUT OF MEMORY ERROR creating queue entry\n")
103  返回:负ENOMEM
105  entry等于entry
107  初始化链表头
108  添加RCU链表项
110  atomic_long_inc( & number of stored measurements in the list )
111  如果update_htable
112  key等于ima_hash_key( sha1 or md5 measurement hash )
113  添加哈希记录
116  如果binary_runtime_size不等于ULONG_MAX
119  size等于Calculate the memory required for serializing a single* binary_runtime_measurement list entry, which contains a* couple of variable length fields (e.g template name and data).
120  binary_runtime_size等于如果binary_runtime_size小于ULONG_MAXsizebinary_runtime_sizesize否则ULONG_MAX
123  返回:0
调用者
名称描述
ima_add_template_entryAdd template entry to the measurement list and hash table, and* extend the pcr.* On systems which support carrying the IMA measurement list across* kexec, maintain the total memory size required for serializing the* binary_runtime_measurements.
ima_restore_measurement_entry