All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>,
	"Matthew N. Dodd" <Matthew.Dodd@sparta.com>
Cc: labeled-nfs@linux-nfs.org, selinux@tycho.nsa.gov
Subject: Re: [Labeled-nfs] [PATCH 13/13] NFSD: Label change notification for NFSv4 Server
Date: Mon, 19 Nov 2007 13:44:48 -0800 (PST)	[thread overview]
Message-ID: <236192.48539.qm@web36605.mail.mud.yahoo.com> (raw)
In-Reply-To: <1195506545.5327.1.camel@heimdal.trondhjem.org>


--- Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> 
> On Mon, 2007-11-19 at 15:30 -0500, Matthew N. Dodd wrote:
> > J. Bruce Fields wrote:
> > > On Fri, Nov 16, 2007 at 03:13:02PM -0500, David P. Quigley wrote:
> > >> NFSv4 Provides methods for detecting changes in attributes and
> > >> recalling delegations when state has changed on the server. This has
> > >> been extended to include this functionality for label changes on the
> > >> server. This patch provides the server implementation for a new
> > >> callback used to signal relabeling of files.
> > > 
> > > What's the goal of these callbacks?
> > > 
> > > If you really need a guarantee that all clients will be notified before
> > > the relabelling operation, then I think you need something stronger than
> > > inotify.
> > > 
> > > If you don't care about synchronous notification, then why not just
> > > let nfs find out about the change the next time it does an access check
> > > or something?
> > 
> > That won't happen during vfs_read()/vfs_write().
> 
> You expect it to be common practice for people to change security labels
> on files in the middle of an application read and/or write?

No, it's not common, but it's really really important, and that's
the real problem with a remote callback approach. If you mostly
disallow label changes* you don't need the notification, and if you
do you absolutely need to check every access. There are very few
differences between lockd and what you're looking at here, and no one
is about to hold lockd up as an example of how things ought to work.

Or that's how it looks from here.

-----
* I had said completely, but don't have to be fanatical.


Casey Schaufler
casey@schaufler-ca.com

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

       reply	other threads:[~2007-11-19 21:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1195506545.5327.1.camel@heimdal.trondhjem.org>
2007-11-19 21:44 ` Casey Schaufler [this message]
     [not found]   ` <1195509634.5327.16.camel@heimdal.trondhjem.org>
2007-11-19 22:48     ` [Labeled-nfs] [PATCH 13/13] NFSD: Label change notification for NFSv4 Server 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=236192.48539.qm@web36605.mail.mud.yahoo.com \
    --to=casey@schaufler-ca.com \
    --cc=Matthew.Dodd@sparta.com \
    --cc=labeled-nfs@linux-nfs.org \
    --cc=selinux@tycho.nsa.gov \
    --cc=trond.myklebust@fys.uio.no \
    /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.