Function report | 
Source Code:security\integrity\ima\ima_init.c | 
Create Date:2022-07-28 19:57:58 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name: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
Proto:static int __init ima_add_boot_aggregate(void)
Type:int
Parameter:Nothing
| 44 | op[] = "add_boot_aggregate" | 
| 45 | audit_cause = "ENOMEM" | 
| 47 | iint = tmp_iint | 
| 48 | struct ima_event_data event_data = {iint = iint, filename = ame for boot aggregate entry } | 
| 51 | violation = 0 | 
| 52 | struct{struct ima_digest_data hdr;char digest[20];}hash | 
| 60 | algo = HASH_ALGO_SHA1 | 
| 61 | length = SHA1_DIGEST_SIZE | 
| 63 | If ima_tpm_chip Then | 
| 64 | result = ima_calc_boot_aggregate( & hdr) | 
| 65 | If result < 0 Then | 
| 66 | audit_cause = "hashing_error" | 
| 67 | Go to err_out | 
| 71 | result = ima_alloc_init_template( & event_data, & entry, NULL) | 
| 72 | If result < 0 Then | 
| 73 | audit_cause = "alloc_entry" | 
| 74 | Go to err_out | 
| 80 | If result < 0 Then | 
| 85 | Return 0 | 
| 86 | err_out : | 
| 87 | integrity_audit_msg(PCR invalidation msgs , NULL, ame for boot aggregate entry , op, audit_cause, result, 0) | 
| 89 | Return result | 
| Name | Describe | 
|---|---|
| ima_init | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |