函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\hash_algs.c Create Date:2022-07-29 10:58:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sverity_hash_page() - hash a single data or hash page*@params: the Merkle tree's parameters*@inode: inode for which the hashing is being done*@req: preallocated hash request*@page: the page to hash*@out: output digest, size 'params->digest_size' bytes

函数原型:int fsverity_hash_page(const struct merkle_tree_params *params, const struct inode *inode, struct ahash_request *req, struct page *page, u8 *out)

返回类型:int

参数:

类型参数名称
const struct merkle_tree_params *params
const struct inode *inode
struct ahash_request *req
struct page *page
u8 *out
192  如果WARN_ON(size of data and tree blocks != PAGE_SIZE)则返回:负EINVAL
195  初始化散列表
196  sg_set_page - Set sg entry to point at given page*@sg: SG entry*@page: The page*@len: Length of data*@offset: Offset into page* Description:* Use this function to set an sg entry pointing at a page, never assign* the page directly
197  ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP | CRYPTO_TFM_REQ_MAY_BACKLOG, Async ops completion helper functioons, & wait)
200  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,
202  如果itial hash state or NULL
203  err等于rypto_ahash_import() - import message digest state*@req: reference to ahash_request handle the state is imported into*@in: buffer holding the state* This function imports the hash state into the ahash_request handle from the* input buffer
204  如果err
205  fsverity_err(inode, "Error %d importing hash state", err)
207  返回:err
209  err等于rypto_ahash_finup() - update and finalize message digest*@req: reference to the ahash_request handle that holds all information* needed to perform the cipher operation* This function is a "short-hand" for the function calls of
210  否则
211  err等于rypto_ahash_digest() - calculate message digest for a buffer*@req: reference to the ahash_request handle that holds all information* needed to perform the cipher operation* This function is a "short-hand" for the function calls of crypto_ahash_init,
214  err等于crypto_wait_req(err, & wait)
215  如果errfsverity_err(inode, "Error %d computing page hash", err)
217  返回:err
调用者
名称描述
verify_pageVerify a single data page against the file's Merkle tree