lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 22 Jul 2012 11:09:20 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [git pull] vfs.git; pile 1

This one is *big* and changes quite a few things around VFS.  What's in there:

	* the first of two really major architecture changes - death to
open intents.  The former is finally there; it was very long in making,
but with Miklos getting through really hard and messy final push in
fs/namei.c, we finally have it.  Unlike his variant, this one doesn't
introduce struct opendata; what we have instead is ->atomic_open()
taking preallocated struct file * and passing everything via its fields.
Instead of returning struct file *, it returns -E... on error, 0 on success
and 1 in "deal with it yourself" case (e.g. symlink found on server,
etc.).  See comments before fs/namei.c:atomic_open().  That made a lot of
goodies finally possible and quite a few are in that pile: ->lookup(),
->d_revalidate() and ->create() do not get struct nameidata * anymore;
->lookup() and ->d_revalidate() get lookup flags instead, ->create()
gets "do we want it exclusive" flag.  With the introduction of new helper
(kern_path_locked()) we are rid of all struct nameidata instances outside
of fs/namei.c; it's still visible in namei.h, but not for long.  Come the
next cycle, declaration will move either to fs/internal.h or to fs/namei.c
itself. [me, miklos, hch]

	* the second major change: behaviour of final fput().  Now we
have __fput() done without any locks held by caller *and* not from deep
in call stack.	That obviously lifts a lot of constraints on the locking
in there.  Moreover, it's legal now to call fput() from atomic contexts
(which has immediately simplified life for aio.c).  We also don't need
anti-recursion logics in __scm_destroy() anymore.  There is a price,
though - the damn thing has become partially asynchronous.  For fput()
from normal process we are guaranteed that pending __fput() will be done
before the caller returns to userland, exits or gets stopped for ptrace.
For kernel threads and atomic contexts it's done via schedule_work(),
so theoretically we might need a way to make sure it's finished; so far
only one such place had been found, but there might be more.  There's
flush_delayed_fput() (do all pending __fput()) and there's __fput_sync()
(fput() analog doing __fput() immediately).  I hope we won't need them
often; see warnings in fs/file_table.c for details. [me, based on task_work
series from Oleg merged last cycle]

	* sync series from Jan

	* large part of "death to sync_supers()" work from Artem; the only
bits missing here are exofs and ext4 ones.  As far as I understand, those
are going via the exofs and ext4 trees resp.; once they are in, we can
put ->write_super() to the rest, along with the thread calling it.

	* preparatory bits from unionmount series (from dhowells).

	* assorted cleanups and fixes all over the place, as usual.

This is not the last pile for this cycle; there's at least jlayton's
ESTALE work and fsfreeze series (the latter - in dire need of
fixes, so I'm not sure it'll make the cut this cycle).  I'll
probably throw symlink/hardlink restrictions stuff from Kees into
the next pile, too.  Plus there's a lot of misc patches I hadn't
thrown into that one - it's large enough as it is...

Please, pull from the usual place -
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-linus

