From: Eric Paris <eparis@redhat.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>,
Stephen Smalley <sds@tycho.nsa.gov>,
James Morris <jmorris@namei.org>,
Eric Paris <eparis@parisplace.org>,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH 08/18] selinux: use generic_file_llseek
Date: Thu, 08 Jul 2010 10:52:43 -0400 [thread overview]
Message-ID: <1278600763.3037.36.camel@localhost> (raw)
In-Reply-To: <1278538820-1392-9-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 selinuxfs needs 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: Stephen Smalley <sds@tycho.nsa.gov>
> Cc: James Morris <jmorris@namei.org>
> Cc: Eric Paris <eparis@parisplace.org>
> Cc: linux-security-module@vger.kernel.org
I'm ok with the patch as is since the .read handlers are ok with it, but
we probably should convert some of them to no_llseek. I'll try to
remember take a look, but if I forget I have no problem with this patch
going in....
-Eric
> ---
> security/selinux/selinuxfs.c | 16 ++++++++++++++++
> 1 files changed, 16 insertions(+), 0 deletions(-)
>
> diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
> index 0293843..79a1bb6 100644
> --- a/security/selinux/selinuxfs.c
> +++ b/security/selinux/selinuxfs.c
> @@ -184,6 +184,7 @@ out:
> static const struct file_operations sel_enforce_ops = {
> .read = sel_read_enforce,
> .write = sel_write_enforce,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_read_handle_unknown(struct file *filp, char __user *buf,
> @@ -201,6 +202,7 @@ static ssize_t sel_read_handle_unknown(struct file *filp, char __user *buf,
>
> static const struct file_operations sel_handle_unknown_ops = {
> .read = sel_read_handle_unknown,
> + .llseek = generic_file_llseek,
> };
>
> #ifdef CONFIG_SECURITY_SELINUX_DISABLE
> @@ -251,6 +253,7 @@ out:
>
> static const struct file_operations sel_disable_ops = {
> .write = sel_write_disable,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_read_policyvers(struct file *filp, char __user *buf,
> @@ -265,6 +268,7 @@ static ssize_t sel_read_policyvers(struct file *filp, char __user *buf,
>
> static const struct file_operations sel_policyvers_ops = {
> .read = sel_read_policyvers,
> + .llseek = generic_file_llseek,
> };
>
> /* declaration for sel_write_load */
> @@ -289,6 +293,7 @@ static ssize_t sel_read_mls(struct file *filp, char __user *buf,
>
> static const struct file_operations sel_mls_ops = {
> .read = sel_read_mls,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_write_load(struct file *file, const char __user *buf,
> @@ -356,6 +361,7 @@ out:
>
> static const struct file_operations sel_load_ops = {
> .write = sel_write_load,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_write_context(struct file *file, char *buf, size_t size)
> @@ -437,6 +443,7 @@ out:
> static const struct file_operations sel_checkreqprot_ops = {
> .read = sel_read_checkreqprot,
> .write = sel_write_checkreqprot,
> + .llseek = generic_file_llseek,
> };
>
> /*
> @@ -482,6 +489,7 @@ static const struct file_operations transaction_ops = {
> .write = selinux_transaction_write,
> .read = simple_transaction_read,
> .release = simple_transaction_release,
> + .llseek = generic_file_llseek,
> };
>
> /*
> @@ -883,6 +891,7 @@ out:
> static const struct file_operations sel_bool_ops = {
> .read = sel_read_bool,
> .write = sel_write_bool,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_commit_bools_write(struct file *filep,
> @@ -935,6 +944,7 @@ out:
>
> static const struct file_operations sel_commit_bools_ops = {
> .write = sel_commit_bools_write,
> + .llseek = generic_file_llseek,
> };
>
> static void sel_remove_entries(struct dentry *de)
> @@ -1127,10 +1137,12 @@ out:
> static const struct file_operations sel_avc_cache_threshold_ops = {
> .read = sel_read_avc_cache_threshold,
> .write = sel_write_avc_cache_threshold,
> + .llseek = generic_file_llseek,
> };
>
> static const struct file_operations sel_avc_hash_stats_ops = {
> .read = sel_read_avc_hash_stats,
> + .llseek = generic_file_llseek,
> };
>
> #ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
> @@ -1255,6 +1267,7 @@ static ssize_t sel_read_initcon(struct file *file, char __user *buf,
>
> static const struct file_operations sel_initcon_ops = {
> .read = sel_read_initcon,
> + .llseek = generic_file_llseek,
> };
>
> static int sel_make_initcon_files(struct dentry *dir)
> @@ -1330,6 +1343,7 @@ out:
>
> static const struct file_operations sel_class_ops = {
> .read = sel_read_class,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_read_perm(struct file *file, char __user *buf,
> @@ -1354,6 +1368,7 @@ out:
>
> static const struct file_operations sel_perm_ops = {
> .read = sel_read_perm,
> + .llseek = generic_file_llseek,
> };
>
> static ssize_t sel_read_policycap(struct file *file, char __user *buf,
> @@ -1372,6 +1387,7 @@ static ssize_t sel_read_policycap(struct file *file, char __user *buf,
>
> static const struct file_operations sel_policycap_ops = {
> .read = sel_read_policycap,
> + .llseek = generic_file_llseek,
> };
>
> static int sel_make_perm_files(char *objclass, int classvalue,
next prev parent reply other threads:[~2010-07-08 14:53 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 [this message]
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
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=1278600763.3037.36.camel@localhost \
--to=eparis@redhat.com \
--cc=arnd@arndb.de \
--cc=eparis@parisplace.org \
--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=sds@tycho.nsa.gov \
/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