函数逻辑报告 | 
Source Code:security\integrity\ima\ima_crypto.c | 
Create Date:2022-07-27 22:01:00 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称:ma_calc_file_hash - calculate file hash* Asynchronous hash (ahash) allows using HW acceleration for calculating* a hash. ahash performance varies for different data sizes on different* crypto accelerators
函数原型:int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct file * | file | |
| struct ima_digest_data * | hash | 
| 414 | bool new_file_instance = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., modified_flags = false | 
| 427 | 如果非f_mode按位与le is open for reading 的值则 | 
| 431 | f等于dentry_open( & f_path, flags, f_cred) | 
| 432 | 如果是错误则 | 
| 437 | pr_info_ratelimited("Unable to reopen file for reading.\n") | 
| 440 | modified_flags = true | 
| 441 | 否则 | 
| 442 | new_file_instance = true | 
| 454 | rc等于ima_calc_file_shash(f, hash) | 
| 455 | out : | 
| 456 | 如果new_file_instance则fput(f) | 
| 458 | 否则如果modified_flags则f_flags与等于le is open for reading 的反 | 
| 460 | 返回:rc | 
| 名称 | 描述 | 
|---|---|
| ima_collect_measurement | ma_collect_measurement - collect file measurement* Calculate the file hash, if it doesn't already exist,* storing the measurement and i_version in the iint.* Must be called with iint->mutex held.* Return 0 on success, error code otherwise | 
| ima_eventdigest_init | This function writes the digest of an event (with size limit). | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |