Linux-Security-Module Archive on lore.kernel.org
 help / color / Atom feed
* clean up kernel_{read,write} & friends v2
@ 2020-05-13  6:56 Christoph Hellwig
  2020-05-13  6:56 ` [PATCH 01/14] cachefiles: switch to kernel_write Christoph Hellwig
                   ` (16 more replies)
  0 siblings, 17 replies; 21+ messages in thread
From: Christoph Hellwig @ 2020-05-13  6:56 UTC (permalink / raw)
  To: Al Viro
  Cc: Ian Kent, David Howells, linux-kernel, linux-fsdevel,
	linux-security-module, netfilter-devel

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.

Changes since v1:
 - __kernel_write must not take sb_writers
 - unexported __kernel_write

^ permalink raw reply	[flat|nested] 21+ messages in thread
* clean up kernel_{read,write} & friends v2
@ 2020-05-28  5:40 Christoph Hellwig
  2020-05-28  5:40 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
  0 siblings, 1 reply; 21+ messages in thread
From: Christoph Hellwig @ 2020-05-28  5:40 UTC (permalink / raw)
  To: Al Viro
  Cc: Linus Torvalds, Ian Kent, David Howells, linux-kernel,
	linux-fsdevel, linux-security-module, netfilter-devel

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.

Changes since v2:
 - picked up a few ACKs

Changes since v1:
 - __kernel_write must not take sb_writers
 - unexport __kernel_write

^ permalink raw reply	[flat|nested] 21+ messages in thread
* clean up kernel_{read,write} & friends v5
@ 2020-06-24 16:13 Christoph Hellwig
  2020-06-24 16:13 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
  0 siblings, 1 reply; 21+ messages in thread
From: Christoph Hellwig @ 2020-06-24 16:13 UTC (permalink / raw)
  To: Al Viro
  Cc: Linus Torvalds, Ian Kent, David Howells, linux-kernel,
	linux-fsdevel, linux-security-module, netfilter-devel

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(-)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, back to index

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  6:56 clean up kernel_{read,write} & friends v2 Christoph Hellwig
2020-05-13  6:56 ` [PATCH 01/14] cachefiles: switch to kernel_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 02/14] autofs: " Christoph Hellwig
2020-05-14  8:25   ` Ian Kent
2020-05-13  6:56 ` [PATCH 03/14] bpfilter: " Christoph Hellwig
2020-05-13  6:56 ` [PATCH 04/14] fs: unexport __kernel_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 06/14] fs: remove the call_{read,write}_iter functions Christoph Hellwig
2020-05-13  6:56 ` [PATCH 07/14] fs: implement kernel_write using __kernel_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 08/14] fs: remove __vfs_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 09/14] fs: don't change the address limit for ->write_iter in __kernel_write Christoph Hellwig
2020-05-13  6:56 ` [PATCH 10/14] fs: add a __kernel_read helper Christoph Hellwig
2020-05-13  6:56 ` [PATCH 11/14] integrity/ima: switch to using __kernel_read Christoph Hellwig
2020-05-13  6:56 ` [PATCH 12/14] fs: implement kernel_read " Christoph Hellwig
2020-05-13  6:56 ` [PATCH 13/14] fs: remove __vfs_read Christoph Hellwig
2020-05-13  6:56 ` [PATCH 14/14] fs: don't change the address limit for ->read_iter in __kernel_read Christoph Hellwig
2020-05-15 15:21 ` [PATCH 01/14] cachefiles: switch to kernel_write David Howells
     [not found] ` <20200516030436.19448-1-hdanton@sina.com>
2020-05-18  6:42   ` [PATCH 09/14] fs: don't change the address limit for ->write_iter in __kernel_write Christoph Hellwig
2020-05-20 15:59 ` clean up kernel_{read,write} & friends v2 Christoph Hellwig
2020-05-28  5:40 Christoph Hellwig
2020-05-28  5:40 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig
2020-06-24 16:13 clean up kernel_{read,write} & friends v5 Christoph Hellwig
2020-06-24 16:13 ` [PATCH 05/14] fs: check FMODE_WRITE in __kernel_write Christoph Hellwig

Linux-Security-Module Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-security-module/0 linux-security-module/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-security-module linux-security-module/ https://lore.kernel.org/linux-security-module \
		linux-security-module@vger.kernel.org
	public-inbox-index linux-security-module

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-security-module


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git