login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
August
»
13
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Stephen Smalley
Subject:
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
Date: Monday, August 13, 2007 - 6:50 am
On Mon, 2007-08-13 at 11:54 +0100, David Howells wrote:
quoted text
> Casey Schaufler <casey@schaufler-ca.com> wrote: > > > Sigh. So it's not only SELinux specific, but RedHat specific as well. > > *Blink*. How did you come to that conclusion? > > > > (3) The cache driver wants to access the files in the cache, but it's > > > running in the security context of either the aforementioned random > > > process, or one of FS-Cache's thread pool. > > > > I think that this is the point you should attack. Control the security > > characteristics of the cache driver properly and you shouldn't need the > > complexity that you're asking to introduce. > > How? The cache driver acts on behalf of someone else. That someone else has > one security context, but the cache itself has to have a different context so > that the cache can be shared. > > Furthermore, the cache driver doesn't have a security context per se. > > > > This security context, however, doesn't necessarily give it the > > > rights to access what's in the cache, so the driver has to be > > > permitted to act as a context appropriate to accessing the cache, > > > without changing the overall security context of the random process > > > (which would impact things trying to act on that process - kill() > > > for example). > > > > Can you run the cache as an independent thread and send it messages > > rather than trying to do things in the context of the calling process? > > I know that that involves extra bookkeeppingg, but it's lots safer. > > It introduces more complexity, which I believe you were just arguing against > above... It also incurs more kernel threads - which I really really want to > avoid. > > I would rank the complexity and resource overhead of the act-as stuff in LSM > (or at least in SELinux) as much less than what you're suggesting. > > As it stands, the FS-Cache layer has a pool of threads that CacheFiles makes > use of, but this can't be bound to the security of a specific cache because > there may be more than one cache of more than one cache driver type. > > > Yes, and the SELinux semantics for what label to give a file don't > > help much, either. The problem with the "act_as" interfaces is that > > I wouldn't expect them to be any more reliable than the old access() > > system call, which never really gave you a helpful answer. > > I don't see how act_as compares to access(). > > > Ideally you want to be running in the right context to create the > > new file so that no one can use it and then label it "correctly" > > and make it available. > > That sounds like it'd be the complexity thing again... > > > > Part of the problem is that the VFS does not pass around the security > > > context as which the VFS routines act, but rather gets them from the > > > task_struct. > > > > That's by design. > > I suspect that's more by the fact that security wasn't particularly thought > about when these interfaces were first written. As with everything in the > kernel, it might be negotiable. > > > The cache driver is a unique case with an unusual function. It's pretty > > obvious that the kernel architecture, the VFS architecture, LSM, SELinux, > > NFS and pretty much everyone else has given no thought whatever to the > > implications of their designs on file system cacheing. For all concerned, > > I'll say "sorry 'bout that". > > Meaning you think I should just give up on this? > > How about I reduce the interface I'm proposing to two functions: > > (1) int security_act_as(struct task_struct *context) > > Temporarily make the current process act as the given task, including, > for example, for SELinux, the security ID with which this task acts on > things, and the security ID with which this task creates files.
I don't see how that helps with nfsd assuming the label of a remote client process.
quoted text
> > (2) int security_act_as_self(void); > > Restore the context as which we're asking. > > This would mean that the task's security context would have to be able to store > acting security IDs for everything, but I don't think that's too much of a > stretch resourcewise.
-- Stephen Smalley National Security Agency -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Fri Aug 10, 9:04 am)
[PATCH 01/16] FS-Cache: Release page->private after failed ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 02/16] FS-Cache: Recruit a couple of page flags for ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 03/16] FS-Cache: Provide an add_wait_queue_tail() f ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 04/16] FS-Cache: Generic filesystem caching facilit ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 05/16] CacheFiles: Add missing copy_page export for ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 06/16] CacheFiles: Add a hook to write a single pag ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 07/16] CacheFiles: Permit the page lock state to be ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 08/16] CacheFiles: Export things for CacheFiles [tr ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 09/16] CacheFiles: Permit a process's create SID to ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 10/16] CacheFiles: Add an act-as SID override in ta ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 11/16] CacheFiles: Permit an inode's security ID to ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 12/16] CacheFiles: Get the SID under which the Cach ...
, David Howells
, (Fri Aug 10, 9:05 am)
[PATCH 13/16] CacheFiles: A cache that backs onto a mounte ...
, David Howells
, (Fri Aug 10, 9:06 am)
[PATCH 14/16] NFS: Use local caching [try #3]
, David Howells
, (Fri Aug 10, 9:06 am)
[PATCH 15/16] NFS: Configuration and mount option changes ...
, David Howells
, (Fri Aug 10, 9:06 am)
[PATCH 16/16] NFS: Display local caching state [try #3]
, David Howells
, (Fri Aug 10, 9:06 am)
Re: [PATCH 09/16] CacheFiles: Permit a process's create SI ...
, Casey Schaufler
, (Fri Aug 10, 9:52 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Fri Aug 10, 3:13 pm)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Sat Aug 11, 1:41 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Sat Aug 11, 8:56 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Mon Aug 13, 3:54 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Stephen Smalley
, (Mon Aug 13, 6:01 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 6:46 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Stephen Smalley
, (Mon Aug 13, 6:50 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Mon Aug 13, 7:51 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Stephen Smalley
, (Mon Aug 13, 7:57 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 8:10 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Mon Aug 13, 8:22 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 8:42 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 9:20 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Mon Aug 13, 9:31 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 9:58 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Mon Aug 13, 12:52 pm)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Mon Aug 13, 2:44 pm)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Tue Aug 14, 2:39 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Tue Aug 14, 8:53 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Stephen Smalley
, (Tue Aug 14, 10:42 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Stephen Smalley
, (Tue Aug 14, 10:50 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, David Howells
, (Tue Aug 14, 10:58 am)
Re: [PATCH 00/16] Permit filesystem local caching [try #3]
, Casey Schaufler
, (Wed Aug 15, 9:30 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 16/36] driver core: cpu: fix section mismatch in cpu.c:store_online
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
git
:
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
Johan Herland
[PATCH 6/7] Softrefs: Administrivia associated with softrefs subsystem and git-sof...
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Conor
Re: RFID Reader
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Stuart Henderson
Re: SquidGuard problem
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Colocation donated by:
Syndicate