| Function report | 
| Source Code: fs\verity\verify.c | Create Date:2022-07-28 20:24:58 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Verify a single data page against the file's Merkle tree
Proto:static bool verify_page(struct inode *inode, const struct fsverity_info *vi, struct ahash_request *req, struct page *data_page)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct inode * | inode | |
| const struct fsverity_info * | vi | |
| struct ahash_request * | req | |
| struct page * | data_page | 
| 89 | params = tree_params | 
| 100 | If WARN_ON_ONCE(!PageLocked(data_page) || PageUptodate(data_page)) Then Return false | 
| 103 | pr_debug_ratelimited("Verifying data page %lu...\n", index) | 
| 110 | When level < umber of levels in Merkle tree cycle | 
| 117 | pr_debug_ratelimited("Level %d: hindex=%lu, hoffset=%u\n", level, hindex, hoffset) | 
| 120 | hpage = read_merkle_tree_page(inode, hindex) | 
| 124 | fsverity_err(inode, "Error %d reading Merkle tree page %lu", err, hindex) | 
| 127 | Go to out | 
| 130 | If PageChecked(hpage) Then | 
| 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 | Go to 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 | When level > 0 cycle Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page. | 
| 176 | Return err == 0 | 
| Name | Describe | 
|---|---|
| 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 | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |