[patch 02/41] Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6

2007-05-14 Thread npiggin
From: Andrew Morton [EMAIL PROTECTED] This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. Cc: Linux Memory Management [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Nick

[patch 00/41] Buffered write deadlock fix and new aops for 2.6.21-mm2

2007-05-14 Thread npiggin
-- Here is an update against 2.6.21-mm2. Unfortunately UML broke for me, so test coverage isn't so good as the last time I posted the series. Also, several filesystems had significant clashes. Considering the amount of time it took to get them working, I won't fix them again. They aren't _broken_

[patch 05/41] mm: debug write deadlocks

2007-05-14 Thread npiggin
Allow CONFIG_DEBUG_VM to switch off the prefaulting logic, to simulate the difficult race where the page may be unmapped before calling copy_from_user. Makes the race much easier to hit. This is useful for demonstration and testing purposes, but is removed in a subsequent patch. Cc: Linux

[patch 03/41] Revert 6527c2bdf1f833cc18e8f42bd97973d583e4aa83

2007-05-14 Thread npiggin
From: Andrew Morton [EMAIL PROTECTED] This patch fixed the following bug: When prefaulting in the pages in generic_file_buffered_write(), we only faulted in the pages for the firts segment of the iovec. If the second of successive segment described a mmapping of the page into which we're

[patch 04/41] mm: clean up buffered write code

2007-05-14 Thread npiggin
From: Andrew Morton [EMAIL PROTECTED] Rename some variables and fix some types. Cc: Linux Memory Management [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Nick Piggin [EMAIL PROTECTED] mm/filemap.c | 35

[patch 11/41] fs: fix data-loss on error

2007-05-14 Thread npiggin
New buffers against uptodate pages are simply be marked uptodate, while the buffer_new bit remains set. This causes error-case code to zero out parts of those buffers because it thinks they contain stale data: wrong, they are actually uptodate so this is a data loss situation. Fix this by

[patch 07/41] mm: buffered write cleanup

2007-05-14 Thread npiggin
Quite a bit of code is used in maintaining these cached pages that are probably pretty unlikely to get used. It would require a narrow race where the page is inserted concurrently while this process is allocating a page in order to create the spare page. Then a multi-page write into an uncached

[patch 09/41] mm: fix pagecache write deadlocks

2007-05-14 Thread npiggin
Modify the core write() code so that it won't take a pagefault while holding a lock on the pagecache page. There are a number of different deadlocks possible if we try to do such a thing: 1. generic_buffered_write 2. lock_page 3.prepare_write 4. unlock_page+vmtruncate 5.

[patch 20/41] xfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/xfs/linux-2.6/xfs_aops.c | 19 --- fs/xfs/linux-2.6/xfs_lrw.c | 35 --- 2 files changed, 24 insertions(+), 30

[patch 14/41] implement simple fs aops

2007-05-14 Thread npiggin
Implement new aops for some of the simpler filesystems. Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/configfs/inode.c |4 ++-- fs/hugetlbfs/inode.c | 16 ++-- fs/ramfs/file-mmu.c |4 ++-- fs/ramfs/file-nommu.c |

[patch 26/41] hpfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/hpfs/file.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Index: linux-2.6/fs/hpfs/file.c

[patch 17/41] ext2 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/ext2/dir.c | 47 +-- fs/ext2/ext2.h |3 +++ fs/ext2/inode.c | 24 +--- 3 files changed, 45

[patch 19/41] ext4 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Convert ext4 to use write_begin()/write_end() methods. Signed-off-by: Badari Pulavarty [EMAIL PROTECTED] fs/ext4/inode.c | 147 +++- 1 file changed, 93 insertions(+),

[patch 18/41] ext3 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] Various fixes and improvements Signed-off-by: Badari Pulavarty [EMAIL PROTECTED] fs/ext3/inode.c | 136 1 file

[patch 16/41] rd convert to new aops.

2007-05-14 Thread npiggin
Also clean up various little things. I've got rid of the comment from akpm, because now that make_page_uptodate is only called from 2 places, it is pretty easy to see that the buffers are in an uptodate state at the time of the call. Actually, it was OK before my patch as well, because the memset

[patch 08/41] mm: write iovec cleanup

2007-05-14 Thread npiggin
Hide some of the open-coded nr_segs tests into the iovec helpers. This is all to simplify generic_file_buffered_write, because that gets more complex in the next patch. Cc: Linux Memory Management [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin

[patch 10/41] mm: buffered write iterator

2007-05-14 Thread npiggin
Add an iterator data structure to operate over an iovec. Add usercopy operators needed by generic_file_buffered_write, and convert that function over. Cc: Linux Memory Management [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED]

[patch 32/41] smb convert to new aops.

2007-05-14 Thread npiggin
Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/smbfs/file.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) Index: linux-2.6/fs/smbfs/file.c

[patch 33/41] GFS2 convert to new aops.

2007-05-14 Thread npiggin
From: Steven Whitehouse [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Steven Whitehouse [EMAIL PROTECTED] fs/gfs2/ops_address.c | 209 +- 1 file changed, 125 insertions(+), 84 deletions(-) Index:

[patch 37/41] ufs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/ufs/dir.c | 50 +++--- fs/ufs/inode.c | 23 +++ 2 files changed, 50 insertions(+), 23 deletions(-)

[patch 40/41] minix convert to new aops.

2007-05-14 Thread npiggin
Cc: Andries Brouwer [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/minix/dir.c | 43 +-- fs/minix/inode.c | 23 +++ 2 files changed, 44 insertions(+), 22

[patch 28/41] qnx4 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/qnx4/inode.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) Index: linux-2.6/fs/qnx4/inode.c

[patch 35/41] hostfs convert to new aops.

2007-05-14 Thread npiggin
This also gets rid of a lot of useless read_file stuff. And also optimises the full page write case by marking a !uptodate page uptodate. Cc: Jeff Dike [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/hostfs/hostfs_kern.c |

[patch 22/41] fat convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/fat/inode.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) Index: linux-2.6/fs/fat/inode.c

[patch 21/41] fs: new cont helpers

2007-05-14 Thread npiggin
Rework the generic block cont routines to handle the new aops. Supporting cont_prepare_write would take quite a lot of code to support, so remove it instead (and we later convert all filesystems to use it). write_begin gets passed AOP_FLAG_CONT_EXPAND when called from generic_cont_expand, so

[patch 25/41] hfsplus convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/hfsplus/extents.c | 21 + fs/hfsplus/inode.c | 20 2 files changed, 21 insertions(+), 20 deletions(-) Index:

[patch 24/41] hfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/hfs/extent.c | 19 --- fs/hfs/inode.c | 20 2 files changed, 20 insertions(+), 19 deletions(-) Index: linux-2.6/fs/hfs/inode.c

[patch 39/41] sysv convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/sysv/dir.c | 45 + fs/sysv/itree.c | 23 +++ 2 files changed, 44 insertions(+), 24 deletions(-) Index:

[patch 23/41] adfs convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/adfs/inode.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) Index: linux-2.6/fs/adfs/inode.c

[patch 36/41] jffs2 convert to new aops.

2007-05-14 Thread npiggin
Cc: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Cc: Linux Filesystems linux-fsdevel@vger.kernel.org Signed-off-by: Nick Piggin [EMAIL PROTECTED] fs/jffs2/file.c | 105 +++- 1 file changed, 66 insertions(+), 39 deletions(-) Index:

[RFC][PATCH 1/14] Add union mount documentation

2007-05-14 Thread Bharata B Rao
From: Bharata B Rao [EMAIL PROTECTED] Subject: Add union mount documentation. This is an attempt to document some of the implementation details and issues of union mount. Signed-off-by: Bharata B Rao [EMAIL PROTECTED] Signed-off-by: Jan Blunck [EMAIL PROTECTED] ---

[RFC][PATCH 2/14] Add a new mount flag (MNT_UNION) for union mount

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Add a new mount flag (MNT_UNION) for union mount. Introduce MNT_UNION, MS_UNION and FS_WHT flags. There are the necessary flags for doing mount /dev/hda3 /mnt -o union You need additional patches for util-linux for that to work. Signed-off-by:

[RFC][PATCH 3/14] Add the whiteout file type

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Add the whiteout file type A white-out stops the VFS from further lookups of the white-outs name and returns -ENOENT. This is the same behaviour as if the filename isn't found. This can be used in combination with union mounts to virtually delete

[RFC][PATCH 4/14] Add config options for union mount

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Add config options for union mount Introduces two new config options for union mount: CONFIG_UNION_MOUNT - Enables union mount CONFIG_UNION_MOUNT_DEBUG - Enables debugging support for union mount. Also adds debugging routines. FIXME: this needs some

[RFC][PATCH 5/14] Introduce union stack

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Introduce union stack. Adds union stack infrastructure to the dentry structure and provides locking routines to walk the union stack. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- fs/Makefile

[RFC][PATCH 7/14] Union-mount mounting

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Union-mount mounting Adds union mount support to mount() and umount() system calls. Sets up the union stack during mount and destroys it during unmount. TODO: bind and move mounts aren't yet supported with union mounts. Signed-off-by: Jan Blunck

[RFC][PATCH 8/14] Union-mount lookup

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: Union-mount lookup Modifies the vfs lookup routines to work with union mounted directories. The existing lookup routines generally lookup for a pathname only in the topmost or given directory. The changed versions of the lookup routines search for the

[RFC][PATCH 9/14] Union-mount readdir

2007-05-14 Thread Bharata B Rao
From: Bharata B Rao [EMAIL PROTECTED] Subject: Union mount readdir This modifies the readdir()/getdents() routines to read directory entries from toplevel and the lower directories of a union and present a merged view. The directory entries are read starting from the top layer and they are

[RFC][PATCH 10/14] In-kernel file copy between union mounted filesystems

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: In-kernel file copy between union mounted filesystems This patch introduces in-kernel file copy between union mounted filesystems. When a file is opened for writing but resides on a lower (thus read-only) layer of the union stack it is copied to the

[RFC][PATCH 11/14] VFS whiteout handling

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: VFS whiteout handling Introduce white-out handling in the VFS. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- fs/inode.c| 17 + fs/namei.c| 476

[RFC][PATCH 12/14] ext2 whiteout support

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: ext2 whiteout support Introduce whiteout support to ext2. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- fs/ext2/dir.c |2 ++ fs/ext2/namei.c | 17 +

[RFC][PATCH 13/14] ext3 whiteout support

2007-05-14 Thread Bharata B Rao
From: Bharata B Rao [EMAIL PROTECTED] Subject: ext3 whiteout support Introduce whiteout support for ext3. Signed-off-by: Bharata B Rao [EMAIL PROTECTED] Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/ext3/dir.c |2 - fs/ext3/namei.c | 62

[RFC][PATCH 14/14] tmpfs whiteout support

2007-05-14 Thread Bharata B Rao
From: Jan Blunck [EMAIL PROTECTED] Subject: tmpfs whiteout support Introduce whiteout support to tmpfs. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- mm/shmem.c |9 - 1 files changed, 8 insertions(+), 1 deletion(-) --- a/mm/shmem.c

Re: [RFC][PATCH 9/14] Union-mount readdir

2007-05-14 Thread Carsten Otte
On 5/14/07, Bharata B Rao [EMAIL PROTECTED] wrote: +/* This is a copy from fs/readdir.c */ +struct getdents_callback { + struct linux_dirent __user *current_dir; + struct linux_dirent __user *previous; + int count; + int error; +}; This should go into a header file.

Re: [RFC][PATCH 9/14] Union-mount readdir

2007-05-14 Thread Bharata B Rao
On Mon, May 14, 2007 at 12:43:43PM +0200, Carsten Otte wrote: On 5/14/07, Bharata B Rao [EMAIL PROTECTED] wrote: +/* This is a copy from fs/readdir.c */ +struct getdents_callback { + struct linux_dirent __user *current_dir; + struct linux_dirent __user *previous; + int

[AppArmor 45/45] Fix file_permission()

2007-05-14 Thread jjohansen
We cannot easily switch from file_permission() to vfs_permission() everywhere, so fix file_permission() to not use a NULL nameidata for the remaining users. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- fs/namei.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) ---

[AppArmor 24/45] Pass struct vfsmount to the inode_getxattr LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/xattr.c |2 +- include/linux/security.h | 13 -

[AppArmor 42/45] AppArmor: add lock subtyping so lockdep does not report false dependencies

2007-05-14 Thread jjohansen
AppArmor uses lock subtyping to avoid false positives from lockdep. The profile lock is often taken nested, but it is guaranteed to be in a lock safe order and not the same lock when done, so it is safe. A third lock type (aa_lock_task_release) is given to the profile lock when it is taken in

[RFD Patch 3/4] Dont use a NULL nameidata in xattr_permission()

2007-05-14 Thread jjohansen
Create nameidata2 struct xattr_permission so that it does not pass NULL to permission. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- fs/xattr.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) --- a/fs/xattr.c +++ b/fs/xattr.c @@ -25,8 +25,16 @@ *

