[PATCH 2/4] writeback: 3-queue based writeback schedule

2007-08-09 Thread Fengguang Wu
Properly manage the 3 queues of sb->s_dirty/s_io/s_more_io so that - time-ordering of dirtied_when can be easily maintained - writeback can continue from where previous run left out The majority work has been done by Andrew Morton and Ken Chen, this patch just clarifies the roles o

[PATCH 3/4] writeback: function renames and cleanups

2007-08-09 Thread Fengguang Wu
Two function renames: - rename redirty_tail() to queue_dirty_inode() - rename requeue_io() to queue_for_more_io() Also some code cleanups on fs-writeback.c. No behavior changes. Cc: Ken Chen <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Fengguang Wu <[EM

[PATCH 1/4] writeback: check time-ordering of s_io and s_more_io

2007-08-09 Thread Fengguang Wu
It helps catch bugs like this: [ 738.645689] fs/fs-writeback.c:535: s_dirty got screwed up [ 738.646114] 8100028532b0:4295082249 [ 738.646255] 810002856858:4295082259 [ 738.646388] 810002831b58:4295082667 [ 738.646520] 81000281b1b0:4295082671 [ 738.646651] 81000281d798:42

[PATCH 4/4] writeback: fix ntfs with sb_has_dirty_inodes()

2007-08-09 Thread Fengguang Wu
NTFS's if-condition on dirty inodes is not complete. Fix it with sb_has_dirty_inodes(). Cc: Anton Altaparmakov <[EMAIL PROTECTED]> Cc: Ken Chen <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Fengguang Wu <[EMAIL PROTECTED]> --- --- linux-2.6.23-rc1-mm2.orig/fs/ntfs/super.

[PATCH 0/4] [RFC][PATCH] fs-writeback: redefining the dirty inode queues

2007-08-09 Thread Fengguang Wu
Andrew, I'd like to propose a cleaner way of using the s_dirty, s_io, s_more_io queues for the writeback of dirty inodes. The basic idea is to clearly define the function of the queues, especially to decouple s_diry from s_io/s_more_io. The details are in the changelog of patch 2. The patches ar

Re: [RFC PATCH 1/4] pass open file to ->setattr()

2007-08-09 Thread Miklos Szeredi
> >> > This is needed to be able to correctly implement open-unlink-fsetattr > >> > semantics in some filesystem such as sshfs, without having to resort > >> > to "silly-renaming". > >> > >> How do you plan to do that? > > > > Easy: the SFTP protocol has stateful opens and defines an FSTAT call.

Re: JFFS2/mtdsuper modprobe "unknown symbol" in 2.6.23-rc1

2007-08-09 Thread Erez Zadok
In message <[EMAIL PROTECTED]>, Adrian Bunk writes: > On Thu, Aug 09, 2007 at 10:38:18PM -0400, Erez Zadok wrote: > > I'm getting an error modprobing jffs2 due to mtdsuper failing to insmod: > >... > > Does anyone know what am I missing? > > You miss that 2.6.23-rc2 with this bug fixed has already

Re: JFFS2/mtdsuper modprobe "unknown symbol" in 2.6.23-rc1

2007-08-09 Thread Adrian Bunk
On Thu, Aug 09, 2007 at 10:38:18PM -0400, Erez Zadok wrote: > I'm getting an error modprobing jffs2 due to mtdsuper failing to insmod: >... > Does anyone know what am I missing? You miss that 2.6.23-rc2 with this bug fixed has already been released. > Thanks, > Erez. cu Adrian -- "Is t

JFFS2/mtdsuper modprobe "unknown symbol" in 2.6.23-rc1

2007-08-09 Thread Erez Zadok
I'm getting an error modprobing jffs2 due to mtdsuper failing to insmod: # modprobe jffs2 WARNING: Error inserting mtdsuper (/lib/modules/2.6.23-rc1/kernel/drivers/mtd/mtdsuper.ko): Unknown symbol in module, or unknown parameter (see dmesg) FATAL: Error inserting jffs2 (/lib/modules/2.6.23-rc1/ker

Re: problems while mounting /boot partition

2007-08-09 Thread Jan Engelhardt
On Aug 8 2007 18:28, Michal Piotrowski wrote: > >Hi Brian, > >Brian J. Murrell pisze: >> I am using Ubuntu Gutsy, which is the in-development branch heading for >> their next stable release. > >You forgot about message subject, so no one has read this report. Actually, given the volume on LKML, a

Re: [PATCH V2] limit minixfs printks on corrupted dir i_size, CVE-2006-6058

2007-08-09 Thread Eric Sandeen
Bodo Eggert wrote: > Warning: I'm only looking at the patch. > > You are supposed to print an error message for a user, not to write in a > chat window to a 1337 script kiddie. OK, you just matched the current style, > and your patch is IMHO OK for a quick security fix, but: > > - Security fixes

Re: [RFC PATCH 1/4] pass open file to ->setattr()

2007-08-09 Thread Bodo Eggert
Miklos Szeredi <[EMAIL PROTECTED]> wrote: >> > This is needed to be able to correctly implement open-unlink-fsetattr >> > semantics in some filesystem such as sshfs, without having to resort >> > to "silly-renaming". >> >> How do you plan to do that? > > Easy: the SFTP protocol has stateful open

Re: [PATCH V2] limit minixfs printks on corrupted dir i_size, CVE-2006-6058

2007-08-09 Thread Bodo Eggert
Eric Sandeen <[EMAIL PROTECTED]> wrote: > This attempts to address CVE-2006-6058 > http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6058 > > first reported at http://projects.info-pull.com/mokb/MOKB-17-11-2006.html > > Essentially a corrupted minix dir inode reporting a very large > i_siz

[PATCH V2] limit minixfs printks on corrupted dir i_size, CVE-2006-6058

2007-08-09 Thread Eric Sandeen
Perhaps this is simpler, and preferable. Thanks to adilger for reminding me about printk_ratelimit. :) This attempts to address CVE-2006-6058 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6058 first reported at http://projects.info-pull.com/mokb/MOKB-17-11-2006.html Essentiall

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

