Lines Matching refs:file
204 static int ima_calc_file_hash_atfm(struct file *file, in ima_calc_file_hash_atfm() argument
231 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_atfm()
269 rc = integrity_kernel_read(file, offset, rbuf[active], in ima_calc_file_hash_atfm()
315 static int ima_calc_file_ahash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_ahash() argument
324 rc = ima_calc_file_hash_atfm(file, hash, tfm); in ima_calc_file_ahash()
331 static int ima_calc_file_hash_tfm(struct file *file, in ima_calc_file_hash_tfm() argument
348 i_size = i_size_read(file_inode(file)); in ima_calc_file_hash_tfm()
360 rbuf_len = integrity_kernel_read(file, offset, rbuf, PAGE_SIZE); in ima_calc_file_hash_tfm()
380 static int ima_calc_file_shash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_shash() argument
389 rc = ima_calc_file_hash_tfm(file, hash, tfm); in ima_calc_file_shash()
409 int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_hash() argument
413 struct file *f = file; in ima_calc_file_hash()
420 if (file->f_flags & O_DIRECT) { in ima_calc_file_hash()
427 if (!(file->f_mode & FMODE_READ)) { in ima_calc_file_hash()
428 int flags = file->f_flags & ~(O_WRONLY | O_APPEND | in ima_calc_file_hash()
431 f = dentry_open(&file->f_path, flags, file->f_cred); in ima_calc_file_hash()
438 f = file; in ima_calc_file_hash()