函数逻辑报告 | 
Source Code:security\integrity\ima\ima_api.c | 
Create Date:2022-07-27 22:01:58 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称: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
函数原型:int ima_collect_measurement(struct integrity_iint_cache *iint, struct file *file, void *buf, loff_t size, enum hash_algo algo, struct modsig *modsig)
返回类型:int
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct integrity_iint_cache * | iint | |
| struct file * | file | |
| void * | buf | |
| loff_t | size | |
| enum hash_algo | algo | |
| struct modsig * | modsig | 
| 210 | audit_cause等于"failed" | 
| 211 | inode等于file_inode(file) | 
| 213 | result等于0 | 
| 217 | struct{struct ima_digest_data hdr;char digest[64];}hash | 
| 227 | 如果modsig则ima_collect_modsig(modsig, buf, size) | 
| 238 | i_version等于de_query_iversion - read i_version for later use*@inode: inode from which i_version should be read* Read the inode i_version counter | 
| 254 | 如果非tmpbuf则 | 
| 261 | rack inode changes 等于i_version | 
| 266 | out : | 
| 267 | 如果result则 | 
| 268 | 如果f_flags按位与O_DIRECT则audit_cause等于"failed(directio)" | 
| 271 | integrity_audit_msg(Data integrity verification , inode, filename, "collect_data", audit_cause, result, 0) | 
| 275 | 返回:result | 
| 名称 | 描述 | 
|---|---|
| ima_update_xattr | ma_update_xattr - update 'security.ima' hash value | 
| process_measurement | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |