函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ima_eventdigest_init_common

函数原型:static int ima_eventdigest_init_common(const u8 *digest, unsigned int digestsize, u8 hash_algo, struct ima_field_data *field_data)

返回类型:int

参数:

类型参数名称
const u8 *digest
unsigned intdigestsize
u8hash_algo
struct ima_field_data *field_data
239  u8 buffer[194] = {0}
240  fmt等于DATA_FMT_DIGEST
241  offset等于0
243  如果hash_algo小于HASH_ALGO__LAST
244  fmt等于DATA_FMT_DIGEST_WITH_ALGO
245  offset加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
247  buffer[offset]等于':'
248  offset加等于2
251  如果digestmemcpy(buffer + offset, digest, digestsize)
253  否则offset加等于digest size for IMA, fits SHA1 or MD5
261  返回:ima_write_template_field_data(buffer, offset + digestsize, fmt, field_data)
调用者
名称描述
ima_eventdigest_initThis function writes the digest of an event (with size limit).
ima_eventdigest_ng_initThis function writes the digest of an event (without size limit).
ima_eventdigest_modsig_initThis function writes the digest of the file which is expected to match the* digest contained in the file's appended signature.