diff options
| author | David Howells <[email protected]> | 2023-06-07 18:19:11 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-06-09 02:40:30 +0000 |
| commit | df720d288dbb1793e82b6ccbfc670ec871e9def4 (patch) | |
| tree | d752948d354653b814e344ea2666a9f28e7ba664 /net/tls/tls.h | |
| parent | splice, net: Add a splice_eof op to file-ops and socket-ops (diff) | |
| download | kernel-df720d288dbb1793e82b6ccbfc670ec871e9def4.tar.gz kernel-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 <[email protected]>
Link: https://lore.kernel.org/r/CAHk-=wh=V579PDYvkpnTobCLGczbgxpMgGmmhqiTyE34Cpi5Gg@mail.gmail.com/
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Jakub Kicinski <[email protected]>
cc: Chuck Lever <[email protected]>
cc: Boris Pismenny <[email protected]>
cc: John Fastabend <[email protected]>
cc: Jens Axboe <[email protected]>
cc: Matthew Wilcox <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
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, |