2007-08-09 Thread Casey Schaufler
--- James Morris <[EMAIL PROTECTED]> wrote: > On Thu, 9 Aug 2007, David Howells wrote: > > > James Morris <[EMAIL PROTECTED]> wrote: > > > > > David, I've looked at the code and can't see that you need to access the > > > label itself outside the LSM. Could you instead simply pass the inode

Re: [RFC PATCH 4/4] VFS: allow filesystem to override mknod capability checks

2007-08-09 Thread Miklos Szeredi
> > From: Miklos Szeredi <[EMAIL PROTECTED]> > > > > Add a new filesystem flag, that results in the VFS not checking if the > > current process has enough privileges to do an mknod(). > > > > This is needed on filesystems, where an unprivileged user may be able > > to create a device node, withou

Re: [Patch 16/18] fs/Kconfig

2007-08-09 Thread Jörn Engel
On Thu, 9 August 2007 01:01:26 +0200, Arnd Bergmann wrote: > On Wednesday 08 August 2007, Jörn Engel wrote: > > +config LOGFS > > +   bool "Log Filesystem (EXPERIMENTAL)" > > +   depends on MTD && BLOCK && EXPERIMENTAL > > The dependency on MTD _and_ BLOCK looks correct for your code, but

Re: [Patch 02/18] include/linux/logfs.h

