Skip to content

Commit cdcd90f

Browse files
arndbxjamesmorris
authored andcommitted
ima: use generic_file_llseek for securityfs
The default for llseek will change to no_llseek, so securityfs users need to add explicit .llseek assignments. Since we're dealing with regular files from a VFS perspective, use generic_file_llseek. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
1 parent 7e2deb7 commit cdcd90f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎security/integrity/ima/ima_fs.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ static ssize_t ima_show_htable_violations(struct file *filp,
4545
}
4646

4747
static const struct file_operations ima_htable_violations_ops = {
48-
.read = ima_show_htable_violations
48+
.read = ima_show_htable_violations,
49+
.llseek = generic_file_llseek,
4950
};
5051

5152
static ssize_t ima_show_measurements_count(struct file *filp,
@@ -57,7 +58,8 @@ static ssize_t ima_show_measurements_count(struct file *filp,
5758
}
5859

5960
static const struct file_operations ima_measurements_count_ops = {
60-
.read = ima_show_measurements_count
61+
.read = ima_show_measurements_count,
62+
.llseek = generic_file_llseek,
6163
};
6264

6365
/* returns pointer to hlist_node */
@@ -319,7 +321,8 @@ static int ima_release_policy(struct inode *inode, struct file *file)
319321
static const struct file_operations ima_measure_policy_ops = {
320322
.open = ima_open_policy,
321323
.write = ima_write_policy,
322-
.release = ima_release_policy
324+
.release = ima_release_policy,
325+
.llseek = generic_file_llseek,
323326
};
324327

325328
int __init ima_fs_init(void)

0 commit comments

Comments
 (0)