Lines Matching refs:file
57 static void ima_rdwr_violation_check(struct file *file) in ima_rdwr_violation_check() argument
59 struct dentry *dentry = file->f_path.dentry; in ima_rdwr_violation_check()
61 fmode_t mode = file->f_mode; in ima_rdwr_violation_check()
90 pathname = ima_d_path(&file->f_path, &pathbuf); in ima_rdwr_violation_check()
104 struct inode *inode, struct file *file) in ima_check_last_writer() argument
106 fmode_t mode = file->f_mode; in ima_check_last_writer()
116 ima_update_xattr(iint, file); in ima_check_last_writer()
127 void ima_file_free(struct file *file) in ima_file_free() argument
129 struct inode *inode = file_inode(file); in ima_file_free()
139 ima_check_last_writer(iint, inode, file); in ima_file_free()
142 static int process_measurement(struct file *file, const char *filename, in process_measurement() argument
145 struct inode *inode = file_inode(file); in process_measurement()
188 rc = ima_collect_measurement(iint, file); in process_measurement()
192 pathname = !filename ? ima_d_path(&file->f_path, &pathbuf) : filename; in process_measurement()
194 pathname = (const char *)file->f_dentry->d_name.name; in process_measurement()
197 ima_store_measurement(iint, file, pathname); in process_measurement()
199 rc = ima_appraise_measurement(_func, iint, file, pathname); in process_measurement()
224 int ima_file_mmap(struct file *file, unsigned long prot) in ima_file_mmap() argument
226 if (file && (prot & PROT_EXEC)) in ima_file_mmap()
227 return process_measurement(file, NULL, MAY_EXEC, MMAP_CHECK); in ima_file_mmap()
246 return process_measurement(bprm->file, in ima_bprm_check()
262 int ima_file_check(struct file *file, int mask) in ima_file_check() argument
264 ima_rdwr_violation_check(file); in ima_file_check()
265 return process_measurement(file, NULL, in ima_file_check()
280 int ima_module_check(struct file *file) in ima_module_check() argument
282 if (!file) { in ima_module_check()
290 return process_measurement(file, NULL, MAY_EXEC, MODULE_CHECK); in ima_module_check()