函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:calc_buffer_ahash_atfm

函数原型:static int calc_buffer_ahash_atfm(const void *buf, loff_t len, struct ima_digest_data *hash, struct crypto_ahash *tfm)

返回类型:int

参数:

类型参数名称
const void *buf
loff_tlen
struct ima_digest_data *hash
struct crypto_ahash *tfm
538  ahash_rc等于0
540  length等于获得消息文摘大小
542  req等于ahash_request_alloc() - allocate request data structure*@tfm: cipher handle to be registered with the request*@gfp: memory allocation flag that is handed to kmalloc by the API call.* Allocate the request data structure that must be used with the ahash
543  如果非req则返回:负ENOMEM
546  crypto_init_wait( & wait)
547  ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP, Async ops completion helper functioons, & wait)
551  rc等于ahash_wait(rypto_ahash_init() - (re)initialize message digest handle*@req: ahash_request handle that already is initialized with all necessary* data using the ahash_request_* API functions* The call (re-)initializes the message digest referenced by the ahash_request, & wait)
552  如果rc则转到:out
555  初始化散列表项目
556  ahash_request_set_crypt() - set data buffers*@req: ahash_request handle to be updated*@src: source scatter/gather list*@result: buffer that is filled with the message digest -- the caller must* ensure that the buffer has sufficient space by, for example,
558  ahash_rc等于rypto_ahash_update() - add data to message digest for processing*@req: ahash_request handle that was previously initialized with the* crypto_ahash_init call
561  rc等于ahash_wait(ahash_rc, & wait)
562  如果非rc
563  ahash_request_set_crypt() - set data buffers*@req: ahash_request handle to be updated*@src: source scatter/gather list*@result: buffer that is filled with the message digest -- the caller must* ensure that the buffer has sufficient space by, for example,
564  rc等于ahash_wait(rypto_ahash_final() - calculate message digest*@req: reference to the ahash_request handle that holds all information* needed to perform the cipher operation* Finalize the message digest operation and create the message digest, & wait)
566  out :
567  归零并释放数据结构请求
568  返回:rc
调用者
名称描述
calc_buffer_ahash