All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	David Ahern <dsahern@kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-crypto@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 00/10] crypto, splice, net: Make AF_ALG handle sendmsg(MSG_SPLICE_PAGES)
Date: Tue, 30 May 2023 15:16:24 +0100	[thread overview]
Message-ID: <20230530141635.136968-1-dhowells@redhat.com> (raw)

Here's the fourth tranche of patches towards providing a MSG_SPLICE_PAGES
internal sendmsg flag that is intended to replace the ->sendpage() op with
calls to sendmsg().  MSG_SPLICE_PAGES is a hint that tells the protocol
that it should splice the pages supplied if it can.

This set consists of the following parts:

 (1) Move netfs_extract_iter_to_sg() to somewhere more general and rename
     it to drop the "netfs" prefix.  We use this to extract directly from
     an iterator into a scatterlist.

 (2) Make AF_ALG use iov_iter_extract_pages().  This has the additional
     effect of pinning pages obtained from userspace rather than taking
     refs on them.  Pages from kernel-backed iterators would not be pinned,
     but AF_ALG isn't really meant for use by kernel services.

 (3) Change AF_ALG still further to use extract_iter_to_sg().

 (4) Make af_alg_sendmsg() support MSG_SPLICE_PAGES support and make
     af_alg_sendpage() just a wrapper around sendmsg().  This has to take
     refs on the pages pinned for the moment.

 (5) Make hash_sendmsg() support MSG_SPLICE_PAGES by simply ignoring it.
     hash_sendpage() is left untouched to be removed later, after the
     splice core has been changed to call sendmsg().

I've pushed the patches here also:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=sendpage-4

David

ver #2)
 - Put the "netfs_" prefix removal first to shorten lines and avoid
   checkpatch 80-char warnings.
 - Fix a couple of spelling mistakes.
 - Wrap some lines at 80 chars.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=51c78a4d532efe9543a4df019ff405f05c6157f6 # part 1
Link: https://lore.kernel.org/r/20230526143104.882842-1-dhowells@redhat.com/ # v1

David Howells (10):
  Drop the netfs_ prefix from netfs_extract_iter_to_sg()
  Fix a couple of spelling mistakes
  Wrap lines at 80
  Move netfs_extract_iter_to_sg() to lib/scatterlist.c
  crypto: af_alg: Pin pages rather than ref'ing if appropriate
  crypto: af_alg: Use extract_iter_to_sg() to create scatterlists
  crypto: af_alg: Indent the loop in af_alg_sendmsg()
  crypto: af_alg: Support MSG_SPLICE_PAGES
  crypto: af_alg: Convert af_alg_sendpage() to use MSG_SPLICE_PAGES
  crypto: af_alg/hash: Support MSG_SPLICE_PAGES

 crypto/af_alg.c         | 185 ++++++++++++---------------
 crypto/algif_aead.c     |  38 +++---
 crypto/algif_hash.c     | 114 +++++++++++------
 crypto/algif_skcipher.c |  10 +-
 fs/cifs/smb2ops.c       |   4 +-
 fs/cifs/smbdirect.c     |   2 +-
 fs/netfs/iterator.c     | 266 ---------------------------------------
 include/crypto/if_alg.h |   7 +-
 include/linux/netfs.h   |   4 -
 include/linux/uio.h     |   5 +
 lib/scatterlist.c       | 269 ++++++++++++++++++++++++++++++++++++++++
 11 files changed, 459 insertions(+), 445 deletions(-)


             reply	other threads:[~2023-05-30 14:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 14:16 David Howells [this message]
2023-05-30 14:16 ` [PATCH net-next v2 01/10] Drop the netfs_ prefix from netfs_extract_iter_to_sg() David Howells
2023-06-06  9:00   ` Paolo Abeni
2023-05-30 14:16 ` [PATCH net-next v2 02/10] Fix a couple of spelling mistakes David Howells
2023-05-30 19:55   ` Simon Horman
2023-05-30 14:16 ` [PATCH net-next v2 03/10] Wrap lines at 80 David Howells
2023-05-30 14:16 ` [PATCH net-next v2 04/10] Move netfs_extract_iter_to_sg() to lib/scatterlist.c David Howells
2023-05-30 14:16 ` [PATCH net-next v2 05/10] crypto: af_alg: Pin pages rather than ref'ing if appropriate David Howells
2023-05-30 14:16 ` [PATCH net-next v2 06/10] crypto: af_alg: Use extract_iter_to_sg() to create scatterlists David Howells
2023-05-30 14:16 ` [PATCH net-next v2 07/10] crypto: af_alg: Indent the loop in af_alg_sendmsg() David Howells
2023-05-30 14:16 ` [PATCH net-next v2 08/10] crypto: af_alg: Support MSG_SPLICE_PAGES David Howells
2023-06-01  9:49   ` Paolo Abeni
2023-06-01 11:35   ` David Howells
2023-06-06  8:32     ` Paolo Abeni
2023-05-30 14:16 ` [PATCH net-next v2 09/10] crypto: af_alg: Convert af_alg_sendpage() to use MSG_SPLICE_PAGES David Howells
2023-05-30 14:16 ` [PATCH net-next v2 10/10] crypto: af_alg/hash: Support MSG_SPLICE_PAGES David Howells
2023-06-06  8:43   ` Herbert Xu
2023-06-06  9:24   ` David Howells
2023-06-06  9:30     ` Herbert Xu
2023-06-06 10:08     ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530141635.136968-1-dhowells@redhat.com \
    --to=dhowells@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.