| Function report | 
| Source Code: security\integrity\ima\ima_main.c | Create Date:2022-07-28 19:58:16 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name: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,
Proto:static void ima_rdwr_violation_check(struct file *file, struct integrity_iint_cache *iint, int must_measure, char **pathbuf, const char **pathname, char *filename)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct file * | file | |
| struct integrity_iint_cache * | iint | |
| int | must_measure | |
| char ** | pathbuf | |
| const char ** | pathname | |
| char * | filename | 
| 113 | inode = file_inode(file) | 
| 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 | If mode & le is open for writing Then | 
| 118 | If atomic_read( & struct files open RO ) && IS_IMA(inode) Then | 
| 126 | Else | 
| 127 | If must_measure Then Atomically set a bit in memory | 
| 129 | If inode_is_open_for_write(inode) && must_measure Then send_writers = true | 
| 133 | If Not send_tomtou && Not send_writers Then Return | 
| 136 | pathname = ima_d_path( & f_path, pathbuf, filename) | 
| Name | Describe | 
|---|---|
| process_measurement | 
| 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 |