diff options
author | David Howells <dhowells@redhat.com> | 2023-06-07 19:19:11 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-08 19:40:30 -0700 |
commit | df720d288dbb1793e82b6ccbfc670ec871e9def4 (patch) | |
tree | d752948d354653b814e344ea2666a9f28e7ba664 /net/tls/tls.h | |
parent | 2bfc66850952b6921b2033b09729ec59eabbc81d (diff) | |
download | lwn-df720d288dbb1793e82b6ccbfc670ec871e9def4.tar.gz lwn-df720d288dbb1793e82b6ccbfc670ec871e9def4.zip |
tls/sw: Use splice_eof() to flush
Allow splice to end a TLS record after prematurely ending a splice/sendfile
due to getting an EOF condition (->splice_read() returned 0) after splice
had called TLS with a sendmsg() with MSG_MORE set when the user didn't set
MSG_MORE.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/CAHk-=wh=V579PDYvkpnTobCLGczbgxpMgGmmhqiTyE34Cpi5Gg@mail.gmail.com/
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Boris Pismenny <borisp@nvidia.com>
cc: John Fastabend <john.fastabend@gmail.com>
cc: Jens Axboe <axboe@kernel.dk>
cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls.h')
-rw-r--r-- | net/tls/tls.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tls/tls.h b/net/tls/tls.h index 0672acab2773..4922668fefaa 100644 --- a/net/tls/tls.h +++ b/net/tls/tls.h @@ -97,6 +97,7 @@ void tls_update_rx_zc_capable(struct tls_context *tls_ctx); void tls_sw_strparser_arm(struct sock *sk, struct tls_context *ctx); void tls_sw_strparser_done(struct tls_context *tls_ctx); int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size); +void tls_sw_splice_eof(struct socket *sock); int tls_sw_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags); int tls_sw_sendpage(struct sock *sk, struct page *page, |