From: David Howells <dhowells@redhat.com>
To: "Peter Dolding" <oiaohm@gmail.com>
Cc: dhowells@redhat.com, "Christoph Hellwig" <hch@infradead.org>,
"Serge E. Hallyn" <serue@us.ibm.com>,
"Mimi Zohar" <zohar@us.ibm.com>,
serue@linux.vnet.ibm.com, "James Morris" <jmorris@namei.org>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
"Randy Dunlap" <randy.dunlap@oracle.com>,
safford@watson.ibm.com, sailer@watson.ibm.com,
"Stephen Smalley" <sds@tycho.nsa.gov>,
"Al Viro" <viro@zeniv.linux.org.uk>,
"Mimi Zohar" <zohar@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/4] integrity: Linux Integrity Module(LIM)
Date: Wed, 13 Aug 2008 15:11:53 +0100 [thread overview]
Message-ID: <20485.1218636713@redhat.com> (raw)
In-Reply-To: <e7d8f83e0808130344x29fcb9aja00ce3f64a95ef7b@mail.gmail.com>
Peter Dolding <oiaohm@gmail.com> wrote:
> Credentials patch for Linux allows more than the BSD one does. Linux one is
> a complete permission storage replacement.
No, it isn't. It replaces the permission storage facility of a process but
does not change the way in which an inode caches its credentials in RAM.
> http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-08/msg02682.html
>
> Note the file credentials one.
I said "Open file credentials". I was referring to struct file which
designates an open file handle, not the file/inode itself. What this means is
that the open file handle takes a reference to the subjective security context
of the process that opened it, at the time it opened it, so that accesses to
that file are (with exceptions) done with those credentials, no matter who is
actually using the handle.
For disk filesystems, for the most part, this makes no difference: an open file
is usable by anyone who has the handle. However, for network filesystems,
where each request is marked with the details of who the request should be
accounted to and the server decides, it does matter.
> That is reused by FS Cache and it creates fake inodes.
FS-Cache+CacheFiles doesn't create fake inodes at all. It creates real inodes
on disk in the cache. The reason for these patches is that CacheFiles needs to
use its own subjective security context when creating or accessing these
inodes, rather than the subjective context of whoever invoked AFS or NFS, and
thus caused CacheFiles to touch the cache.
> "vfs_permission and file_permission are just small wrappers around
> inode_permission." No longer both go to inote_permission after the
> credentials patch is in. file_permission instead goes to credentials
> struct connected to the inode. Most calls to inode_permission end up
> wrapped to the credentials struct.
I don't understand what you're talking about. Looking in fs/namei.c, I see:
int vfs_permission(struct nameidata *nd, int mask)
{
return inode_permission(nd->path.dentry->d_inode, mask);
}
And:
int file_permission(struct file *file, int mask)
{
return inode_permission(file->f_path.dentry->d_inode, mask);
}
That looks like they still both go to inode_permission().
> Basically by the way Linux Credentials patch is being done.
> inode_permission could completely cease to exist. Completely
> replaced by the credentials structure.
Erm... Why? inode_permission() is a function, the creds struct is a data
type.
> Each filesystem having its own cache is one reason why Linux Credentials
> Patch is being brought into live.
Not as far as I know. The credentials belonging to the filesystem and the
inodes in the filesystem belong to the filesystem and are not held in cred
structs. Using cred structs for inodes would waste memory as a task's
credentials have a lot of bits an inode's don't.
> So a single cache can store all the need information of the OS and for the
> file system. Even better operate on filesystems lacking all the need
> permission structs using a userspace program to fill in some of the blanks.
>
> LSM's in Credentials can there own protected data sets since all
> alterations to Credentials by the user space deamon have to go past
> LSM for approval or rejection. Linux Credentials only need a extra
> protected zone added to cover you LIM needs and AV needs to store
> data.
Are you suggesting the offloading of security data caching to userspace?
> In simple terms permissions stored in inodes is basically deprecated
> by Linux's Credentials patch.
In simple terms, no they aren't.
> Sorting out the Credentials patch is kinda key. Nothing you AV or
> Integrity people is strange to the Linux Credentials patch. Without
> embracing requires more processing when pulling data from a common
> cache that has already been AV or Integrity scanned and maintained in
> that state. Now its really designing the struct that should exist in
> Credentials.
>From my quick glance over the integrity patches, I'd say that the cred struct
is entirely the wrong place to store this data. It's nothing to do with a
task's subjective state, except, perhaps, in setting it up. It appears to be
per-inode state.
David
next prev parent reply other threads:[~2008-08-13 14:18 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080808184349.999902616@linux.vnet.ibm.com>
2008-08-08 18:55 ` [PATCH 1/4] integrity: TPM internel kernel interface Mimi Zohar
2008-08-09 18:46 ` Christoph Hellwig
2008-08-11 21:13 ` Mimi Zohar
2008-08-12 19:30 ` Christoph Hellwig
2008-08-12 20:57 ` Kenneth Goldman
2008-08-12 21:36 ` Alan Cox
2008-08-13 13:46 ` Kenneth Goldman
2008-08-13 13:40 ` Alan Cox
2008-08-13 14:45 ` Christoph Hellwig
2008-08-13 16:39 ` Kenneth Goldman
2008-08-12 23:16 ` Greg KH
2008-08-13 13:58 ` Kenneth Goldman
2008-08-13 16:56 ` Mimi Zohar
2008-08-14 11:12 ` Pavel Machek
2008-08-15 10:37 ` Peter Dolding
2008-08-15 18:50 ` Kenneth Goldman
2008-08-15 19:22 ` Valdis.Kletnieks
2008-08-15 21:17 ` Alan Cox
2008-08-18 15:01 ` Kenneth Goldman
2008-08-08 18:55 ` [PATCH 2/4] integrity: special fs magic Mimi Zohar
2008-08-08 19:04 ` Greg KH
2008-08-08 19:15 ` Greg KH
2008-08-08 19:50 ` Mimi Zohar
2008-08-08 23:07 ` Greg KH
2008-08-09 18:47 ` Christoph Hellwig
2008-08-10 13:48 ` Mimi Zohar
2008-08-08 19:36 ` Mimi Zohar
2008-08-08 23:15 ` Christoph Hellwig
2008-08-08 18:56 ` [PATCH 3/4] integrity: Linux Integrity Module(LIM) Mimi Zohar
2008-08-09 18:53 ` Christoph Hellwig
2008-08-10 13:52 ` Mimi Zohar
2008-08-11 17:02 ` Serge E. Hallyn
2008-08-11 19:08 ` Mimi Zohar
2008-08-11 19:56 ` Serge E. Hallyn
2008-08-12 8:41 ` Peter Dolding
2008-08-12 19:29 ` Christoph Hellwig
2008-08-13 10:44 ` Peter Dolding
2008-08-13 14:11 ` David Howells [this message]
2008-08-13 22:57 ` Peter Dolding
2008-08-13 17:03 ` Mimi Zohar
2008-08-12 19:27 ` Christoph Hellwig
2008-08-12 21:19 ` Serge E. Hallyn
2008-08-13 17:03 ` Mimi Zohar
2008-08-12 19:25 ` Christoph Hellwig
2008-08-08 18:56 ` [PATCH 4/4] integrity: IMA as an integrity service provider Mimi Zohar
2008-08-08 20:06 ` Randy Dunlap
2008-10-07 18:00 [PATCH 0/4] integrity Mimi Zohar
2008-10-07 18:00 ` [PATCH 3/4] integrity: Linux Integrity Module(LIM) Mimi Zohar
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=20485.1218636713@redhat.com \
--to=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=oiaohm@gmail.com \
--cc=randy.dunlap@oracle.com \
--cc=safford@watson.ibm.com \
--cc=sailer@watson.ibm.com \
--cc=sds@tycho.nsa.gov \
--cc=serue@linux.vnet.ibm.com \
--cc=serue@us.ibm.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.vnet.ibm.com \
--cc=zohar@us.ibm.com \
/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