函数逻辑报告 |
Source Code:security\integrity\evm\evm_crypto.c |
Create Date:2022-07-27 22:09:14 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Calculate the HMAC value across the set of protected security xattrs.* Instead of retrieving the requested xattr, for performance, calculate* the hmac using the requested xattr value. Don't alloc/free memory for
函数原型:static int evm_calc_hmac_or_hash(struct dentry *dentry, const char *req_xattr_name, const char *req_xattr_value, size_t req_xattr_value_len, uint8_t type, struct evm_digest *data)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct dentry * | dentry | |
| const char * | req_xattr_name | |
| const char * | req_xattr_value | |
| size_t | req_xattr_value_len | |
| uint8_t | type | |
| struct evm_digest * | data |
| 195 | xattr_size等于0 |
| 196 | char * xattr_value = NULL |
| 199 | bool ima_present = false |
| 201 | 如果非i_opflags按位与IOP_XATTR的值或s_user_ns不等于userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?则返回:负EOPNOTSUPP |
| 213 | bool is_ima = false |
| 218 | 如果req_xattr_name且req_xattr_value且非字符串比较则 |
| 227 | size等于vfs_getxattr_alloc(dentry, name, & xattr_value, xattr_size, GFP_NOFS) |
| 233 | 如果size小于0则继续下一循环 |
| 236 | error等于0 |
| 237 | xattr_size等于size |
| 239 | 如果is_ima则ima_present = true |
| 245 | 如果type恒等于EVM_XATTR_PORTABLE_DIGSIG且非ima_present则返回:负EPERM |
| 247 | out : |
| 248 | 释放内存 |
| 249 | 释放内存 |
| 250 | 返回:error |
| 名称 | 描述 |
|---|---|
| evm_calc_hmac | |
| evm_calc_hash |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |