02 Nov, 2020

4 commits


28 Oct, 2020

3 commits


27 Oct, 2020

5 commits


24 Oct, 2020

1 commit

  • Pull clone/dedupe/remap code refactoring from Darrick Wong:
    "Move the generic file range remap (aka reflink and dedupe) functions
    out of mm/filemap.c and fs/read_write.c and into fs/remap_range.c to
    reduce clutter in the first two files"

    * tag 'vfs-5.10-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    vfs: move the generic write and copy checks out of mm
    vfs: move the remap range helpers to remap_range.c
    vfs: move generic_remap_checks out of mm

    Linus Torvalds
     

23 Oct, 2020

5 commits


16 Oct, 2020

4 commits


13 Oct, 2020

1 commit

  • Pull compat iovec cleanups from Al Viro:
    "Christoph's series around import_iovec() and compat variant thereof"

    * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    security/keys: remove compat_keyctl_instantiate_key_iov
    mm: remove compat_process_vm_{readv,writev}
    fs: remove compat_sys_vmsplice
    fs: remove the compat readv/writev syscalls
    fs: remove various compat readv/writev helpers
    iov_iter: transparently handle compat iovecs in import_iovec
    iov_iter: refactor rw_copy_check_uvector and import_iovec
    iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c
    compat.h: fix a spelling error in

    Linus Torvalds
     

03 Oct, 2020

3 commits


30 Sep, 2020

1 commit

  • autofs got broken in some configurations by commit 13c164b1a186
    ("autofs: switch to kernel_write") because there is now an extra LSM
    permission check done by security_file_permission() in rw_verify_area().

    autofs is one if the few places that really does want the much more
    limited __kernel_write(), because the write is an internal kernel one
    that shouldn't do any user permission checks (it also doesn't need the
    file_start_write/file_end_write logic, since it's just a pipe).

    There are a couple of other cases like that - accounting, core dumping,
    and splice - but autofs stands out because it can be built as a module.

    As a result, we need to export this internal __kernel_write() function
    again.

    We really don't want any other module to use this, but we don't have a
    "EXPORT_SYMBOL_FOR_AUTOFS_ONLY()". But we can mark it GPL-only to at
    least approximate that "internal use only" for licensing.

    While in this area, make autofs pass in NULL for the file position
    pointer, since it's always a pipe, and we now use a NULL file pointer
    for streaming file descriptors (see file_ppos() and commit 438ab720c675:
    "vfs: pass ppos=NULL to .read()/.write() of FMODE_STREAM files")

    This effectively reverts commits 9db977522449 ("fs: unexport
    __kernel_write") and 13c164b1a186 ("autofs: switch to kernel_write").

    Fixes: 13c164b1a186 ("autofs: switch to kernel_write")
    Reported-by: Ondrej Mosnacek
    Acked-by: Christoph Hellwig
    Acked-by: Acked-by: Ian Kent
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

25 Sep, 2020

1 commit


09 Sep, 2020

2 commits

  • default_file_splice_write is the last piece of generic code that uses
    set_fs to make the uaccess routines operate on kernel pointers. It
    implements a "fallback loop" for splicing from files that do not actually
    provide a proper splice_read method. The usual file systems and other
    high bandwidth instances all provide a ->splice_read, so this just removes
    support for various device drivers and procfs/debugfs files. If splice
    support for any of those turns out to be important it can be added back
    by switching them to the iter ops and using generic_file_splice_read.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Kees Cook
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Don't allow calling ->read or ->write with set_fs as a preparation for
    killing off set_fs. All the instances that we use kernel_read/write on
    are using the iter ops already.

    If a file has both the regular ->read/->write methods and the iter
    variants those could have different semantics for messed up enough
    drivers. Also fails the kernel access to them in that case.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Kees Cook
    Signed-off-by: Al Viro

    Christoph Hellwig
     

30 Jul, 2020

1 commit

  • There is no good reason to mess with file descriptors from in-kernel
    code, switch the initrd loading to struct file based read and writes
    instead.

    Also Pass an explicit offset instead of ->f_pos, and to make that easier,
    use file scope file structs and offsets everywhere except for
    identify_ramdisk_image instead of the current strange mix.

    Signed-off-by: Christoph Hellwig
    Acked-by: Linus Torvalds

    Christoph Hellwig
     

08 Jul, 2020

7 commits


02 Apr, 2020

1 commit

  • This partially reverts commit caf6f9c8a326 ("asm-generic: Remove
    unneeded __ARCH_WANT_SYS_LLSEEK macro")

    When CONFIG_COMPAT is disabled on ppc64 the kernel does not build.

    There is resistance to both removing the llseek syscall from the 64bit
    syscall tables and building the llseek interface unconditionally.

    Signed-off-by: Michal Suchanek
    Reviewed-by: Arnd Bergmann
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/lkml/20190828151552.GA16855@infradead.org/
    Link: https://lore.kernel.org/lkml/20190829214319.498c7de2@naga/
    Link: https://lore.kernel.org/r/dd4575c51e31766e87f7e7fa121d099ab78d3290.1584699455.git.msuchanek@suse.de

    Michal Suchanek
     

04 Feb, 2020

1 commit

  • Pull overlayfs update from Miklos Szeredi:

    - Try to preserve holes in sparse files when copying up, thus saving
    disk space and improving performance.

    - Fix a performance regression introduced in v4.19 by preserving
    asynchronicity of IO when fowarding to underlying layers. Add VFS
    helpers to submit async iocbs.

    - Fix a regression in lseek(2) introduced in v4.19 that breaks >2G
    seeks on 32bit kernels.

    - Fix a corner case where st_ino/st_dev was not preserved across copy
    up.

    - Miscellaneous fixes and cleanups.

    * tag 'ovl-update-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
    ovl: fix lseek overflow on 32bit
    ovl: add splice file read write helper
    ovl: implement async IO routines
    vfs: add vfs_iocb_iter_[read|write] helper functions
    ovl: layer is const
    ovl: fix corner case of non-constant st_dev;st_ino
    ovl: fix corner case of conflicting lower layer uuid
    ovl: generalize the lower_fs[] array
    ovl: simplify ovl_same_sb() helper
    ovl: generalize the lower_layers[] array
    ovl: improving copy-up efficiency for big sparse file
    ovl: use ovl_inode_lock in ovl_llseek()
    ovl: use pr_fmt auto generate prefix
    ovl: fix wrong WARN_ON() in ovl_cache_update_ino()

    Linus Torvalds