Lines Matching full:file
12 #include <linux/file.h>
32 * If the data is under this limit, there's no point creating a shm file to
60 struct file *file;
78 /* Create a shmem file to store the data in. This will permit the data
81 * File content is stored encrypted with randomly generated key.
82 * Since the key is random for each file, we can set the nonce
105 /* save aligned data to file */
106 file = shmem_kernel_file_setup("", enclen, 0);
107 if (IS_ERR(file)) {
108 ret = PTR_ERR(file);
112 written = kernel_write(file, buf, enclen, &pos);
124 payload->path = file->f_path;
126 fput(file);
141 fput(file);
220 payload->length > BIG_KEY_FILE_THRESHOLD ? "file" : "buff");
237 struct file *file;
246 file = dentry_open(&payload->path, O_RDONLY, current_cred());
247 if (IS_ERR(file)) {
248 ret = PTR_ERR(file);
252 /* read file to kernel and decrypt */
253 ret = kernel_read(file, buf, enclen, &pos);
271 fput(file);