Shortlog:
Al Viro (61):
      get rid of ->mnt_longterm
      get rid of magic in proc_namespace.c
      qnx6: don't bother with ->i_dentry in inode-freeing callback
      cifs: don't bother with ->i_dentry in ->destroy_inode()
      adfs: don't bother with ->i_dentry in ->destroy_inode()
      vfs: update documentation on ->i_dentry handling
      affs: get rid of open-coded list_for_each_entry()
      affs: unobfuscate affs_fix_dcache()
      ocfs2: use list_for_each_entry in ocfs2_find_local_alias()
      ext4: get rid of open-coded d_find_any_alias()
      vfs: switch i_dentry/d_alias to hlist
      coda: use list_for_each_entry
      namei.c: let follow_link() do put_link() on failure
      ->atomic_open() prototype change - pass int * instead of bool *
      don't modify od->filp at all
      make ->atomic_open() return int
      kill opendata->{mnt,dentry}
      kill struct opendata
      fs/namei.c: get do_last() and friends return int
      make finish_no_open() return int
      switch do_dentry_open() to returning int
      fold __dentry_open() into its sole caller
      do_dentry_open(): take initialization of file->f_path to caller
      switch nfs_lookup_check_intent() away from nameidata
      nfs_lookup_verify_inode() - nd is *always* non-NULL here
      fs/nfs/dir.c: switch to passing nd->flags instead of nd wherever possible
      stop passing nameidata * to ->d_revalidate()
      fs/namei.c: don't pass nameidata to d_revalidate()
      fs/namei.c: don't pass namedata to lookup_dcache()
      stop passing nameidata to ->lookup()
      fs/namei.c: don't pass nameidata to __lookup_hash() and lookup_real()
      don't pass nameidata to ->create()
      don't pass nameidata * to vfs_create()
      get rid of kern_path_parent()
      sysfs: switch to ->s_d_op and ->d_release()
      sysfs: just use d_materialise_unique()
      __d_unalias() should refuse to move mountpoints
      debugfs: make sure that debugfs_create_file() gets used only for regulars
      debugfs: fold debugfs_create_by_name() into the only caller
      debugfs: get rid of useless arguments to debugfs_{mkdir,symlink}
      mark_files_ro(): don't bother with mntget/mntput
      do_dentry_open(): close the race with mark_files_ro() in failure exit
      signal: make sure we don't get stopped with pending task_work
      trimming task_work: kill ->data
      trim task_work: get rid of hlist
      merge task_work and rcu_head, get rid of separate allocation for keyring case
      move exit_task_work() past exit_files() et.al.
      deal with task_work callbacks adding more work
      switch fput to task_work_add
      aio: now fput() is OK from interrupt context; get rid of manual delayed __fput()
      get rid of ->scm_work_list
      hold task_lock around checks in keyctl
      unobfuscate follow_up() a bit
      tidy up namei.c a bit
      don't expose I_NEW inodes via dentry->d_inode
      ecryptfs: don't reinvent the wheels, please - use struct completion
      zoran: don't bother with struct file * in zoran_map
      spufs: shift dget/mntget towards dentry_open()
      switch dentry_open() to struct path, make it grab references itself
      btrfs: switch btrfs_ioctl_balance() to mnt_want_write_file()
      ext4: switch EXT4_IOC_RESIZE_FS to mnt_want_write_file()

Andrew Morton (1):
      notify_change(): check that i_mutex is held

Artem Bityutskiy (23):
      affs: stop setting bm_flags
      affs: remove useless superblock writeout on unmount
      affs: remove useless superblock writeout on remount
      affs: re-structure superblock locking a bit
      affs: stop using lock_super
      affs: introduce VFS superblock object back-reference
      affs: get rid of affs_sync_super
      hfsplus: make hfsplus_sync_fs static
      hfsplus: amend debugging print
      hfsplus: remove useless check
      hfsplus: get rid of write_super
      hfs: push lock_super down
      hfs: get rid of lock_super
      hfs: remove extra mdb write on unmount
      hfs: simplify a bit checking for R/O
      hfs: introduce VFS superblock object back-reference
      hfs: get rid of hfs_sync_super
      fs/sysv: remove useless write_super call
      fs/sysv: remove another useless write_super call
      fs/sysv: stop using write_super and s_dirt
      fs/ufs: remove extra superblock write on unmount
      fs/ufs: re-arrange the code a bit
      fs/ufs: get rid of write_super

Christoph Hellwig (2):
      fs: move path_put on failure out of ->follow_link
      fs: add nd_jump_link

David Howells (6):
      VFS: Fix the banner comment on lookup_open()
      VFS: Make chown() and lchown() call fchownat()
      VFS: Make clone_mnt()/copy_tree()/collect_mounts() return errors
      VFS: Comment mount following code
      VFS: Pass mount flags to sget()
      VFS: Split inode_permission()

Eric Sandeen (3):
      vfs: allow custom EOF in generic_file_llseek code
      ext4: use core vfs llseek code for dir seeks
      ext3: pass custom EOF to generic_file_llseek_size()

Jan Kara (8):
      vfs: Move noop_backing_dev_info check from sync into writeback
      quota: Split dquot_quota_sync() to writeback and cache flushing part
      quota: Move quota syncing to ->sync_fs method
      vfs: Reorder operations during sys_sync
      vfs: Create function for iterating over block devices
      vfs: Make sys_sync writeout also block device inodes
      vfs: Remove unnecessary flushing of block devices
      vfs: Avoid unnecessary WB_SYNC_NONE writeback during sys_sync and reorder sync passes

