02 Nov, 2020
4 commits
-
This reverts commit 9b71b12a277749cc52172b1dc8e11301e893107d.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ic3e70e434b7997f25bc8fc8132c75ad10a0fac0f -
This reverts commit 75bd2bca5028f7d129c267a0c861bd0a63f05daa.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: I5666529cd5c5d3d3a3a2c298ea610f13d57f4337 -
This reverts commit 836219141ff7a77e7fab0bd749edd746fd36fef2.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ia401cbfe62bf5d9e03afab9f9fc6086bd5b34bbf -
This reverts commit 1c9bbee57862efdc506a68ff1a75fa153f886355.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: Id9e03fd9bcd64e8d7be30bd0a88ba1d3538da97c
28 Oct, 2020
3 commits
-
This reverts commit aeffda3c613cd8b29dc8454e154eb94f0c21cb36.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: I433aead8411131865de1cff8957d4708009142ba -
This reverts commit e4a15e8dacfecc02abd4d6bf0012307cee686ad3.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: I27032f9ebe8fcddd98416ddabe34f554db545eae -
This reverts commit 6a0e0ecdd4b27a73d289a5ca24e580d804a2cb5a.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: I796a9872e32f750c9058d04f0faf408c541fac94
27 Oct, 2020
5 commits
-
…nux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.10-rc1
Resolves conflicts in:
Documentation/admin-guide/sysctl/vm.rstSigned-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic58f28718f28dae42948c935dfb0c62122fe86fc -
This reverts commit 36e2c7421f02a22f71c9283e55fdb672a9eb58e7.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ibfd77d2f44380efa15edee606ff0d9d3dbeb48cb -
This reverts commit 4c207ef48269377236cd38979197c5e1631c8c16.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: I7d39528e90ec94e76864d2dd4f6666595851dfbf -
This reverts commit 7b84b665c874f60d84547635341e418f20cbbab2.
Bug: 171770067
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ibd2082a7f7e84974f0ce52814553f22e493cfcbf -
…linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.10-rc1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie419e3d94c75a9549195518b8a0a003e4e1755a1
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
23 Oct, 2020
5 commits
-
This reverts commit fb041b598997d63c0f7d7305dfae70046bf66fe1.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: I325ae5c3edd6b4cd4213a5c63fec17df842930b7 -
This reverts commit 89cd35c58bc2e36bfdc23dde67a429b08cf4ae03.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: I44ac1575af118ddbc3ee22a70f81cba282f5372a -
This reverts commit 3523a9d45478984169d7f4416a00c83afc964e2a.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: I680effca58fd0fd38fd9ff551d81e9dc26183b5f -
This reverts commit 5f764d624a89d4d00d282157077878d4e7c69869.
Bug: 171539436
Signed-off-by: Greg Kroah-Hartman
Change-Id: Ib733da773e5b3adae34ee75a766c8fe8217b8ef3 -
Pull initial set_fs() removal from Al Viro:
"Christoph's set_fs base series + fixups"* 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs: Allow a NULL pos pointer to __kernel_read
fs: Allow a NULL pos pointer to __kernel_write
powerpc: remove address space overrides using set_fs()
powerpc: use non-set_fs based maccess routines
x86: remove address space overrides using set_fs()
x86: make TASK_SIZE_MAX usable from assembly code
x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h
lkdtm: remove set_fs-based tests
test_bitmap: remove user bitmap tests
uaccess: add infrastructure for kernel builds with set_fs()
fs: don't allow splice read/write without explicit ops
fs: don't allow kernel reads and writes without iter ops
sysctl: Convert to iter interfaces
proc: add a read_iter method to proc proc_ops
proc: cleanup the compat vs no compat file ops
proc: remove a level of indentation in proc_get_inode
16 Oct, 2020
4 commits
-
Match the behaviour of new_sync_read() and __kernel_write().
Reviewed-by: Christoph Hellwig
Signed-off-by: Matthew Wilcox (Oracle)
Signed-off-by: Al Viro -
Linus prefers that callers be allowed to pass in a NULL pointer for ppos
like new_sync_write().Reviewed-by: Christoph Hellwig
Signed-off-by: Matthew Wilcox (Oracle)
Signed-off-by: Al Viro -
The generic write check helpers also don't have much to do with the page
cache, so move them to the vfs.Signed-off-by: Darrick J. Wong
-
Complete the migration by moving the file remapping helper functions out
of read_write.c and into remap_range.c. This reduces the clutter in the
first file and (eventually) will make it so that we can compile out the
second file if it isn't needed.Signed-off-by: Darrick J. Wong
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
03 Oct, 2020
3 commits
-
Now that import_iovec handles compat iovecs, the native readv and writev
syscalls can be used for the compat case as well.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
Now that import_iovec handles compat iovecs as well, all the duplicated
code in the compat readv/writev helpers is not needed. Remove them
and switch the compat syscall handlers to use the native helpers.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
Use in compat_syscall to import either native or the compat iovecs, and
remove the now superflous compat_import_iovec.This removes the need for special compat logic in most callers, and
the remaining ones can still be simplified by using __import_iovec
with a bool compat parameter.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro
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
25 Sep, 2020
1 commit
-
This lets the compiler inline it into import_iovec() generating
much better code.Signed-off-by: David Laight
Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro
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 -
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
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
08 Jul, 2020
7 commits
-
Fold it into the two callers.
Signed-off-by: Christoph Hellwig
-
Consolidate the two in-kernel read helpers to make upcoming changes
easier. The only difference are the missing call to rw_verify_area
in kernel_read, and an access_ok check that doesn't make sense for
kernel buffers to start with.Signed-off-by: Christoph Hellwig
-
This is the counterpart to __kernel_write, and skip the rw_verify_area
call compared to kernel_read.Signed-off-by: Christoph Hellwig
-
Fold it into the two callers.
Signed-off-by: Christoph Hellwig
-
Consolidate the two in-kernel write helpers to make upcoming changes
easier. The only difference are the missing call to rw_verify_area
in kernel_write, and an access_ok check that doesn't make sense for
kernel buffers to start with.Signed-off-by: Christoph Hellwig
-
Add a WARN_ON_ONCE if the file isn't actually open for write. This
matches the check done in vfs_write, but actually warn warns as a
kernel user calling write on a file not opened for writing is a pretty
obvious programming error.Signed-off-by: Christoph Hellwig
-
This is a very special interface that skips sb_writes protection, and not
used by modules anymore.Signed-off-by: Christoph Hellwig
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
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()