Function report | 
Source Code:security\integrity\ima\ima_crypto.c | 
Create Date:2022-07-28 19:58:32 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name: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
Proto:int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| 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 | If Not (f_mode & le is open for reading ) Then | 
| 431 | f = dentry_open( & f_path, flags, f_cred) | 
| 437 | pr_info_ratelimited("Unable to reopen file for reading.\n") | 
| 439 | f_flags |= le is open for reading | 
| 440 | modified_flags = true | 
| 441 | Else | 
| 442 | new_file_instance = true | 
| 448 | If minimum file size for ahash use && i_size >= minimum file size for ahash use Then | 
| 454 | rc = ima_calc_file_shash(f, hash) | 
| 455 | out : | 
| 456 | If new_file_instance Then fput(f) | 
| 458 | Else if modified_flags Then f_flags &= ~le is open for reading | 
| 460 | Return rc | 
| Name | Describe | 
|---|---|
| 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). | 
| 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  |