Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\verity\hash_algs.c Create Date:2022-07-28 20:24:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int fsverity_hash_page(const struct merkle_tree_params *params, const struct inode *inode, struct ahash_request *req, struct page *page, u8 *out)

Type:int

Parameter:

TypeParameterName
const struct merkle_tree_params *params
const struct inode *inode
struct ahash_request *req
struct page *page
u8 *out
192  If WARN_ON(size of data and tree blocks != PAGE_SIZE) Then Return -EINVAL
195  sg_init_table - Initialize SG table*@sgl: The SG table*@nents: Number of entries in table* Notes:* If this is part of a chained sg table, sg_mark_end() should be* used only on the last table part.
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  If itial hash state or NULL Then
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  If err Then
205  fsverity_err(inode, "Error %d importing hash state", err)
207  Return 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  Else
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  If err Then fsverity_err(inode, "Error %d computing page hash", err)
217  Return err
Caller
NameDescribe
verify_pageVerify a single data page against the file's Merkle tree