linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Christoph Hellwig <hch@infradead.org>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	Arjan van de Ven <arjan@infradead.org>,
	Chris Wright <chrisw@sous-sol.org>,
	James Morris <jmorris@namei.org>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Subject: Re: [PATCH 1/9] Unionfs: security convert lsm into a static interface fix
Date: Tue, 23 Oct 2007 10:07:39 +0100	[thread overview]
Message-ID: <20071023090739.GA19758@infradead.org> (raw)
In-Reply-To: <200710230048.l9N0m4di009035@agora.fsl.cs.sunysb.edu>

On Mon, Oct 22, 2007 at 08:48:04PM -0400, Erez Zadok wrote:
> Why?  Are you concerned that the security policy may change after a module
> is loaded?

No, it's a matter of proper layering.  We generally don't want modules
like stackabke filesystems to call directly into methods but rather use
proper highlevel VFS helpers to isolate them from details and possible
changes.  The move to out of line security_ helpers just put this on the
radard.

> I can probably get rid of having unionfs call security_inode_permission, by
> calling permission() myself and carefully post-process its return code
> (unionfs needs to "ignore" EROFS initially, to allow copyup to take place).

Sounds fine.

> But security_file_ioctl doesn't have any existing helper I can call.  I can
> introduce a trivial vfs_security_file_ioctl wrapper to security_file_ioctl,
> but what about the already existing *19* exported security_* functions in
> security/security.c?  Do you want to see simple wrappers for all of them?
> It seems redundant to add a one-line wrapper around an already one-line
> function around security_ops->XXX.  Plus, some of the existing exported
> security_* functions are file-system related, others are networking, etc.  So
> we'll need wrappers whose names are prefixed appropriately: vfs_*, net_*,
> etc.

The fix for security_file_ioctl is probably to either not do it at all
or move it the call to security_file_ioctl into vfs_ioctl and get it by
using that helper.  I suspect most other security_ exports should be
avoided similarly.

I also suspect the whole issue of where and how-many times to call LSM
methods for stackable filesystems is a huge can of worms and it might make
sense to talk to the LSM folks about it.

  reply	other threads:[~2007-10-23  9:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 23:51 [GIT PULL -mm] 0/9 Unionfs updates/cleanups/fixes Erez Zadok
2007-10-21 23:51 ` [PATCH 1/9] Unionfs: security convert lsm into a static interface fix Erez Zadok
2007-10-22  8:22   ` Christoph Hellwig
2007-10-23  0:48     ` Erez Zadok
2007-10-23  9:07       ` Christoph Hellwig [this message]
2007-10-27 23:01         ` Erez Zadok
2007-10-21 23:51 ` [PATCH 2/9] Unionfs: slab api remove useless ctor parameter and reorder parameters Erez Zadok
2007-10-21 23:51 ` [PATCH 3/9] Unionfs: support lower filesystems without writeback capability Erez Zadok
2007-10-21 23:51 ` [PATCH 4/9] Unionfs: don't printk trivial message upon normal rename-copyup Erez Zadok
2007-10-21 23:51 ` [PATCH 5/9] Unionfs: don't bother validating dentry if it has no lower branches Erez Zadok
2007-10-21 23:51 ` [PATCH 6/9] Unionfs: convert a printk to pr_debug in release Erez Zadok
2007-10-21 23:51 ` [PATCH 7/9] Unionfs: remove for_writepages nfs workaround Erez Zadok
2007-10-21 23:51 ` [PATCH 8/9] Unionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID Erez Zadok
2007-10-21 23:51 ` [PATCH 9/9] Unionfs: remove obsolete #define and comment Erez Zadok

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=20071023090739.GA19758@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=chrisw@sous-sol.org \
    --cc=ezk@cs.sunysb.edu \
    --cc=jmorris@namei.org \
    --cc=jsipek@cs.sunysb.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=serue@us.ibm.com \
    --cc=viro@ftp.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).