函数逻辑报告 |
Source Code:fs\verity\verify.c |
Create Date:2022-07-29 10:58:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Verify a single data page against the file's Merkle tree
函数原型:static bool verify_page(struct inode *inode, const struct fsverity_info *vi, struct ahash_request *req, struct page *data_page)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
struct inode * | inode | |
const struct fsverity_info * | vi | |
struct ahash_request * | req | |
struct page * | data_page |
89 | params等于tree_params |
100 | 如果WARN_ON_ONCE(!PageLocked(data_page) || PageUptodate(data_page))则返回:false |
103 | pr_debug_ratelimited("Verifying data page %lu...\n", index) |
117 | pr_debug_ratelimited("Level %d: hindex=%lu, hoffset=%u\n", level, hindex, hoffset) |
120 | hpage等于read_merkle_tree_page(inode, hindex) |
122 | 如果是错误则 |
124 | fsverity_err(inode, "Error %d reading Merkle tree page %lu", err, hindex) |
127 | 转到:out |
130 | 如果PageChecked(hpage)则 |
132 | want_hash等于_want_hash |
134 | pr_debug_ratelimited("Hash page already checked, want %s:%*phN\n", crypto API name, e.g. sha256 , hsize, want_hash) |
137 | 转到:descend |
139 | pr_debug_ratelimited("Hash page not yet checked\n") |
145 | pr_debug("Want root hash: %s:%*phN\n", crypto API name, e.g. sha256 , hsize, want_hash) |
147 | descend : |
159 | SetPageChecked(hpage) |
161 | want_hash等于_want_hash |
163 | pr_debug("Verified hash page at level %d, now want %s:%*phN\n", level - 1, crypto API name, e.g. sha256 , hsize, want_hash) |
172 | out : |
173 | 以level大于0循环Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. |
176 | 返回:err恒等于0 |
名称 | 描述 |
---|---|
fsverity_verify_page | sverity_verify_page() - verify a data page* Verify a page that has just been read from a verity file. The page must be a* pagecache page that is still locked and not yet uptodate.* Return: true if the page is valid, else false. |
fsverity_verify_bio | sverity_verify_bio() - verify a 'read' bio that has just completed* Verify a set of pages that have just been read from a verity file. The pages* must be pagecache pages that are still locked and not yet uptodate. Pages |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |