Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:print format:* 32bit-le=pcr#* char[20]=template digest* 32bit-le=template name size* char[n]=template name* [eventdata length]* eventdata[n]=template specific data

Proto:int ima_measurements_show(struct seq_file *m, void *v)

Type:int

Parameter:

TypeParameterName
struct seq_file *m
void *v
131  qe = v
135  bool is_ima_template = false
139  e = entry
140  If (e == NULL) Then Return -1
143  template_name = If name[0] != '\0' Then name Else fmt
151  pcr = If Not ima_canonical_fmt Then pcr Else cpu_to_le32(pcr)
152  ima_putc(m, & pcr, size of pcr )
155  ima_putc(m, sha1 or md5 measurement hash , Max TPM v1.2 PCR size )
158  namelen = If Not ima_canonical_fmt Then strlen - Find the length of a string*@s: The string to be sized Else cpu_to_le32(strlen - Find the length of a string*@s: The string to be sized)
160  ima_putc(m, & namelen, size of namelen )
163  ima_putc(m, template_name, strlen - Find the length of a string*@s: The string to be sized)
166  If strcmp(template_name, IMA_TEMPLATE_IMA_NAME) == 0 Then is_ima_template = true
169  If Not is_ima_template Then
170  template_data_len = If Not ima_canonical_fmt Then template_data_len Else cpu_to_le32(template_data_len)
172  ima_putc(m, & template_data_len, size of template_data_len )
176  When i < num_fields cycle
177  show = IMA_SHOW_BINARY
178  field = fields[i]
181  If is_ima_template && strcmp(field_id, "d") == 0 Then show = IMA_SHOW_BINARY_NO_FIELD_LEN
183  If is_ima_template && strcmp(field_id, "n") == 0 Then show = IMA_SHOW_BINARY_OLD_STRING_FMT
185  field_show(m, show, & template related data [i])
187  Return 0