mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, John Kacur <jkacur@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Christoph Hellwig <hch@lst.de>, Mimi Zohar <zohar@us.ibm.com>,
	James Morris <jmorris@namei.org>,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH 13/18] ima: use generic_file_llseek for securityfs
Date: Thu, 08 Jul 2010 08:50:15 -0400	[thread overview]
Message-ID: <1278593415.3313.13.camel@localhost.localdomain> (raw)
In-Reply-To: <1278538820-1392-14-git-send-email-arnd@arndb.de>

On Wed, 2010-07-07 at 23:40 +0200, Arnd Bergmann wrote:
> 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>
> Cc: James Morris <jmorris@namei.org>
> Cc: linux-security-module@vger.kernel.org

As both the 'violations' and 'runtime_measurement_counts' are single
values and 'policy' doesn't support read, this patch doesn't hurt, but
adding .llseek is probably unnecessary.

thanks,

Mimi

> ---
>  security/integrity/ima/ima_fs.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
> index 8fe736a..ef21b96 100644
> --- a/security/integrity/ima/ima_fs.c
> +++ b/security/integrity/ima/ima_fs.c
> @@ -45,7 +45,8 @@ static ssize_t ima_show_htable_violations(struct file *filp,
>  }
> 
>  static const struct file_operations ima_htable_violations_ops = {
> -	.read = ima_show_htable_violations
> +	.read = ima_show_htable_violations,
> +	.llseek = generic_file_llseek,
>  };
> 
>  static ssize_t ima_show_measurements_count(struct file *filp,
> @@ -57,7 +58,8 @@ static ssize_t ima_show_measurements_count(struct file *filp,
>  }
> 
>  static const struct file_operations ima_measurements_count_ops = {
> -	.read = ima_show_measurements_count
> +	.read = ima_show_measurements_count,
> +	.llseek = generic_file_llseek,
>  };
> 
>  /* returns pointer to hlist_node */
> @@ -319,7 +321,8 @@ static int ima_release_policy(struct inode *inode, struct file *file)
>  static const struct file_operations ima_measure_policy_ops = {
>  	.open = ima_open_policy,
>  	.write = ima_write_policy,
> -	.release = ima_release_policy
> +	.release = ima_release_policy,
> +	.llseek = generic_file_llseek,
>  };
> 
>  int __init ima_fs_init(void)



  reply	other threads:[~2010-07-08 12:50 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07 21:40 [PATCH 00/18] VFS: turn no_llseek into the default Arnd Bergmann
2010-07-07 21:40 ` [PATCH 01/18] drm: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 02/18] net/wireless: use generic_file_llseek in debugfs Arnd Bergmann
2010-07-07 21:40 ` [PATCH 03/18] lkdtm: " Arnd Bergmann
2010-07-22  0:06   ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 04/18] ib/qib: use generic_file_llseek Arnd Bergmann
2010-07-21 18:40   ` Roland Dreier
2010-07-07 21:40 ` [PATCH 05/18] arm/omap: use generic_file_llseek in iommu_debug Arnd Bergmann
2010-07-07 21:40 ` [PATCH 06/18] spufs: use llseek in all file operations Arnd Bergmann
2010-07-08  1:15   ` Jeremy Kerr
2010-07-08 13:02     ` Arnd Bergmann
2010-07-08 13:29       ` [PATCH v2] " Arnd Bergmann
2010-07-07 21:40 ` [PATCH 07/18] staging: " Arnd Bergmann
2010-07-07 21:40 ` [PATCH 08/18] selinux: use generic_file_llseek Arnd Bergmann
2010-07-08 14:52   ` Eric Paris
2010-07-11 23:44   ` James Morris
2010-07-07 21:40 ` [PATCH 09/18] tracing: use generic_file_llseek for debugfs Arnd Bergmann
2010-07-07 21:58   ` Frederic Weisbecker
2010-07-21 20:52   ` [tip:perf/core] tracing: Use " tip-bot for Arnd Bergmann
2010-07-07 21:40 ` [PATCH 10/18] ibmasmfs: use generic_file_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 11/18] oprofile: make event buffer nonseekable Arnd Bergmann
2010-07-09  7:51   ` Robert Richter
2010-07-26  9:06   ` Robert Richter
2010-07-07 21:40 ` [PATCH 12/18] raw: use explicit llseek file operations Arnd Bergmann
2010-07-21 23:50   ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 13/18] ima: use generic_file_llseek for securityfs Arnd Bergmann
2010-07-08 12:50   ` Mimi Zohar [this message]
2010-07-08 13:00     ` Arnd Bergmann
2010-07-08 13:18       ` Mimi Zohar
2010-07-08 22:52         ` James Morris
2010-07-09 13:00           ` Arnd Bergmann
2010-07-11 23:45   ` James Morris
2010-07-07 21:40 ` [PATCH 14/18] irda/irnet: use noop_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 15/18] viotape: " Arnd Bergmann
2010-07-21 23:59   ` Frederic Weisbecker
2010-07-07 21:40 ` [PATCH 16/18] llseek: automatically add .llseek fop Arnd Bergmann
2010-07-07 21:55   ` Mike Frysinger
2010-07-07 22:10     ` Arnd Bergmann
2010-07-08 12:17   ` Boaz Harrosh
2010-07-08 12:23     ` Arnd Bergmann
2010-07-08 12:32       ` Boaz Harrosh
2010-07-07 21:40 ` [PATCH 17/18] vfs: don't use BKL in default_llseek Arnd Bergmann
2010-07-07 21:40 ` [PATCH 18/18] vfs: make no_llseek the default Arnd Bergmann
2010-07-08 11:25   ` Tetsuo Handa
2010-07-08 12:08     ` Arnd Bergmann
2010-07-08 12:57       ` Tetsuo Handa
2010-07-08 13:18         ` Arnd Bergmann
2010-07-08 22:55         ` James Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278593415.3313.13.camel@localhost.localdomain \
    --to=zohar@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=fweisbec@gmail.com \
    --cc=hch@lst.de \
    --cc=jkacur@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=zohar@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome