1. 07 6月, 2014 2 次提交
  2. 04 4月, 2014 2 次提交
  3. 13 3月, 2014 1 次提交
    • T
      fs: push sync_filesystem() down to the file system's remount_fs() · 02b9984d
      Theodore Ts'o 提交于
      Previously, the no-op "mount -o mount /dev/xxx" operation when the
      file system is already mounted read-write causes an implied,
      unconditional syncfs().  This seems pretty stupid, and it's certainly
      documented or guaraunteed to do this, nor is it particularly useful,
      except in the case where the file system was mounted rw and is getting
      remounted read-only.
      
      However, it's possible that there might be some file systems that are
      actually depending on this behavior.  In most file systems, it's
      probably fine to only call sync_filesystem() when transitioning from
      read-write to read-only, and there are some file systems where this is
      not needed at all (for example, for a pseudo-filesystem or something
      like romfs).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: linux-fsdevel@vger.kernel.org
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Evgeniy Dushistov <dushistov@mail.ru>
      Cc: Jan Kara <jack@suse.cz>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Anders Larsen <al@alarsen.net>
      Cc: Phillip Lougher <phillip@squashfs.org.uk>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: Petr Vandrovec <petr@vandrovec.name>
      Cc: xfs@oss.sgi.com
      Cc: linux-btrfs@vger.kernel.org
      Cc: linux-cifs@vger.kernel.org
      Cc: samba-technical@lists.samba.org
      Cc: codalist@coda.cs.cmu.edu
      Cc: linux-ext4@vger.kernel.org
      Cc: linux-f2fs-devel@lists.sourceforge.net
      Cc: fuse-devel@lists.sourceforge.net
      Cc: cluster-devel@redhat.com
      Cc: linux-mtd@lists.infradead.org
      Cc: jfs-discussion@lists.sourceforge.net
      Cc: linux-nfs@vger.kernel.org
      Cc: linux-nilfs@vger.kernel.org
      Cc: linux-ntfs-dev@lists.sourceforge.net
      Cc: ocfs2-devel@oss.oracle.com
      Cc: reiserfs-devel@vger.kernel.org
      02b9984d
  4. 09 11月, 2013 1 次提交
  5. 25 10月, 2013 1 次提交
  6. 05 7月, 2013 1 次提交
  7. 29 6月, 2013 3 次提交
  8. 10 4月, 2013 1 次提交
  9. 04 3月, 2013 1 次提交
    • E
      fs: Limit sys_mount to only request filesystem modules. · 7f78e035
      Eric W. Biederman 提交于
      Modify the request_module to prefix the file system type with "fs-"
      and add aliases to all of the filesystems that can be built as modules
      to match.
      
      A common practice is to build all of the kernel code and leave code
      that is not commonly needed as modules, with the result that many
      users are exposed to any bug anywhere in the kernel.
      
      Looking for filesystems with a fs- prefix limits the pool of possible
      modules that can be loaded by mount to just filesystems trivially
      making things safer with no real cost.
      
      Using aliases means user space can control the policy of which
      filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
      with blacklist and alias directives.  Allowing simple, safe,
      well understood work-arounds to known problematic software.
      
      This also addresses a rare but unfortunate problem where the filesystem
      name is not the same as it's module name and module auto-loading
      would not work.  While writing this patch I saw a handful of such
      cases.  The most significant being autofs that lives in the module
      autofs4.
      
      This is relevant to user namespaces because we can reach the request
      module in get_fs_type() without having any special permissions, and
      people get uncomfortable when a user specified string (in this case
      the filesystem type) goes all of the way to request_module.
      
      After having looked at this issue I don't think there is any
      particular reason to perform any filtering or permission checks beyond
      making it clear in the module request that we want a filesystem
      module.  The common pattern in the kernel is to call request_module()
      without regards to the users permissions.  In general all a filesystem
      module does once loaded is call register_filesystem() and go to sleep.
      Which means there is not much attack surface exposed by loading a
      filesytem module unless the filesystem is mounted.  In a user
      namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
      which most filesystems do not set today.
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Reported-by: NKees Cook <keescook@google.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      7f78e035
  10. 23 2月, 2013 1 次提交
  11. 13 2月, 2013 3 次提交
    • E
      coda: Cache permisions in struct coda_inode_info in a kuid_t. · 17499e33
      Eric W. Biederman 提交于
      - Change c_uid in struct coda_indoe_info from a vuid_t to a kuid_t.
      - Initialize c_uid to GLOBAL_ROOT_UID instead of 0.
      - Use uid_eq to compare cached kuids.
      
      Cc: Jan Harkes <jaharkes@cs.cmu.edu>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      17499e33
    • E
      coda: Restrict coda messages to the initial user namespace · d83f5901
      Eric W. Biederman 提交于
      Remove the slight chance that uids and gids in coda messages will be
      interpreted in the wrong user namespace.
      
      - Only allow processes in the initial user namespace to open the coda
        character device to communicate with coda filesystems.
      - Explicitly convert the uids in the coda header into the initial user
        namespace.
      - In coda_vattr_to_attr make kuids and kgids from the initial user
        namespace uids and gids in struct coda_vattr that just came from
        userspace.
      - In coda_iattr_to_vattr convert kuids and kgids into uids and gids
        in the intial user namespace and store them in struct coda_vattr for
        sending to coda userspace programs.
      
      Nothing needs to be changed with mounts as coda does not support
      being mounted in anything other than the initial user namespace.
      
      Cc: Jan Harkes <jaharkes@cs.cmu.edu>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      d83f5901
    • E
      coda: Restrict coda messages to the initial pid namespace · 9fd973e0
      Eric W. Biederman 提交于
      Remove the slight chance that pids in coda messages will be
      interpreted in the wrong pid namespace.
      
      - Explicitly send all pids in coda messages in the initial pid
        namespace.
      - Only allow mounts from processes in the initial pid namespace.
      - Only allow processes in the initial pid namespace to open the coda
        character device to communicate with coda.
      
      Cc: Jan Harkes <jaharkes@cs.cmu.edu>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      9fd973e0
  12. 03 10月, 2012 1 次提交
  13. 27 9月, 2012 2 次提交
  14. 14 7月, 2012 4 次提交
  15. 06 5月, 2012 1 次提交
  16. 29 3月, 2012 1 次提交
  17. 21 3月, 2012 2 次提交
  18. 11 1月, 2012 2 次提交
  19. 04 1月, 2012 3 次提交
  20. 02 11月, 2011 2 次提交
  21. 15 9月, 2011 1 次提交
  22. 21 7月, 2011 3 次提交
  23. 20 7月, 2011 1 次提交