| Function report | 
| Source Code: fs\verity\open.c | Create Date:2022-07-28 20:24:50 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Validate the given fsverity_descriptor and create a new fsverity_info from* it. The signature (if present) is also checked.
Proto:struct fsverity_info *fsverity_create_info(const struct inode *inode, void *_desc, size_t desc_size)
Type:struct fsverity_info
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const struct inode * | inode | |
| void * | _desc | |
| size_t | desc_size | 
| 155 | fsverity_err(inode, "Unrecognized descriptor size: %zu bytes", desc_size) | 
| 160 | If must be 1 != 1 Then | 
| 161 | fsverity_err(inode, "Unrecognized descriptor version: %u", must be 1 ) | 
| 167 | fsverity_err(inode, "Reserved bits set in descriptor") | 
| 171 | If size of salt in bytes; 0 if none > size of salt prepended to each hashed block Then | 
| 172 | fsverity_err(inode, "Invalid salt_size: %u", size of salt in bytes; 0 if none ) | 
| 176 | If le64_to_cpu(size of file the Merkle tree is built over ) != i_size Then | 
| 177 | fsverity_err(inode, "Wrong data_size: %llu (desc) != %lld (inode)", le64_to_cpu(size of file the Merkle tree is built over ), i_size) | 
| 192 | If err Then | 
| 193 | fsverity_err(inode, "Error %d initializing Merkle tree parameters", err) | 
| 196 | Go to out | 
| 201 | err = Compute the file measurement by hashing the fsverity_descriptor excluding the* signature and with the sig_size field set to 0. | 
| 203 | If err Then | 
| 204 | fsverity_err(inode, "Error %d computing file measurement", err) | 
| 205 | Go to out | 
| 207 | pr_debug("Computed file measurement: %s:%*phN\n", crypto API name, e.g. sha256 , same as hash_alg->digest_size , measurement) | 
| 211 | err = signature.c | 
| 212 | out : | 
| 213 | If err Then | 
| 214 | fsverity_free_info(vi) | 
| 217 | Return vi | 
| Name | Describe | 
|---|---|
| ensure_verity_info | Ensure the inode has an ->i_verity_info | 
| enable_verity | 
| 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 |