Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_main.c Create Date:2022-07-28 19:58:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ma_post_read_file - in memory collect/appraise/audit measurement*@file: pointer to the file to be measured/appraised/audit*@buf: pointer to in memory file contents*@size: size of in memory file contents*@read_id: caller identifier

Proto:int ima_post_read_file(struct file *file, void *buf, loff_t size, enum kernel_read_file_id read_id)

Type:int

Parameter:

TypeParameterName
struct file *file
void *buf
loff_tsize
enum kernel_read_file_idread_id
553  If Not file && read_id == READING_FIRMWARE Then
556  pr_err("Prevent firmware loading_store.\n")
557  Return -EACCES
559  Return 0
563  If Not file && read_id == READING_X509_CERTIFICATE Then Return 0
566  If Not file || Not buf || size == 0 Then
567  If ima_appraise & Appraise integrity measurements Then Return -EACCES
569  Return 0
572  func = If read_idmap[read_id] Else FILE_CHECK
573  security_task_getsecid(current process, & secid)
574  Return process_measurement(file, current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.(), secid, buf, size, MAY_READ, func)