[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200624161335.1810359-1-hch@lst.de>
Date: Wed, 24 Jun 2020 18:13:21 +0200
From: Christoph Hellwig <hch@....de>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Ian Kent <raven@...maw.net>,
David Howells <dhowells@...hat.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-security-module@...r.kernel.org,
netfilter-devel@...r.kernel.org
Subject: clean up kernel_{read,write} & friends v5
Hi Al,
this series fixes a few issues and cleans up the helpers that read from
or write to kernel space buffers, and ensures that we don't change the
address limit if we are using the ->read_iter and ->write_iter methods
that don't need the changed address limit.
I did not add your suggested comments on the instances using
uaccess_kernel as all of them already have comments. If you have
anything better in mind feel free to throw in additional comments.
Changes since v4:
- warn on calling __kernel_write on files not open for write
- add a FMODE_READ check and warning in __kernel_read
- add a new patch to remove kernel_readv
- stop preferring the iter variants if normal read/write is
present
Changes since v3:
- keep call_read_iter/call_write_iter for now
- don't modify an existing long line
- update a change log
Changes since v2:
- picked up a few ACKs
Changes since v1:
- __kernel_write must not take sb_writers
- unexport __kernel_write
Diffstat:
fs/autofs/waitq.c | 2
fs/cachefiles/rdwr.c | 2
fs/read_write.c | 171 ++++++++++++++++++++++++++-----------------
fs/splice.c | 53 +++----------
include/linux/fs.h | 4 -
net/bpfilter/bpfilter_kern.c | 2
security/integrity/iint.c | 14 ---
7 files changed, 125 insertions(+), 123 deletions(-)
Powered by blists - more mailing lists