[AppArmor 32/45] Enable LSM hooks to distinguish operations on file descriptors from operations on pathnames

2007-05-14 Thread jjohansen
Struct iattr already contains ia_file since commit cc4e69de from Miklos (which is related to commit befc649c). Use this to pass struct file down the setattr hooks. This allows LSMs to distinguish operations on file descriptors from operations on paths. Signed-off-by: Andreas Gruenbacher [EMAIL

[AppArmor 06/45] Pass struct vfsmount to the inode_mkdir LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |2 +- include/linux/security.h |8 ++--

[AppArmor 20/45] Pass struct vfsmount to the inode_rename LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |6 -- include/linux/security.h | 18

[AppArmor 14/45] Add a struct vfsmount parameter to vfs_rmdir()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/ecryptfs/inode.c |4 +++- fs/namei.c|

[AppArmor 22/45] Pass struct vfsmount to the inode_setxattr LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/xattr.c |4 ++-- include/linux/security.h | 40

[AppArmor 19/45] Add struct vfsmount parameters to vfs_rename()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/ecryptfs/inode.c |7 ++- fs/namei.c | 19

[RFD Patch 0/4] AppArmor - Don't pass NULL nameidata to vfs_create/lookup/permission IOPs

2007-05-14 Thread jjohansen
lkml-explanatory.txt -- - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[AppArmor 16/45] Call lsm hook before unhashing dentry in vfs_rmdir()

2007-05-14 Thread jjohansen
If we unhash the dentry before calling the security_inode_rmdir hook, we cannot compute the file's pathname in the hook anymore. AppArmor needs to know the filename in order to decide whether a file may be deleted, though. Signed-off-by: John Johansen [EMAIL PROTECTED] Signed-off-by: Andreas

[AppArmor 30/45] Make d_path() consistent across mount operations

2007-05-14 Thread jjohansen
The path that __d_path() computes can become slightly inconsistent when it races with mount operations: it grabs the vfsmount_lock when traversing mount points but immediately drops it again, only to re-grab it when it reaches the next mount point. The result is that the filename computed is not

[AppArmor 05/45] Add struct vfsmount parameter to vfs_mkdir()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/ecryptfs/inode.c |5 - fs/namei.c|

[AppArmor 15/45] Pass struct vfsmount to the inode_rmdir LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |2 +- include/linux/security.h | 12

[AppArmor 01/45] Pass struct vfsmount to the inode_create LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |2 +- include/linux/security.h |9 ++---

[AppArmor 33/45] Pass struct file down the inode_*xattr security LSM hooks

2007-05-14 Thread jjohansen
This allows LSMs to also distinguish between file descriptor and path access for the xattr operations. (The other relevant operations are covered by the setattr hook.) Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/xattr.c

[AppArmor 00/45] AppArmor security module overview

2007-05-14 Thread jjohansen
lkml-explanatory.txt -- - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching

2007-05-14 Thread jjohansen
Pathname matching, transition table loading, profile loading and manipulation. Signed-off-by: John Johansen [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- security/apparmor/match.c| 232 security/apparmor/match.h| 83

[AppArmor 29/45] Fix __d_path() for lazy unmounts and make it unambiguous

2007-05-14 Thread jjohansen
First, when __d_path() hits a lazily unmounted mount point, it tries to prepend the name of the lazily unmounted dentry to the path name. It gets this wrong, and also overwrites the slash that separates the name from the following pathname component. This patch fixes that; if a process was in

[AppArmor 02/45] Pass struct path down to remove_suid and children

2007-05-14 Thread jjohansen
Required by a later patch that adds a struct vfsmount parameter to notify_change(). Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/ntfs/file.c |2 +- fs/reiserfs/file.c

[RFD Patch 2/4] Never pass a NULL nameidata to vfs_create()

2007-05-14 Thread jjohansen
Create a nameidata2 struct in nfsd and mqueue so that vfs_create does need to conditionally pass the vfsmnt. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- fs/namei.c|2 +- fs/nfsd/vfs.c | 42 +- ipc/mqueue.c |7 ++- 3 files

[AppArmor 34/45] Factor out sysctl pathname code

2007-05-14 Thread jjohansen
Convert the selinux sysctl pathname computation code into a standalone function. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- include/linux/sysctl.h |2 ++ kernel/sysctl.c | 27 +++

[AppArmor 23/45] Add a struct vfsmount parameter to vfs_getxattr()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/nfsd/nfs4xdr.c |2 +- fs/nfsd/vfs.c

[AppArmor 28/45] Pass struct vfsmount to the inode_removexattr LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/xattr.c |2 +- include/linux/security.h | 15 +--

[AppArmor 25/45] Add a struct vfsmount parameter to vfs_listxattr()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/xattr.c| 25 ++---

[AppArmor 38/45] AppArmor: Module and LSM hooks

2007-05-14 Thread jjohansen
Module parameters, LSM hooks, initialization and teardown. Signed-off-by: John Johansen [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Index: b/security/apparmor/lsm.c === --- /dev/null +++

[AppArmor 40/45] AppArmor: all the rest

2007-05-14 Thread jjohansen
All the things that didn't nicely fit in a category on their own: kbuild code, declararions and inline functions, /sys/kernel/security/apparmor filesystem for controlling apparmor from user space, profile list functions, locking documentation, /proc/$pid/task/$tid/attr/current access.

[AppArmor 03/45] Add a vfsmount parameter to notify_change()

2007-05-14 Thread jjohansen
The vfsmount parameter must be set appropriately for files visibile outside the kernel. Files that are only used in a filesystem (e.g., reiserfs xattr files) will have a NULL vfsmount. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by:

[AppArmor 44/45] Switch to vfs_permission() in sys_fchdir()

2007-05-14 Thread jjohansen
Switch from file_permission() to vfs_permission() in sys_fchdir(): this avoids calling permission() with a NULL nameidata here. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- fs/open.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) --- a/fs/open.c +++

[AppArmor 37/45] AppArmor: Main Part

2007-05-14 Thread jjohansen
The underlying functions by which the AppArmor LSM hooks are implemented. Signed-off-by: John Johansen [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Index: b/security/apparmor/main.c === --- /dev/null +++

[AppArmor 36/45] Export audit subsystem for use by modules

2007-05-14 Thread jjohansen
Adds necessary export symbols for audit subsystem routines. Changes audit_log_vformat to be externally visible (analagous to vprintf) Patch is not in mainline -- pending AppArmor code submission to lkml Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL

[AppArmor 17/45] Add a struct vfsmount parameter to vfs_unlink()

2007-05-14 Thread jjohansen
The vfsmount will be passed down to the LSM hook so that LSMs can compute pathnames. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/ecryptfs/inode.c |3 ++- fs/namei.c|4

[AppArmor 13/45] Pass the struct vfsmounts to the inode_link LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |3 ++- include/linux/security.h | 18 +-

[AppArmor 43/45] Switch to vfs_permission() in do_path_lookup()

2007-05-14 Thread jjohansen
Switch from file_permission() to vfs_permission() in do_path_lookup(): this avoids calling permission() with a NULL nameidata here. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] --- fs/namei.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) --- a/fs/namei.c +++

[AppArmor 08/45] Pass struct vfsmount to the inode_mknod LSM hook

2007-05-14 Thread jjohansen
This is needed for computing pathnames in the AppArmor LSM. Signed-off-by: Tony Jones [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: John Johansen [EMAIL PROTECTED] --- fs/namei.c |2 +- include/linux/security.h |7 +--

[PATCH] AF_RXRPC: AF_RXRPC depends on IPv4

2007-05-14 Thread David Howells
Add a dependency for CONFIG_AF_RXRPC on CONFIG_INET. This fixes this error: net/built-in.o: In function `rxrpc_get_peer': (.text+0x42824): undefined reference to `ip_route_output_key' Signed-off-by: David Howells [EMAIL PROTECTED] --- net/rxrpc/Kconfig |2 +- 1 files changed, 1

[PATCH] AF_RXRPC: Make call state names available if CONFIG_PROC_FS=n

2007-05-14 Thread David Howells
Make the call state names array available even if CONFIG_PROC_FS is disabled as it's used in other places (such as debugging statements) too. Signed-off-by: David Howells [EMAIL PROTECTED] --- net/rxrpc/ar-call.c | 19 +++ net/rxrpc/ar-proc.c | 19 --- 2

[PATCH 0/5][TAKE2] fallocate system call

2007-05-14 Thread Amit K. Arora
This is the new set of patches which take care of the review comments received from the community (mainly from Andrew). Description: --- fallocate() is a new system call being proposed here which will allow applications to preallocate space to any file(s) in a file system. Each file

Re: [PATCH 4/5] ext4: fallocate support in ext4

2007-05-14 Thread Jan Kara
On Mon, 7 May 2007 05:37:54 -0600 Does the proposed implementation handle quotas correctly, btw? Has that been tested? It seems to handle quotas fine - the block allocation itself does not differ from the usual case, just the extents in the tree are marked as uninitialized... The only

Re: [AppArmor 00/45] AppArmor security module overview

2007-05-14 Thread John Johansen
and with the actual introductory text this time This post contains patches to include the AppArmor application security framework, with request for inclusion. It contains fixes for almost all of the feedback received from the previous post. A second follow up posting will address passing NULL

Re: [RFD Patch 0/4] AppArmor - Don't pass NULL nameidata to vfs_create/lookup/permission IOPs

2007-05-14 Thread John Johansen
sigh, and with the intoductory text attached This post is a request for discussion on creating a second minimal nameidata struct to eliminate conditionally passing of vfsmounts to the LSM. It contains a series of patches that apply on top of the AppArmor patch series. A previous version of

[PATCH 1/5][TAKE2] fallocate() implementation on i86, x86_64 and powerpc

2007-05-14 Thread Amit K. Arora
This patch implements sys_fallocate() and adds support on i386, x86_64 and powerpc platforms. Changelog: - Following changes were made to the previous version: 1) Added description before sys_fallocate() definition. 2) Return EINVAL for len=0 (With new draft that Ulrich pointed to,

[PATCH 2/5][TAKE2] fallocate() on s390

2007-05-14 Thread Amit K. Arora
This is the patch suggested by Martin Schwidefsky. Here are the comments and patch from him. - From: Martin Schwidefsky [EMAIL PROTECTED] This patch implements support of fallocate system call on s390(x) platform. A wrapper is added to address the issue which s390 ABI has with the

[PATCH 3/5][TAKE2] ext4: Extent overlap bugfix

2007-05-14 Thread Amit K. Arora
This patch adds a check for overlap of extents and cuts short the new extent to be inserted, if there is a chance of overlap. Changelog: - As suggested by Andrew, a check for wrap though zero has been added. Here is the new patch: Signed-off-by: Amit Arora [EMAIL PROTECTED] ---

[PATCH 4/5][TAKE2] ext4: fallocate support in ext4

2007-05-14 Thread Amit K. Arora
This patch implements -fallocate() inode operation in ext4. With this patch users of ext4 file systems will be able to use fallocate() system call for persistent preallocation. Current implementation only supports preallocation for regular files (directories not supported as of date) with extent

[PATCH 5/5][TAKE2] ext4: write support for preallocated blocks

2007-05-14 Thread Amit K. Arora
This patch adds write support to the uninitialized extents that get created when a preallocation is done using fallocate(). It takes care of splitting the extents into multiple (upto three) extents and merging the new split extents with neighbouring ones, if possible. Changelog: - 1)

