24 Jun, 2005

13 commits

  • This patch gets rid of some macro obfuscation from fs/eventpoll.c by
    removing slab allocator wrappers and converting macros to static inline
    functions.

    Signed-off-by: Pekka Enberg
    Acked-by: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • This patch consolidates sys_fsync and sys_fdatasync.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • In ia64 kernel, the O_LARGEFILE flag is forced when opening a file. This
    is problematic for execution of 32 bit processes, which are not largefile
    aware, either by SW emulation or by HW execution.

    For such processes, the problem is two-fold:

    1) When trying to open a file that is larger than 4G
    the operation should fail, but it's not
    2) Writing to offset larger than 4G should fail, but
    it's not

    The proposed patch takes advantage of the way 32 bit processes are
    identified in ia64 systems. Such processes have PER_LINUX32 for their
    personality. With the patch, the ia64 kernel will not enforce the
    O_LARGEFILE flag if the current process has PER_LINUX32 set. The behavior
    for all other architectures remains unchanged.

    Signed-off-by: Yoav Zach
    Acked-by: Tony Luck
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoav Zach
     
  • This patch removes O(n^2) super block loops in sync_inodes(),
    sync_filesystems() etc. in favour of using __put_super_and_need_restart()
    which I introduced earlier. We faced a noticably long freezes on sb
    syncing when there are thousands of super blocks in the system.

    Signed-Off-By: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     
  • This patch fixes incorrect and bogus kernel messages that file-max limit
    reached when the allocation fails

    Signed-Off-By: Kirill Korotaev
    Signed-Off-By: Denis Lunev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     
  • In a duplicate of lookup_create in the af_unix code Al commented what's
    going on nicely, so let's bring that over to lookup_create before the copy
    is going away (I'll send a patch soon)

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Henrik Grubbstrom noted:

    The 2.6.10 ext3_get_parent attempts to use ext3_find_entry to look up the
    entry "..", which fails for dx directories since ".." is not present in the
    directory hash table. The patch below solves this by looking up the dotdot
    entry in the dx_root block.

    Typical symptoms of the above bug are intermittent claims by nfsd that
    files or directories are missing on exported ext3 filesystems.

    cf https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D150759 and
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D144556

    ext3_get_parent() is IMHO the wrong place to fix this bug as it introduces
    a lot of internals from htree into that function. Instead, I think this
    should be fixed in ext3_find_entry() as in the below patch. This has the
    added advantage that it works for any callers of ext3_find_entry() and not
    just ext3_lookup_parent().

    Signed-off-by: Andreas Dilger
    Signed-off-by: Henrik Grubbstrom
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andreas Dilger
     
  • Add a new `suid_dumpable' sysctl:

    This value can be used to query and set the core dump mode for setuid
    or otherwise protected/tainted binaries. The modes are

    0 - (default) - traditional behaviour. Any process which has changed
    privilege levels or is execute only will not be dumped

    1 - (debug) - all processes dump core when possible. The core dump is
    owned by the current user and no security is applied. This is intended
    for system debugging situations only. Ptrace is unchecked.

    2 - (suidsafe) - any binary which normally would not be dumped is dumped
    readable by root only. This allows the end user to remove such a dump but
    not access it directly. For security reasons core dumps in this mode will
    not overwrite one another or other files. This mode is appropriate when
    adminstrators are attempting to debug problems in a normal environment.

    (akpm:

    > > +EXPORT_SYMBOL(suid_dumpable);
    >
    > EXPORT_SYMBOL_GPL?

    No problem to me.

    > > if (current->euid == current->uid && current->egid == current->gid)
    > > current->mm->dumpable = 1;
    >
    > Should this be SUID_DUMP_USER?

    Actually the feedback I had from last time was that the SUID_ defines
    should go because its clearer to follow the numbers. They can go
    everywhere (and there are lots of places where dumpable is tested/used
    as a bool in untouched code)

    > Maybe this should be renamed to `dump_policy' or something. Doing that
    > would help us catch any code which isn't using the #defines, too.

    Fair comment. The patch was designed to be easy to maintain for Red Hat
    rather than for merging. Changing that field would create a gigantic
    diff because it is used all over the place.

    )

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Use lookup_one_len instead of opencoding a simplified lookup using
    lookup_hash with a fake hash.

    Also there's no need anymore for the d_invalidate as we have a completely
    valid dentry now.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Move some code duplicated in both callers into vfs_quota_on_mount

    Signed-off-by: Christoph Hellwig
    Acked-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Various filesystem drivers have grown a get_dentry() function that's a
    duplicate of lookup_one_len, except that it doesn't take a maximum length
    argument and doesn't check for \0 or / in the passed in filename.

    Switch all these places to use lookup_one_len.

    Signed-off-by: Christoph Hellwig
    Cc: Greg KH
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Patch to add check to get_chrdev_list and get_blkdev_list to prevent reads
    of /proc/devices from spilling over the provided page if more than 4096
    bytes of string data are generated from all the registered character and
    block devices in a system

    Signed-off-by: Neil Horman
    Cc: Christoph Hellwig
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • Based on analysis and a patch from Russ Weight

    There is a race condition that can occur if an inode is allocated and then
    released (using iput) during the ->fill_super functions. The race
    condition is between kswapd and mount.

    For most filesystems this can only happen in an error path when kswapd is
    running concurrently. For isofs, however, the error can occur in a more
    common code path (which is how the bug was found).

    The logic here is "we want final iput() to free inode *now* instead of
    letting it sit in cache if fs is going down or had not quite come up". The
    problem is with kswapd seeing such inodes in the middle of being killed and
    happily taking over.

    The clean solution would be to tell kswapd to leave those inodes alone and
    let our final iput deal with them. I.e. add a new flag
    (I_FORCED_FREEING), set it before write_inode_now() there and make
    prune_icache() leave those alone.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Viro
     

23 Jun, 2005

27 commits