函数逻辑报告 |
Source Code:fs\verity\enable.c |
Create Date:2022-07-29 10:58:13 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:enable_verity
函数原型:static int enable_verity(struct file *filp, const struct fsverity_enable_arg *arg)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | filp | |
const struct fsverity_enable_arg * | arg |
160 | inode等于file_inode(filp) |
162 | struct merkle_tree_params params = {} |
172 | must be 1 等于1 |
177 | 如果salt_size且copy_from_user(salt prepended to each hashed block , (constu8__user * )(uintptr_t)salt_ptr, salt_size)则 |
187 | 如果sig_size且copy_from_user(ptional PKCS#7 signature , (constu8__user * )(uintptr_t)sig_ptr, sig_size)则 |
210 | inode_lock(inode) |
213 | 否则err等于begin_enable_verity(filp) |
215 | inode_unlock(inode) |
228 | pr_debug("Building Merkle tree...\n") |
231 | 如果err则 |
232 | fsverity_err(inode, "Error %d building Merkle tree", err) |
233 | 转到:rollback |
235 | pr_debug("Done building Merkle tree. Root hash is %s:%*phN\n", crypto API name, e.g. sha256 , same as hash_alg->digest_size , Merkle tree root hash ) |
245 | vi等于Validate the given fsverity_descriptor and create a new fsverity_info from* it. The signature (if present) is also checked. |
246 | 如果是错误则 |
259 | inode_lock(inode) |
261 | inode_unlock(inode) |
262 | 如果err则 |
263 | fsverity_err(inode, "%ps() failed with err %d", end_enable_verity, err) |
265 | fsverity_free_info(vi) |
268 | fsverity_free_info(vi) |
269 | 否则 |
277 | fsverity_set_info(inode, vi) |
279 | out : |
280 | 释放内存 |
281 | 释放内存 |
282 | 返回:err |
284 | rollback : |
285 | inode_lock(inode) |
286 | end_enable_verity(filp, NULL, 0, Merkle tree size in bytes ) |
287 | inode_unlock(inode) |
288 | 转到:out |
名称 | 描述 |
---|---|
fsverity_ioctl_enable | sverity_ioctl_enable() - enable verity on a file* Enable fs-verity on a file. See the "FS_IOC_ENABLE_VERITY" section of* Documentation/filesystems/fsverity.rst for the documentation.* Return: 0 on success, -errno on failure |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |