函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\ima\ima_main.c Create Date:2022-07-27 21:59:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ma_rdwr_violation_check* Only invalidate the PCR for measured files:* - Opening a file for write when already open for read,* results in a time of measure, time of use (ToMToU) error.* - Opening a file for read when already open for write,

函数原型:static void ima_rdwr_violation_check(struct file *file, struct integrity_iint_cache *iint, int must_measure, char **pathbuf, const char **pathname, char *filename)

返回类型:void

参数:

类型参数名称
struct file *file
struct integrity_iint_cache *iint
intmust_measure
char **pathbuf
const char **pathname
char *filename
113  inode等于file_inode(file)
114  mode等于f_mode
115  bool send_tomtou = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., send_writers = false
117  如果mode按位与le is open for writing
126  否则
127  如果must_measure设置内存位
129  如果inode_is_open_for_write(inode)且must_measuresend_writers = true
133  如果非send_tomtou且非send_writers则返回
136  pathname等于ima_d_path( & f_path, pathbuf, filename)
138  如果send_tomtouma_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.
141  如果send_writersma_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.
调用者
名称描述
process_measurement