All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: James Morris <jmorris@namei.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH][RFC] security: revalidate rw permissions for sys_splice and  sys_vmsplice
Date: Wed, 30 May 2007 11:17:43 -0700	[thread overview]
Message-ID: <20070530111743.e638c841.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070530071500.GU15559@kernel.dk>

On Wed, 30 May 2007 09:15:01 +0200
Jens Axboe <jens.axboe@oracle.com> wrote:

> On Tue, May 29 2007, James Morris wrote:
> > Revalidate read/write permissions for splice(2) and vmslice(2), in case 
> > security policy has changed since the files were opened.
> 
> I guess it was inevitably going to happen :-)
> 
> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> 

Probably acked-by was more appropriate.

James, is this considered needed-for-2.6.22?

> +	ret = security_file_permission(out, MAY_WRITE);
> +	if (unlikely(ret < 0))
> +		return ret;


ot: all the unlikely()s are irksome.  I wonder if there was some way of
doing this in security_file_permission() instead.  eg:

static inline int security_file_permission (struct file *file, int mask)
{
	int ret = security_ops->file_permission (file, mask);

	if (likely(ret == 0))
		return 0;
	return ret;
}

  reply	other threads:[~2007-05-30 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 20:22 [PATCH][RFC] security: revalidate rw permissions for sys_splice and sys_vmsplice James Morris
2007-05-30  7:15 ` Jens Axboe
2007-05-30 18:17   ` Andrew Morton [this message]
2007-05-30 18:29     ` 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=20070530111743.e638c841.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.