Re: [RFC][PATCH 14/14] tmpfs whiteout support

2007-05-14 Thread Hugh Dickins
On Mon, 14 May 2007, Bharata B Rao wrote: From: Jan Blunck [EMAIL PROTECTED] Subject: tmpfs whiteout support Introduce whiteout support to tmpfs. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- mm/shmem.c |9 - 1 files

Re: [PATCH 2/2] file capabilities: accomodate 32 bit capabilities

2007-05-14 Thread Serge E. Hallyn
Quoting Suparna Bhattacharya ([EMAIL PROTECTED]): On Thu, May 10, 2007 at 01:01:27PM -0700, Andreas Dilger wrote: On May 08, 2007 16:49 -0500, Serge E. Hallyn wrote: Quoting Andreas Dilger ([EMAIL PROTECTED]): One of the important use cases I can see today is the ability to split

Re: [2.6.21] circular locking dependency found in QUOTA OFF

2007-05-14 Thread Michal Piotrowski
[adding Jan and fsdevel to CC] Hi Folkert, On 14/05/07, Folkert van Heusden [EMAIL PROTECTED] wrote: Hi, When I cleanly reboot my pc running 2.6.21 on a P4 with HT and 2GB of ram and system on an 1-filesystem IDE disk, I get the following circular locking dependency error: [330961.226405]

