Messages in this thread | | | From | David Howells <> | Subject | Re: Bug in short splice to socket? | Date | Fri, 02 Jun 2023 12:44:56 +0100 |
| |
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> Do what I already suggested: making SPLICE_F_MORE reflect reality.
I'm trying to. I need MSG_MORE to behave sensibly for what I want.
What I have signals SPLICE_F_MORE (and thus MSG_MORE) as long as we haven't yet read enough data to fulfill the request - and will break out of the loop if we get a zero-length read.
But this causes a change in behaviour because we then leave the protocol having seen MSG_MORE set where it didn't previously see that.
This causes "tls -r tls.12_aes_gcm.multi_chunk_sendfile" on the TLS kselftest to fail.
Now, if we're fine with the change in behaviour, I can make the selftest observe the short sendfile() and cancel MSG_MORE itself - but that's just a test program.
So that's the question: Do I have to maintain the current behaviour for the short-splice case?
David
| |