Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_queue.c Create Date:2022-07-28 19:57:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.)

Proto:static int ima_add_digest_entry(struct ima_template_entry *entry, bool update_htable)

Type:int

Parameter:

TypeParameterName
struct ima_template_entry *entry
boolupdate_htable
100  qe = Allocation memory
101  If (qe == NULL) Then
102  pr_err("OUT OF MEMORY ERROR creating queue entry\n")
103  Return -ENOMEM
105  entry = entry
107  Initialization list head
108  list_add_tail_rcu - add a new entry to rcu-protected list*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head
110  atomic_long_inc( & number of stored measurements in the list )
111  If update_htable Then
112  key = ima_hash_key( sha1 or md5 measurement hash )
113  adds the specified element to the specified hlist
116  If binary_runtime_size != ULONG_MAX Then
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 = If binary_runtime_size < ULONG_MAX - size Then binary_runtime_size + size Else ULONG_MAX
123  Return 0
Caller
NameDescribe
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