函数逻辑报告 |
Source Code:security\integrity\ima\ima_api.c |
Create Date:2022-07-27 22:01:46 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:ma_store_template - store ima template measurements* Calculate the hash of a template entry, add the template entry* to an ordered list of measurement entries maintained inside the kernel,* and also update the aggregate integrity value (maintained inside
函数原型:int ima_store_template(struct ima_template_entry *entry, int violation, struct inode *inode, const unsigned char *filename, int pcr)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ima_template_entry * | entry | |
int | violation | |
struct inode * | inode | |
const unsigned char * | filename | |
int | pcr |
95 | op[]等于"add_template_measure" |
96 | audit_cause[]等于"hashing_error" |
97 | template_name等于name |
99 | struct{struct ima_digest_data hdr;char digest[20];}hash |
104 | 如果非violation则 |
105 | num_fields等于num_fields |
108 | algo等于HASH_ALGO_SHA1 |
109 | result等于ima_calc_field_array_hash( & template related data [0], template descriptor , num_fields, & hdr) |
112 | 如果result小于0则 |
113 | integrity_audit_msg(PCR invalidation msgs , inode, template_name, op, audit_cause, result, 0) |
116 | 返回:result |
118 | memcpy( sha1 or md5 measurement hash , digest, length) |
122 | 返回:result |
名称 | 描述 |
---|---|
process_buffer_measurement | process_buffer_measurement - Measure the buffer to ima log |
ima_add_violation | ma_add_violation - add violation to measurement list.* Violations are flagged in the measurement list with zero hash values.* By extending the PCR with 0xFF's instead of with zeroes, the PCR* value is invalidated. |
ima_store_measurement | ma_store_measurement - store file measurement* Create an "ima" template and then store the template by calling* ima_store_template |
ima_add_boot_aggregate | Add the boot aggregate to the IMA measurement list and extend* the PCR register.* Calculate the boot aggregate, a SHA1 over tpm registers 0-7,* assuming a TPM chip exists, and zeroes if the TPM chip does not* exist |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |