Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ma_alloc_init_template - create and initialize a new template entry

Proto:int ima_alloc_init_template(struct ima_event_data *event_data, struct ima_template_entry **entry, struct ima_template_desc *desc)

Type:int

Parameter:

TypeParameterName
struct ima_event_data *event_data
struct ima_template_entry **entry
struct ima_template_desc *desc
41  result = 0
43  If desc Then template_desc = desc
45  Else template_desc = ima_template_desc_current()
48  entry = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
50  If Not entry Then Return -ENOMEM
53  template descriptor = template_desc
54  When i < num_fields cycle
55  field = fields[i]
59  result = field_init(event_data, & ( template related data [i]))
61  If result != 0 Then Go to out
64  len = len
65  template_data_len += size of len
66  template_data_len += len
68  Return 0
69  out :
70  ma_free_template_entry - free an existing template entry
71  * entry = NULL
72  Return result
Caller
NameDescribe
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