2007-08-09 Thread Jörn Engel
On Thu, 9 August 2007 00:56:29 +0200, Arnd Bergmann wrote: > On Wednesday 08 August 2007, Jörn Engel wrote: > > +++ linux-2.6.21logfs/include/linux/logfs.h 2007-08-08 > > 02:57:37.0 +0200 > > @@ -0,0 +1,500 @@ > > +/* > > + * fs/logfs/logfs.h > > + * > > The comment does not match the

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

2007-08-09 Thread James Morris
On Thu, 9 Aug 2007, David Howells wrote: > James Morris <[EMAIL PROTECTED]> wrote: > > > David, I've looked at the code and can't see that you need to access the > > label itself outside the LSM. Could you instead simply pass the inode > > pointer around? > > It's not quite that simple. I ne

Re: [RFC PATCH 4/4] VFS: allow filesystem to override mknod capability checks

2007-08-09 Thread Serge E. Hallyn
Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]): > From: Miklos Szeredi <[EMAIL PROTECTED]> > > Add a new filesystem flag, that results in the VFS not checking if the > current process has enough privileges to do an mknod(). > > This is needed on filesystems, where an unprivileged user may be able

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread Trond Myklebust
On Thu, 2007-08-09 at 19:52 +0100, David Howells wrote: > Trond Myklebust <[EMAIL PROTECTED]> wrote: > > > Dang, that's a lot of inlines... AFAICS, approx half of fs/nfs/fscache.h > > should really be moved into fscache.c. > > If you wish. It seems a shame since a lot of them have only one calle

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread David Howells
> > Instead, feel free to update the text-based mount interface (which can > > be found in 2.6.23-rc1 and later). I presume you're referring to nfs_mount_option_tokens[] and friends. Is there a mount program that can drive this? David - To unsubscribe from this list: send the line "unsubscribe

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

2007-08-09 Thread James Morris
On Thu, 9 Aug 2007, David Howells wrote: > + u32 (*inode_get_secid)(struct inode *inode); To maintain API consistency, please return an int which only acts as an error code, and returning the secid via a *u32 function parameter. - James -- James Morris <[EMAIL PROTECTED]> - To unsubscribe

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

2007-08-09 Thread David Howells
James Morris <[EMAIL PROTECTED]> wrote: > David, I've looked at the code and can't see that you need to access the > label itself outside the LSM. Could you instead simply pass the inode > pointer around? It's not quite that simple. I need to impose *two* security labels in cachefiles_begin_s

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread David Howells
Trond Myklebust <[EMAIL PROTECTED]> wrote: > Dang, that's a lot of inlines... AFAICS, approx half of fs/nfs/fscache.h > should really be moved into fscache.c. If you wish. It seems a shame since a lot of them have only one caller. > > + /* we can do this here as the bits are only set with the

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

2007-08-09 Thread James Morris
On Thu, 9 Aug 2007, Casey Schaufler wrote: > This is SELinux specific functionality. It should not be an LSM > interface. As long as the security labels are themselves not being exported to the kernel to be used e.g. for display or transport, then I agree, and we should avoid passing them arou

Re: [PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread Casey Schaufler
--- David Howells <[EMAIL PROTECTED]> wrote: > Casey Schaufler <[EMAIL PROTECTED]> wrote: > > > This is SELinux specific funtionality and should be done in the > > SELinux code. You should not be adding interfaces that are SELinux > > specific, in this case using secids instead of the LSM blob i

[PATCH] limit minixfs dir_pages on corrupted dir i_size, CVE-2006-6058

2007-08-09 Thread Eric Sandeen
This attempts to address CVE-2006-6058 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-6058 first reported at http://projects.info-pull.com/mokb/MOKB-17-11-2006.html Essentially a corrupted minix dir inode reporting a very large i_size will loop for a very long time in minix_readdir, mini

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

2007-08-09 Thread James Morris
On Thu, 9 Aug 2007, David Howells wrote: > James Morris <[EMAIL PROTECTED]> wrote: > > > > + u32 (*inode_get_secid)(struct inode *inode); > > > > To maintain API consistency, please return an int which only acts as an > > error code, and returning the secid via a *u32 function parameter. > > D

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread Trond Myklebust
Dang, that's a lot of inlines... AFAICS, approx half of fs/nfs/fscache.h should really be moved into fscache.c. Otherwise, this looks a lot less intrusive than previous patches. See inlined comments. On Thu, 2007-08-09 at 17:05 +0100, David Howells wrote: > The attached patch makes it possible f

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

2007-08-09 Thread David Howells
James Morris <[EMAIL PROTECTED]> wrote: > > + u32 (*inode_get_secid)(struct inode *inode); > > To maintain API consistency, please return an int which only acts as an > error code, and returning the secid via a *u32 function parameter. Does that apply to *all* the functions, irrespective of w

Re: [PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread David Howells
Casey Schaufler <[EMAIL PROTECTED]> wrote: > This is SELinux specific funtionality and should be done in the > SELinux code. You should not be adding interfaces that are SELinux > specific, in this case using secids instead of the LSM blob interfaces. Is using secids your only objection? Or are

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

2007-08-09 Thread David Howells
Casey Schaufler <[EMAIL PROTECTED]> wrote: > This is SELinux specific functionality. It should not be an LSM > interface. This is what I worked out in conjunction with the denizens of the SELinux mailing list. What would you have me do differently? Change things like: u32 (*act_as_sec

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

2007-08-09 Thread Casey Schaufler
--- Stephen Smalley <[EMAIL PROTECTED]> wrote: > On Thu, 2007-08-09 at 10:07 -0700, Casey Schaufler wrote: > > --- David Howells <[EMAIL PROTECTED]> wrote: > > > > > Permit an inode's security ID to be obtained by the CacheFiles module. > This > > > is > > > then used as the SID with which file

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

2007-08-09 Thread Stephen Smalley
On Thu, 2007-08-09 at 10:07 -0700, Casey Schaufler wrote: > --- David Howells <[EMAIL PROTECTED]> wrote: > > > Permit an inode's security ID to be obtained by the CacheFiles module. This > > is > > then used as the SID with which files and directories will be created in the > > cache. > > This i

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

2007-08-09 Thread Casey Schaufler
--- David Howells <[EMAIL PROTECTED]> wrote: > Permit an inode's security ID to be obtained by the CacheFiles module. This > is > then used as the SID with which files and directories will be created in the > cache. This is SELinux specific functionality. It should not be an LSM interface. Ca

Re: [PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread Casey Schaufler
--- David Howells <[EMAIL PROTECTED]> wrote: > Make it possible for a process's file creation SID to be temporarily > overridden > by CacheFiles so that files created in the cache have the right label > attached. > > Without this facility, files created in the cache will be given the current > f

[PATCH 10/14] CacheFiles: Add an act-as SID override in task_security_struct [try #2]

2007-08-09 Thread David Howells
Add an act-as SID to task_security_struct that is equivalent to fsuid/fsgid in task_struct. This permits a task to perform operations as if it is the overriding SID, without changing its own SID as that might be needed to control access to the process by ptrace, signals, /proc, etc. This is usefu

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

2007-08-09 Thread David Howells
Add an address space operation to write one single page of data to an inode at a page-aligned location (thus permitting the implementation to be highly optimised). This is used by CacheFiles to store the contents of netfs pages into their backing file pages. Supply a generic implementation for th

[PATCH 12/14] CacheFiles: Get the SID under which the CacheFiles module should operate [try #2]

2007-08-09 Thread David Howells
Get the SID under which the CacheFiles module should operate so that the SELinux security system can control the accesses it makes. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/security.h | 20 security/dummy.c |7 +++ security/selinux

[PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread David Howells
Make it possible for a process's file creation SID to be temporarily overridden by CacheFiles so that files created in the cache have the right label attached. Without this facility, files created in the cache will be given the current file creation SID of whatever process happens to have invoked

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

2007-08-09 Thread David Howells
Add a function to install a monitor on the page lock waitqueue for a particular page, thus allowing the page being unlocked to be detected. 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. Signed-

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

2007-08-09 Thread David Howells
Permit an inode's security ID to be obtained by the CacheFiles module. This is then used as the SID with which files and directories will be created in the cache. Signed-Off-By: David Howells <[EMAIL PROTECTED]> --- include/linux/security.h | 13 + security/dummy.c |6

[PATCH 08/14] CacheFiles: Export things for CacheFiles [try #2]

2007-08-09 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 fc8ebed..c0d99dd 100644 --- a/fs/super.c ++

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

2007-08-09 Thread David Howells
The attached patch makes it possible for the NFS filesystem to make use of the network filesystem local caching service (FS-Cache). To be able to use this, an updated mount program is required. This can be obtained from: http://people.redhat.com/steved/cachefs/util-linux/ To mount an NF

[PATCH 01/14] FS-Cache: Release page->private after failed readahead [try #2]

2007-08-09 Thread David Howells
The attached patch causes read_cache_pages() to release page-private data on a page for which add_to_page_cache() fails or the filler function fails. This permits pages with caching references associated with them to be cleaned up. The invalidatepage() address space op is called (indirectly) to do

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

2007-08-09 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 00/14] Permit filesystem local caching [try #2]

2007-08-09 Thread David Howells
These patches add local caching for network filesystems such as NFS and AFS. FS-Cache now runs fully asynchronously as required by Trond Myklebust for NFS. -- Changes: (*) The CacheFiles module no longer accepts directory fds in its cull and inuse commands from cachefilesd. Instead it u

[PATCH 05/14] CacheFiles: Add missing copy_page export for ia64 [try #2]

2007-08-09 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 H

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

2007-08-09 Thread David Howells
Recruit a couple of page flags to aid in cache management. The following extra flags are defined: (1) PG_fscache (PG_owner_priv_2) The marked page is backed by a local cache and is pinning resources in the cache driver. (2) PG_fscache_write (PG_owner_priv_3) The marked page is

Re: [RFC PATCH 1/4] pass open file to ->setattr()

2007-08-09 Thread Miklos Szeredi
> > This is needed to be able to correctly implement open-unlink-fsetattr > > semantics in some filesystem such as sshfs, without having to resort > > to "silly-renaming". > > How do you plan to do that? Easy: the SFTP protocol has stateful opens and defines an FSTAT call. Miklos - To unsubscrib

Re: [RFC PATCH 1/4] pass open file to ->setattr()

2007-08-09 Thread J. Bruce Fields
On Thu, Aug 09, 2007 at 05:27:45PM +0200, [EMAIL PROTECTED] wrote: > This is needed to be able to correctly implement open-unlink-fsetattr > semantics in some filesystem such as sshfs, without having to resort > to "silly-renaming". How do you plan to do that? --b. - To unsubscribe from this list

[RFC PATCH 2/4] pass open file to ->getattr()

2007-08-09 Thread miklos
From: Miklos Szeredi <[EMAIL PROTECTED]> Pass the open file into the filesystem's ->getattr() method for fstat(). This is needed to be able to correctly implement open-unlink-fstat semantics in some filesystem such as sshfs, without having to resort to "silly-renaming". Do this by adding a 'stru

[RFC PATCH 1/4] pass open file to ->setattr()

2007-08-09 Thread miklos
From: Miklos Szeredi <[EMAIL PROTECTED]> Pass the open file into the filesystem's ->setattr() method for fchmod, fchown and some of the utimes variants. This is needed to be able to correctly implement open-unlink-fsetattr semantics in some filesystem such as sshfs, without having to resort to "s

[RFC PATCH 4/4] VFS: allow filesystem to override mknod capability checks

2007-08-09 Thread miklos
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a new filesystem flag, that results in the VFS not checking if the current process has enough privileges to do an mknod(). This is needed on filesystems, where an unprivileged user may be able to create a device node, without causing security problems.

[RFC PATCH 0/4] VFS updates

2007-08-09 Thread miklos
VFS tweaks needed for some FUSE features, but possibly useful to other filesystems as well. Comments are welcome. -- - 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-in

[RFC PATCH 3/4] allow filesystems to implement atomic open+truncate

2007-08-09 Thread miklos
From: Miklos Szeredi <[EMAIL PROTECTED]> Add a new attribute flag ATTR_OPEN, with the meaning: "truncation was initiated by open() due to the O_TRUNC flag". This way filesystems wanting to implement truncation within their ->open() method can ignore such truncate requests. This is a quick & dirt

Re: [fuse-devel] [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND)

2007-08-09 Thread Jeff Layton
On Wed, 8 Aug 2007 22:05:13 +0200 (CEST) Jan Engelhardt <[EMAIL PROTECTED]> wrote: > > On Aug 8 2007 09:48, Andrew Morton wrote: > >> > On Mon, 6 Aug 2007 09:54:03 -0400 > >> > Jeff Layton <[EMAIL PROTECTED]> wrote: > >> > > >> > Is there any way in which we can prevent these problems? Say > >>