From: Sam Vilain <sam@vilain.net>
To: tvrtko.ursulin@sophos.com
Cc: Herbert Poetzl <herbert@13thfloor.at>,
Andrew Morton <akpm@osdl.org>,
Christoph Hellwig <hch@infradead.org>,
Linux Kernel ML <linux-kernel@vger.kernel.org>,
Al Viro <viro@ftp.linux.org.uk>,
LSM <linux-security-module@mail.wirex.com>
Subject: Re: [RFC] vfs: cleanup of permission()
Date: Thu, 02 Mar 2006 10:18:24 +1300 [thread overview]
Message-ID: <44060FA0.2040303@vilain.net> (raw)
In-Reply-To: <OFAFEC22B7.7F7518A9-ON80257124.0043AF58-80257124.00448503@sophos.com>
tvrtko.ursulin@sophos.com wrote:
> Also, since you are modifying LSM interfaces, why not discuss it on the
> LSM mailing list?
>
> And finally, please don't remove nameidata. Modules out there depend on it
> and we at Sophos are about to release a new product which needs it as
> well. The plan was to announce the whole thing parallel with the release,
> but after spotting your post I was prompted to react ahead of the
> schedule. However, I am very busy at the moment so the actual announcment
> with full details will have to wait for a week or two.
You are treating the per-FS security hooks as if they were VFS security
hooks. This was an easy mistake to make, as the appearance of a (struct
nameidata*) sure makes it look like a VFS call.
However, most functions in the kernel don't pass anything in that
nameidata slot. Some (eg, syscalls that work on open FDs) can't,
either. So the fact that it does not guarantee VFS context information
in all situations means permission() is not a VFS function.
ie, we don't disagree with what you're trying to do, but if you want
path information then you should be working at the VFS layer, not the FS
layer.
Perhaps you could first come up with a patch to the LSM base that adds
VFS hooks rather than FS hooks and make your new system use those hooks?
I think that it might be more obvious where such hooks should go,
after applying this patch.
What we're aiming for, on the permission() front, is that all system
calls, ioctls, etc, call either vfs_permission() or file_permission().
Only those two functions should end up calling permission() directly.
Sam.
next prev parent reply other threads:[~2006-03-01 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 5:26 [RFC] vfs: cleanup of permission() Herbert Poetzl
2006-02-28 5:29 ` [RFC 1/2] vfs: remove nameidata from *_permission() Herbert Poetzl
2006-02-28 5:30 ` [RFC 2/2] vfs: fixup nfs and fuse by passing nd_flags via mask Herbert Poetzl
2006-03-01 8:45 ` [RFC] vfs: cleanup of permission() Trond Myklebust
2006-03-01 12:28 ` tvrtko.ursulin
2006-03-01 12:37 ` Arjan van de Ven
2006-03-01 12:59 ` tvrtko.ursulin
2006-03-01 21:20 ` Sam Vilain
2006-03-01 13:06 ` Herbert Poetzl
2006-03-01 21:18 ` Sam Vilain [this message]
2006-03-01 13:11 ` Herbert Poetzl
2006-03-01 23:42 ` Trond Myklebust
2006-03-02 1:35 ` Sam Vilain
2006-03-02 2:26 ` Trond Myklebust
2006-03-01 22:11 ` Sam Vilain
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=44060FA0.2040303@vilain.net \
--to=sam@vilain.net \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@mail.wirex.com \
--cc=tvrtko.ursulin@sophos.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 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.