Re: [2.6.21] circular locking dependency found in QUOTA OFF

2007-05-14 Thread Folkert van Heusden
[adding Jan and fsdevel to CC] Hi Folkert, When I cleanly reboot my pc running 2.6.21 on a P4 with HT and 2GB of ram and system on an 1-filesystem IDE disk, I get the following circular locking dependency error: [330961.226405] ===

Re: [patch 02/41] Revert 81b0c8713385ce1b1b9058e916edcf9561ad76d6

2007-05-14 Thread Dave Jones
On Mon, May 14, 2007 at 04:06:21PM +1000, [EMAIL PROTECTED] wrote: This was a bugfix against 6527c2bdf1f833cc18e8f42bd97973d583e4aa83, which we also revert. changes like this play havoc with git-bisect. If you must revert stuff before patching new code in, revert it all in a single diff.

Re: [RFC][PATCH 14/14] tmpfs whiteout support

2007-05-14 Thread Jan Blunck
On 5/14/07, Hugh Dickins [EMAIL PROTECTED] wrote: On Mon, 14 May 2007, Bharata B Rao wrote: From: Jan Blunck [EMAIL PROTECTED] Subject: tmpfs whiteout support Introduce whiteout support to tmpfs. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED]

Re: [RFC][PATCH 14/14] tmpfs whiteout support

2007-05-14 Thread Hugh Dickins
On Mon, 14 May 2007, Jan Blunck wrote: On 5/14/07, Hugh Dickins [EMAIL PROTECTED] wrote: /* Pretend that each entry is of this size in directory's i_size */ -#define BOGO_DIRENT_SIZE 20 +#define BOGO_DIRENT_SIZE 1 Why would that change be needed for whiteout support? Good

Re: [PATCH 0/2] file capabilities: Introduction

2007-05-14 Thread Pavel Machek
Hi! Serge E. Hallyn [EMAIL PROTECTED] wrote: Following are two patches which have been sitting for some time in -mm. Where some time == nearly six months. We need help considering, reviewing and testing this code, please. I did quick scan, and it looks ok. Plus, it means we can

  1   2   >