[PATCH 13/28] CacheFiles: Add missing copy_page export for ia64 [try #2]

2007-12-05 Thread David Howells
This one-line patch fixes the missing export of copy_page introduced by the cachefile patches. This patch is not yet upstream, but is required for cachefile on ia64. It will be pushed upstream when cachefile goes upstream. Signed-off-by: Prarit Bhargava [EMAIL PROTECTED] Signed-off-by: David

[PATCH 21/28] NFS: Display local caching state [try #2]

2007-12-05 Thread David Howells
Display the local caching state in /proc/fs/nfsfs/volumes. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/nfs/client.c |7 --- fs/nfs/fscache.h | 15 +++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index be38c3c

[PATCH 20/28] NFS: Configuration and mount option changes to enable local caching on NFS [try #2]

2007-12-05 Thread David Howells
Changes to the kernel configuration defintions and to the NFS mount options to allow the local caching support added by the previous patch to be enabled. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/Kconfig|8 fs/nfs/client.c |2 ++ fs/nfs/internal.h |1

[PATCH 19/28] NFS: Use local caching [try #2]

2007-12-05 Thread David Howells
an NFS filesystem to use caching, add an fsc option to the mount: mount warthog:/ /a -o fsc Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/nfs/Makefile |1 fs/nfs/client.c |5 + fs/nfs/file.c | 37 fs/nfs/fscache-def.c | 289

[PATCH 16/28] CacheFiles: Permit the page lock state to be monitored [try #2]

2007-12-05 Thread David Howells
-off-by: David Howells [EMAIL PROTECTED] --- include/linux/pagemap.h |5 + mm/filemap.c| 18 ++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 6a1b317..21c35e2 100644 --- a/include/linux

[PATCH 09/28] FS-Cache: Release page-private after failed readahead [try #2]

2007-12-05 Thread David Howells
) to do the honours. Signed-off-by: David Howells [EMAIL PROTECTED] --- mm/readahead.c | 39 +-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index c9c50ca..75aa6b6 100644 --- a/mm/readahead.c +++ b/mm/readahead.c

[PATCH 01/28] KEYS: Increase the payload size when instantiating a key [try #2]

2007-12-05 Thread David Howells
-off-by: David Howells [EMAIL PROTECTED] --- security/keys/keyctl.c | 38 ++ 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index d9ca15c..8ec8432 100644 --- a/security/keys/keyctl.c +++ b

[PATCH 05/28] Security: Change current-fs[ug]id to current_fs[ug]id() [try #2]

2007-12-05 Thread David Howells
Change current-fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be separated from the task_struct. Signed-off-by: David Howells [EMAIL PROTECTED] --- arch/ia64/kernel/perfmon.c|4 ++-- arch/powerpc/platforms/cell/spufs/inode.c |4 ++-- drivers/isdn/capi

[PATCH 0/7] Permit filesystem local caching

2007-12-05 Thread David Howells
These patches add local caching for network filesystems such as NFS and AFS. The patches can roughly be broken down into a number of sets: (*) 01-keys-inc-payload.diff (*) 02-keys-search-keyring.diff (*) 03-keys-callout-blob.diff Three patches to the keyring code made to help the

[PATCH 24/28] AFS: Add a function to excise a rejected write from the pagecache [try #2]

2007-12-05 Thread David Howells
routines once the pages have been unlocked as part of the writeback process. To this end, the PG_error flag is set, then the PG_writeback flag is cleared, and only *then* can lock_page() be called. Signed-off-by: David Howells [EMAIL PROTECTED] --- include/linux/mm.h |5 ++- mm/truncate.c

[PATCH 22/28] fcrypt endianness misannotations [try #2]

2007-12-05 Thread David Howells
Signed-off-by: Al Viro [EMAIL PROTECTED] --- crypto/fcrypt.c | 88 --- 1 files changed, 44 insertions(+), 44 deletions(-) diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c index d161949..a32cb68 100644 --- a/crypto/fcrypt.c +++

[PATCH 15/28] CacheFiles: Add a hook to write a single page of data to an inode [try #2]

2007-12-05 Thread David Howells
. Supply a generic implementation for this that uses the write_begin() and write_end() address_space operations to bind a copy directly into the page cache. Hook the Ext2 and Ext3 operations to the generic implementation. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/ext2/inode.c|2

[PATCH 1/7] KEYS: Increase the payload size when instantiating a key

2007-12-05 Thread David Howells
-off-by: David Howells [EMAIL PROTECTED] --- security/keys/keyctl.c | 38 ++ 1 files changed, 30 insertions(+), 8 deletions(-) diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index d9ca15c..8ec8432 100644 --- a/security/keys/keyctl.c +++ b

[PATCH 2/7] KEYS: Check starting keyring as part of search

2007-12-05 Thread David Howells
and 2) check whether that top-level keyring is the thing being searched for Signed-off-by: Kevin Coffman [EMAIL PROTECTED] Signed-off-by: David Howells [EMAIL PROTECTED] --- security/keys/keyring.c | 35 +++ 1 files changed, 31 insertions(+), 4 deletions(-) diff

[PATCH 11/28] FS-Cache: Provide an add_wait_queue_tail() function [try #2]

2007-12-05 Thread David Howells
Provide an add_wait_queue_tail() function to add a waiter to the back of a wait queue instead of the front. Signed-off-by: David Howells [EMAIL PROTECTED] --- include/linux/wait.h |2 ++ kernel/wait.c| 18 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff

[PATCH 10/28] FS-Cache: Recruit a couple of page flags for cache management [try #2]

2007-12-05 Thread David Howells
to detect this. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/splice.c|2 +- include/linux/page-flags.h | 38 -- include/linux/pagemap.h| 11 +++ mm/filemap.c | 16 mm/migrate.c

[PATCH 3/7] KEYS: Allow the callout data to be passed as a blob rather than a string

2007-12-05 Thread David Howells
() request_key_async() request_key_async_with_auxdata() Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/keys-request-key.txt | 11 +--- Documentation/keys.txt | 14 +++--- include/linux/key.h|9 --- security/keys/internal.h

[PATCH 5/7] Security: Change current-fs[ug]id to current_fs[ug]id()

2007-12-05 Thread David Howells
Change current-fs[ug]id to current_fs[ug]id() so that fsgid and fsuid can be separated from the task_struct. Signed-off-by: David Howells [EMAIL PROTECTED] --- arch/ia64/kernel/perfmon.c|4 ++-- arch/powerpc/platforms/cell/spufs/inode.c |4 ++-- drivers/isdn/capi

[PATCH 04/28] KEYS: Add keyctl function to get a security label [try #2]

2007-12-05 Thread David Howells
permission on the key for this function to be successful. Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/keys.txt | 21 +++ include/linux/keyctl.h |1 + include/linux/security.h | 20 +- security/dummy.c |8 ++ security/keys

[PATCH 25/28] AFS: Improve handling of a rejected writeback [try #2]

2007-12-05 Thread David Howells
be revalidated. (5) The writeback-rejection handler now calls cancel_rejected_write() added by the previous patch to excise the affected pages rather than clearing the PG_uptodate flag on all the pages. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/fsclient.c |4

[PATCH 26/28] AF_RXRPC: Save the operation ID for debugging [try #2]

2007-12-05 Thread David Howells
Save the operation ID to be used with a call that we're making for display through /proc/net/rxrpc_calls. This helps debugging stuck operations as we then know what they are. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/fsclient.c | 32 +++- fs

[PATCH 27/28] AFS: Implement shared-writable mmap [try #2]

2007-12-05 Thread David Howells
, then page_mkwrite() will flush it before attaching a record of the new key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/file.c | 20 +++- fs/afs/internal.h |1 + fs/afs/write.c| 35 +++ 3 files changed, 55 insertions(+), 1 deletions

Re: [PATCH 4/7] KEYS: Add keyctl function to get a security label

2007-12-05 Thread David Howells
Stephen Smalley [EMAIL PROTECTED] wrote: inode_getsecurity and getprocattr directly return the strings. Admittedly, the whole interface could be cleaned up and made far more consistent, but I don't think he necessarily has to go through the getsecid + secid_to_secctx sequence if he only wants

[PATCH 03/24] CRED: Alter security_task_getsecid() and similar to return both task SIDs

2007-09-26 Thread David Howells
this to be incorrect. It should probably use security_task_getsecid() instead. Signed-off-by: David Howells [EMAIL PROTECTED] --- drivers/usb/core/devio.c |4 ++-- include/linux/security.h | 18 +- include/linux/selinux.h | 15 ++- kernel/auditsc.c

[PATCH 02/24] CRED: Split the task security data and move part of it into struct cred

2007-09-26 Thread David Howells
-by: David Howells [EMAIL PROTECTED] --- include/linux/cred.h |1 include/linux/security.h | 33 ++ kernel/cred.c |7 + security/dummy.c | 11 + security/selinux/exports.c|6 security/selinux/hooks.c | 497

[PATCH 04/24] CRED: Move the effective capabilities into the cred struct

2007-09-26 Thread David Howells
by update_current_cred() which is invoked on entry to any system call that might need it. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/buffer.c |3 +++ fs/ioprio.c |3 +++ fs/open.c | 27 +-- fs/proc/array.c

[PATCH 06/24] CRED: Request a credential record for a kernel service

2007-09-26 Thread David Howells
Request a credential record for the named kernel service. This produces a cred struct with appropriate DAC and MAC controls for effecting that service. It may be used to override the credentials on a task to do work on that task's behalf. Signed-off-by: David Howells [EMAIL PROTECTED

[PATCH 07/24] FS-Cache: Release page-private after failed readahead

2007-09-26 Thread David Howells
) to do the honours. Signed-Off-By: David Howells [EMAIL PROTECTED] --- mm/readahead.c | 40 ++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 39bf45d..12d1378 100644 --- a/mm/readahead.c +++ b/mm/readahead.c

[PATCH 09/24] FS-Cache: Provide an add_wait_queue_tail() function

2007-09-26 Thread David Howells
Provide an add_wait_queue_tail() function to add a waiter to the back of a wait queue instead of the front. Signed-off-by: David Howells [EMAIL PROTECTED] --- include/linux/wait.h |1 + kernel/wait.c| 18 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff

[PATCH 11/24] CacheFiles: Add missing copy_page export for ia64

2007-09-26 Thread David Howells
This one-line patch fixes the missing export of copy_page introduced by the cachefile patches. This patch is not yet upstream, but is required for cachefile on ia64. It will be pushed upstream when cachefile goes upstream. Signed-off-by: Prarit Bhargava [EMAIL PROTECTED] Signed-Off-By: David

[PATCH 13/24] CacheFiles: Permit the page lock state to be monitored

2007-09-26 Thread David Howells
-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/pagemap.h |5 + mm/filemap.c| 19 +++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index d1049b6..452fdcf 100644 --- a/include/linux

[PATCH 14/24] CacheFiles: Export things for CacheFiles

2007-09-26 Thread David Howells
Export a number of functions for CacheFiles's use. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/super.c |2 ++ kernel/auditsc.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/super.c b/fs/super.c index 28e7370..0e8c0e2 100644 --- a/fs/super.c

[PATCH 17/24] NFS: Configuration and mount option changes to enable local caching on NFS

2007-09-26 Thread David Howells
Changes to the kernel configuration defintions and to the NFS mount options to allow the local caching support added by the previous patch to be enabled. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/Kconfig|8 fs/nfs/client.c | 14 ++ fs/nfs

[PATCH 16/24] NFS: Use local caching

2007-09-26 Thread David Howells
an NFS filesystem to use caching, add an fsc option to the mount: mount warthog:/ /a -o fsc Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/nfs/Makefile |1 fs/nfs/client.c |5 + fs/nfs/file.c | 51 ++ fs/nfs/fscache-def.c | 288

[PATCH 18/24] NFS: Display local caching state

2007-09-26 Thread David Howells
Display the local caching state in /proc/fs/nfsfs/volumes. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/nfs/client.c |7 --- fs/nfs/fscache.h | 12 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 0de4db4

[PATCH 20/24] AFS: Add a function to excise a rejected write from the pagecache

2007-09-26 Thread David Howells
routines once the pages have been unlocked as part of the writeback process. To this end, the PG_error flag is set, then the PG_writeback flag is cleared, and only *then* can lock_page() be called. Signed-off-by: David Howells [EMAIL PROTECTED] --- include/linux/mm.h |5 ++- mm/truncate.c

[PATCH 21/24] AFS: Improve handling of a rejected writeback

2007-09-26 Thread David Howells
be revalidated. (5) The writeback-rejection handler now calls cancel_rejected_write() added by the previous patch to excise the affected pages rather than clearing the PG_uptodate flag on all the pages. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/fsclient.c |4

[PATCH 24/24] FS-Cache: Make kAFS use FS-Cache

2007-09-26 Thread David Howells
The attached patch makes the kAFS filesystem in fs/afs/ use FS-Cache, and through it any attached caches. The kAFS filesystem will use caching automatically if it's available. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/Kconfig |8 + fs/afs/Makefile|3 fs/afs

[PATCH 22/24] AFS: Implement shared-writable mmap

2007-09-26 Thread David Howells
, then page_mkwrite() will flush it before attaching a record of the new key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/file.c | 20 +++- fs/afs/internal.h |1 + fs/afs/write.c| 35 +++ 3 files changed, 55 insertions(+), 1 deletions

Re: [PATCH 01/24] CRED: Introduce a COW credentials record

2007-09-26 Thread David Howells
Al Viro [EMAIL PROTECTED] wrote: Umm... Perhaps a better primitive would be make sure that our cred is not shared with anybody, creating a copy and redirecting reference to it if needed. I wanted to make the point that once a cred record was made live - i.e. exposed to the rest of the system

[PATCH 15/22] NFS: Configuration and mount option changes to enable local caching on NFS

2007-09-21 Thread David Howells
Changes to the kernel configuration defintions and to the NFS mount options to allow the local caching support added by the previous patch to be enabled. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/Kconfig|8 fs/nfs/client.c | 14 ++ fs/nfs

[PATCH 14/22] NFS: Use local caching

2007-09-21 Thread David Howells
an NFS filesystem to use caching, add an fsc option to the mount: mount warthog:/ /a -o fsc Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/nfs/Makefile |1 fs/nfs/client.c |5 + fs/nfs/file.c | 51 ++ fs/nfs/fscache-def.c | 288

[PATCH 10/22] CacheFiles: Add a hook to write a single page of data to an inode

2007-09-21 Thread David Howells
for this that uses the prepare_write() and commit_write() address_space operations to bound a copy directly into the page cache. Hook the Ext2 and Ext3 operations to the generic implementation. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/ext2/inode.c|2 + fs/ext3/inode.c|3

[PATCH 20/22] AFS: Implement shared-writable mmap

2007-09-21 Thread David Howells
, then page_mkwrite() will flush it before attaching a record of the new key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/file.c | 20 +++- fs/afs/internal.h |1 + fs/afs/write.c| 35 +++ 3 files changed, 55 insertions(+), 1 deletions

[PATCH 22/22] FS-Cache: Make kAFS use FS-Cache

2007-09-21 Thread David Howells
The attached patch makes the kAFS filesystem in fs/afs/ use FS-Cache, and through it any attached caches. The kAFS filesystem will use caching automatically if it's available. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/Kconfig |8 + fs/afs/Makefile|3 fs/afs

Re: [PATCH 00/22] Introduce credential record

2007-09-21 Thread David Howells
This patch set is available for download as a tarball from: http://people.redhat.com/~dhowells/nfs/nfs+fscache-23.tar.bz2 David - To unsubscribe from this list: send the line unsubscribe linux-security-module in the body of a message to [EMAIL PROTECTED] More majordomo info at

[PATCH 06/22] FS-Cache: Recruit a couple of page flags for cache management

2007-09-21 Thread David Howells
to detect this. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/splice.c|2 +- include/linux/page-flags.h | 30 +- include/linux/pagemap.h| 11 +++ mm/filemap.c | 16 mm/migrate.c

[PATCH 05/22] FS-Cache: Release page-private after failed readahead

2007-09-21 Thread David Howells
) to do the honours. Signed-Off-By: David Howells [EMAIL PROTECTED] --- mm/readahead.c | 40 ++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 39bf45d..12d1378 100644 --- a/mm/readahead.c +++ b/mm/readahead.c

[PATCH 02/22] CRED: Split the task security data and move part of it into struct cred

2007-09-21 Thread David Howells
-by: David Howells [EMAIL PROTECTED] --- include/linux/cred.h |1 include/linux/security.h | 33 ++ kernel/cred.c |7 + security/dummy.c | 11 + security/selinux/exports.c|6 security/selinux/hooks.c | 497

Re: [PATCH 10/22] CacheFiles: Add a hook to write a single page of data to an inode

2007-09-21 Thread David Howells
Trond Myklebust [EMAIL PROTECTED] wrote: So why do you need a new address space operation? AFAICS the generic implementation will work for pretty much everyone who supports the existing prepare_write()/commit_write(). Because Christoph decreed that I wasn't allowed to call prepare_write() and

Re: [PATCH 11/22] CacheFiles: Permit the page lock state to be monitored

2007-09-21 Thread David Howells
Trond Myklebust [EMAIL PROTECTED] wrote: This is used by CacheFiles to detect read completion on a page in the backing filesystem so that it can then copy the data to the waiting netfs page. Won't it in any case want to lock the page too? No. Why would it? All it wants to do is to

Re: [PATCH 14/22] NFS: Use local caching

2007-09-21 Thread David Howells
David Howells [EMAIL PROTECTED] wrote: Peter Staubach [EMAIL PROTECTED] wrote: Did I miss the section where the modified semantics about which mounted file systems can use the cache and which ones can not was implemented? Yes. fs/nfs/super.c: case Opt_sharecache

Re: [PATCH 3/3] CRED: Move the effective capabilities into the cred struct

2007-09-20 Thread David Howells
Andrew Morgan [EMAIL PROTECTED] wrote: OOC If we were to simply drop support for one process changing the capabilities of another, would we need this patch? Well, the patch could be less, but there's still the possibility of a kernel service wanting to override the capabilities mask. David -

[PATCH 2/3] CRED: Split the task security data and move part of it into struct cred

2007-09-19 Thread David Howells
-by: David Howells [EMAIL PROTECTED] --- include/linux/cred.h |1 include/linux/security.h | 34 +++ kernel/cred.c |7 + security/dummy.c | 11 + security/selinux/exports.c|6 security/selinux/hooks.c

[PATCH 0/3] Introduce credential record

2007-09-19 Thread David Howells
Hi Al, Christoph, Trond, Stephen, Casey, Here's a set of patches that implement a very basic set of COW credentials. It compiles, links and runs for x86_64 with EXT3, (V)FAT, NFS, AFS, SELinux and keyrings all enabled. Most other filesystems are disabled, apart from things like proc. It is

Re: [PATCH 2/3] CRED: Split the task security data and move part of it into struct cred

2007-09-19 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: Move into the cred struct the part of the task security data that defines how a task acts upon an object. The part that defines how something acts upon a task remains attached to the task. This seems to me to be an unnatural and inappropriate

Adding a security parameter to VFS functions

2007-08-15 Thread David Howells
Hi Linus, Al, Would you object greatly to functions like vfs_mkdir() gaining a security parameter? What I'm thinking of is this: int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode, struct security *security) Where the security context is the state

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-14 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: With Smack you can leave the label alone, raise CAP_MAC_OVERRIDE, do your business of setting the label correctly, and then drop the capability. No new hooks required. That sounds like a contradiction. How can you both leave it alone and set it?

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-13 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: I haven't looked into the issues at all and I bet there are plenty, maybe in audit and places outside of the security realm, but this looks like a clean approach from the LSM interface standpoint. Do you want the entire task or just task-security? It

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-13 Thread David Howells
Stephen Smalley [EMAIL PROTECTED] wrote: Seems like over-design - we don't need to support LSM stacking, and we don't need to support pushing/popping more than one level of context. It will, at some point hopefully, be possible for someone to try, say, NFS exporting a cached ISO9660 mount

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-13 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: (1) int security_get_context(void **_context); This allocates and gives the caller a blob that describes the current context of all the LSM module states attached to the current task and stores a pointer to it in *_context. Is

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-11 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: How would you expect an LSM that is not SELinux to interface with CacheFiles? You have to understand that I didn't know that much about the LSM interface, so I asked advice of the Red Hat security people, who, naturally, pointed me at the SELinux

Re: [PATCH 11/14] CacheFiles: Permit an inode's security ID to be obtained [try #2]

2007-08-10 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: Grumble. Yet another thing to undo in the near future. I still hope to suggest what I would consider a viable alternative soon. Use a struct key with the overrides attached? The key can be generated by SELinux or whatever module is there. David - To

<    1   2   3