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:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ima_audit_measurement

Proto:void ima_audit_measurement(struct integrity_iint_cache *iint, const unsigned char *filename)

Type:void

Parameter:

TypeParameterName
struct integrity_iint_cache *iint
const unsigned char *filename
342  algo_name = hash_algo_name[algo]
345  If flags & IMA_AUDITED Then Return
348  hash = 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).
349  If Not hash Then Return
352  When i < length cycle hex_byte_pack(hash + (i * 2), digest[i])
354  hash[i * 2] = '\0'
356  ab = audit_log_start - obtain an audit buffer*@ctx: audit_context (may be NULL)*@gfp_mask: type of allocation*@type: audit message type* Returns audit_buffer pointer on success or NULL on error
358  If Not ab Then Go to out
361  audit_log_format - format a message into the audit buffer.*@ab: audit_buffer*@fmt: format string*@...: optional parameters matching @fmt string* All the work is done in audit_log_vformat.
362  audit_log_untrustedstring - log a string that may contain random characters*@ab: audit_buffer*@string: string to be logged* Same as audit_log_n_untrustedstring(), except that strlen is used to* determine string length.
363  audit_log_format - format a message into the audit buffer.*@ab: audit_buffer*@fmt: format string*@...: optional parameters matching @fmt string* All the work is done in audit_log_vformat.
365  audit_log_task_info(ab)
366  audit_log_end - end one audit record*@ab: the audit_buffer* We can not do a netlink send inside an irq context because it blocks (last* arg, flags, is not set to MSG_DONTWAIT), so the audit buffer is placed on a* queue and a tasklet is scheduled to remove
368  flags |= IMA_AUDITED
369  out :
370  kfree(hash)
371  Return