aboutsummaryrefslogtreecommitdiffstats
path: root/net/tls/tls.h
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2023-06-07 18:19:12 +0000
committerJakub Kicinski <[email protected]>2023-06-09 02:40:30 +0000
commitd4c1e80b0d1bacbbca5184f122b9893c5920c598 (patch)
tree7c43ae2ca0148883ac725b16e372d5a8486070bf /net/tls/tls.h
parenttls/sw: Use splice_eof() to flush (diff)
downloadkernel-d4c1e80b0d1bacbbca5184f122b9893c5920c598.tar.gz
kernel-d4c1e80b0d1bacbbca5184f122b9893c5920c598.zip
tls/device: 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/tls/tls.h b/net/tls/tls.h
index 4922668fefaa..d002c3af1966 100644
--- a/net/tls/tls.h
+++ b/net/tls/tls.h
@@ -116,6 +116,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
size_t len, unsigned int flags);
int tls_device_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
+void tls_device_splice_eof(struct socket *sock);
int tls_device_sendpage(struct sock *sk, struct page *page,
int offset, size_t size, int flags);
int tls_tx_records(struct sock *sk, int flags);