Julia Lawall (1):
      fs/direct-io.c: adjust suspicious bit operation

Miklos Szeredi (21):
      vfs: do_last(): inline lookup_slow()
      vfs: do_last(): separate O_CREAT specific code
      vfs: do_last(): common slow lookup
      vfs: add lookup_open()
      vfs: lookup_open(): expand lookup_hash()
      vfs: add i_op->atomic_open()
      nfs: implement i_op->atomic_open()
      nfs: clean up ->create in nfs_rpc_ops
      nfs: don't use nd->intent.open.flags
      nfs: don't use intents for checking atomic open
      fuse: implement i_op->atomic_open()
      cifs: implement i_op->atomic_open()
      ceph: remove unused arg from ceph_lookup_open()
      ceph: implement i_op->atomic_open()
      9p: implement i_op->atomic_open()
      vfs: remove open intents from nameidata
      vfs: do_last(): clean up error handling
      vfs: do_last(): clean up labels
      vfs: do_last(): clean up bool
      vfs: do_last(): clean up retry
      vfs: move O_DIRECT check to common code

Diffstat:
 Documentation/filesystems/Locking         |   11 +-
 Documentation/filesystems/porting         |   21 +-
 Documentation/filesystems/vfs.txt         |   23 +-
 arch/powerpc/platforms/cell/spufs/inode.c |   48 +--
 drivers/base/devtmpfs.c                   |  100 ++--
 drivers/media/video/zoran/zoran.h         |    4 +-
 drivers/media/video/zoran/zoran_driver.c  |    4 +-
 drivers/mtd/mtdsuper.c                    |    4 +-
 fs/9p/v9fs.h                              |    2 +-
 fs/9p/vfs_dentry.c                        |    4 +-
 fs/9p/vfs_inode.c                         |  170 ++++---
 fs/9p/vfs_inode_dotl.c                    |   59 ++-
 fs/9p/vfs_super.c                         |    4 +-
 fs/adfs/dir.c                             |    2 +-
 fs/adfs/super.c                           |    1 -
 fs/affs/affs.h                            |   11 +-
 fs/affs/amigaffs.c                        |   22 +-
 fs/affs/bitmap.c                          |    4 +-
 fs/affs/namei.c                           |    4 +-
 fs/affs/super.c                           |   68 ++-
 fs/afs/dir.c                              |   14 +-
 fs/afs/mntpt.c                            |    4 +-
 fs/afs/super.c                            |    3 +-
 fs/aio.c                                  |   73 +---
 fs/attr.c                                 |    3 +-
 fs/autofs4/dev-ioctl.c                    |    4 +-
 fs/autofs4/root.c                         |    4 +-
 fs/bad_inode.c                            |    4 +-
 fs/befs/linuxvfs.c                        |    4 +-
 fs/bfs/dir.c                              |    4 +-
 fs/block_dev.c                            |   36 ++
 fs/btrfs/inode.c                          |    6 +-
 fs/btrfs/ioctl.c                          |    4 +-
 fs/btrfs/super.c                          |    4 +-
 fs/cachefiles/namei.c                     |    2 +-
 fs/cachefiles/rdwr.c                      |    8 +-
 fs/ceph/dir.c                             |   77 ++--
 fs/ceph/file.c                            |   26 +-
 fs/ceph/super.c                           |    2 +-
 fs/ceph/super.h                           |    6 +-
 fs/cifs/cifsfs.c                          |   11 +-
 fs/cifs/cifsfs.h                          |    7 +-
 fs/cifs/dir.c                             |  448 +++++++++--------
 fs/cifs/inode.c                           |    5 +-
 fs/coda/cache.c                           |   10 +-
 fs/coda/dir.c                             |   14 +-
 fs/configfs/dir.c                         |    2 +-
 fs/cramfs/inode.c                         |    2 +-
 fs/dcache.c                               |   44 +-
 fs/debugfs/inode.c                        |   91 ++--
 fs/devpts/inode.c                         |    6 +-
 fs/direct-io.c                            |    2 +-
 fs/ecryptfs/dentry.c                      |   20 +-
 fs/ecryptfs/ecryptfs_kernel.h             |   14 -
 fs/ecryptfs/inode.c                       |    9 +-
 fs/ecryptfs/kthread.c                     |   73 +--
 fs/ecryptfs/main.c                        |    8 +-
 fs/efs/efs.h                              |    2 +-
 fs/efs/namei.c                            |    3 +-
 fs/exofs/namei.c                          |    4 +-
 fs/exportfs/expfs.c                       |   16 +-
 fs/ext2/namei.c                           |    8 +-
 fs/ext2/super.c                           |    6 +
 fs/ext3/dir.c                             |    3 +-
 fs/ext3/namei.c                           |    8 +-
 fs/ext3/super.c                           |    5 +
 fs/ext4/dir.c                             |   75 +---
 fs/ext4/file.c                            |    9 +-
 fs/ext4/fsync.c                           |   11 +-
 fs/ext4/ioctl.c                           |    4 +-
 fs/ext4/namei.c                           |    8 +-
 fs/ext4/super.c                           |    5 +
 fs/fat/namei_msdos.c                      |    4 +-
 fs/fat/namei_vfat.c                       |   16 +-
 fs/file_table.c                           |   81 +++-
 fs/freevxfs/vxfs_lookup.c                 |    4 +-
 fs/fs-writeback.c                         |    5 +
 fs/fs_struct.c                            |   32 +-
 fs/fuse/dir.c                             |   99 +++--
 fs/gfs2/dentry.c                          |    6 +-
 fs/gfs2/inode.c                           |    7 +-
 fs/gfs2/ops_fstype.c                      |    5 +-
 fs/gfs2/quota.c                           |    4 +-
 fs/gfs2/quota.h                           |    2 +-
 fs/gfs2/super.c                           |    4 +-
 fs/gfs2/sys.c                             |    2 +-
 fs/hfs/dir.c                              |    4 +-
 fs/hfs/extent.c                           |    2 +-
 fs/hfs/hfs_fs.h                           |   15 +-
 fs/hfs/inode.c                            |   16 +-
 fs/hfs/mdb.c                              |   13 +
 fs/hfs/super.c                            |   73 ++--
 fs/hfs/sysdep.c                           |    4 +-
 fs/hfsplus/bitmap.c                       |    4 +-
 fs/hfsplus/dir.c                          |    6 +-
 fs/hfsplus/hfsplus_fs.h                   |    7 +-
 fs/hfsplus/inode.c                        |    8 +-
 fs/hfsplus/super.c                        |   46 ++-
 fs/hostfs/hostfs_kern.c                   |    4 +-
 fs/hpfs/dir.c                             |    2 +-
 fs/hpfs/hpfs_fn.h                         |    2 +-
 fs/hpfs/namei.c                           |    2 +-
 fs/hppfs/hppfs.c                          |   22 +-
 fs/hugetlbfs/inode.c                      |    2 +-
 fs/inode.c                                |    2 +-
 fs/internal.h                             |   10 +-
 fs/isofs/isofs.h                          |    2 +-
 fs/isofs/namei.c                          |    2 +-
 fs/jffs2/dir.c                            |   16 +-
 fs/jfs/namei.c                            |   18 +-
 fs/jfs/super.c                            |    5 +
 fs/libfs.c                                |    6 +-
 fs/logfs/dir.c                            |    4 +-
 fs/logfs/super.c                          |    3 +-
 fs/minix/namei.c                          |    4 +-
 fs/mount.h                                |   13 +-
 fs/namei.c                                |  808 ++++++++++++++++++++---------
 fs/namespace.c                            |  195 ++++----
 fs/ncpfs/dir.c                            |   14 +-
 fs/nfs/dir.c                              |  314 +++++-------
 fs/nfs/getroot.c                          |    2 +-
 fs/nfs/nfs3proc.c                         |    2 +-
 fs/nfs/nfs4proc.c                         |   37 +-
 fs/nfs/proc.c                             |    2 +-
 fs/nfs/super.c                            |    2 +-
 fs/nfsd/vfs.c                             |   14 +-
 fs/nilfs2/namei.c                         |    4 +-
 fs/nilfs2/super.c                         |    4 +-
 fs/notify/fanotify/fanotify_user.c        |    8 +-
 fs/notify/fsnotify.c                      |    3 +-
 fs/ntfs/namei.c                           |    2 +-
 fs/ocfs2/dcache.c                         |   22 +-
 fs/ocfs2/dlmfs/dlmfs.c                    |    2 +-
 fs/ocfs2/namei.c                          |    4 +-
 fs/omfs/dir.c                             |    4 +-
 fs/open.c                                 |  213 +++------
 fs/openpromfs/inode.c                     |    4 +-
 fs/pnode.c                                |    5 +-
 fs/proc/base.c                            |   51 +-
 fs/proc/generic.c                         |    2 +-
 fs/proc/internal.h                        |    6 +-
 fs/proc/namespaces.c                      |    4 +-
 fs/proc/proc_net.c                        |    2 +-
 fs/proc/proc_sysctl.c                     |    6 +-
 fs/proc/root.c                            |   10 +-
 fs/proc_namespace.c                       |    7 +-
 fs/qnx4/namei.c                           |    2 +-
 fs/qnx4/qnx4.h                            |    2 +-
 fs/qnx6/inode.c                           |    1 -
 fs/qnx6/namei.c                           |    2 +-
 fs/qnx6/qnx6.h                            |    2 +-
 fs/quota/dquot.c                          |   24 +-
 fs/quota/quota.c                          |    4 +-
 fs/ramfs/inode.c                          |    2 +-
 fs/read_write.c                           |   18 +-
 fs/reiserfs/namei.c                       |   12 +-
 fs/reiserfs/procfs.c                      |    2 +-
 fs/reiserfs/super.c                       |    5 +
 fs/reiserfs/xattr.c                       |    4 +-
 fs/romfs/super.c                          |    2 +-
 fs/squashfs/namei.c                       |    2 +-
 fs/super.c                                |   22 +-
 fs/sync.c                                 |   63 ++-
 fs/sysfs/dir.c                            |   31 +-
 fs/sysfs/mount.c                          |    4 +-
 fs/sysfs/sysfs.h                          |    1 +
 fs/sysv/inode.c                           |   18 +-
 fs/sysv/namei.c                           |    4 +-
 fs/sysv/sysv.h                            |    1 -
 fs/ubifs/dir.c                            |    4 +-
 fs/ubifs/super.c                          |    3 +-
 fs/udf/namei.c                            |    4 +-
 fs/ufs/balloc.c                           |    8 +-
 fs/ufs/ialloc.c                           |    4 +-
 fs/ufs/namei.c                            |    4 +-
 fs/ufs/super.c                            |  148 +++---
 fs/ufs/ufs.h                              |    5 +
 fs/ufs/ufs_fs.h                           |    1 +
 fs/xfs/xfs_ioctl.c                        |    7 +-
 fs/xfs/xfs_iops.c                         |    6 +-
 include/linux/dcache.h                    |    4 +-
 include/linux/file.h                      |    3 +
 include/linux/fs.h                        |   33 +-
 include/linux/namei.h                     |   18 +-
 include/linux/nfs_xdr.h                   |    2 +-
 include/linux/quota.h                     |    2 +-
 include/linux/quotaops.h                  |    8 +-
 include/linux/sched.h                     |    3 +-
 include/linux/task_work.h                 |   18 +-
 include/linux/tracehook.h                 |    2 +-
 include/linux/types.h                     |    9 +-
 include/net/scm.h                         |    1 -
 init/main.c                               |    3 +-
 ipc/mqueue.c                              |  119 ++---
 kernel/audit_tree.c                       |   10 +-
 kernel/audit_watch.c                      |   25 +-
 kernel/cgroup.c                           |    6 +-
 kernel/exit.c                             |    6 +-
 kernel/fork.c                             |    2 +-
 kernel/irq/manage.c                       |    6 +-
 kernel/signal.c                           |   15 +
 kernel/task_work.c                        |   94 ++--
 mm/shmem.c                                |    2 +-
 net/core/scm.c                            |   22 +-
 security/keys/internal.h                  |    2 +-
 security/keys/keyctl.c                    |   26 +-
 security/keys/process_keys.c              |    5 +-
 security/selinux/hooks.c                  |    3 +-
 security/selinux/include/security.h       |    2 +-
 security/selinux/selinuxfs.c              |    6 +-
 210 files changed, 2609 insertions(+), 2398 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