On Thu, Jul 30, 2026, at 6:59 AM, Sabrina Dubroca wrote:
> 2026-07-26, 20:33:32 -0400, Chuck Lever wrote:
>> tls_sw_splice_read() currently derives its blocking behavior from
>> SPLICE_F_NONBLOCK alone; the socket's own O_NONBLOCK is invisible
>> to it. A splice(2) call without SPLICE_F_NONBLOCK on a nonblocking
>
> Is that needed?
>
> ssize_t do_splice(struct file *in, loff_t *off_in, struct file *out,
> loff_t *off_out, size_t len, unsigned int flags)
> {
> [...]
> if ((in->f_flags | out->f_flags) & O_NONBLOCK)
> flags |= SPLICE_F_NONBLOCK;
>
> We're not going through do_splice()?
That line is in the "ipipe && opipe" branch, which never involves a
socket. Splicing from a socket to a pipe takes the "else if (opipe)"
branch, and the test there is out->f_flags, the pipe's. The socket is
in, so its O_NONBLOCK is not folded into SPLICE_F_NONBLOCK on this
path.
--
Chuck Lever
- [PATCH net 0/9] net/tls: Receive-path fixes for zero-lengt... Chuck Lever
- [PATCH net 3/9] net/tls: Fail tls_sw_splice_read() af... Chuck Lever
- Re: [PATCH net 3/9] net/tls: Fail tls_sw_splice_r... Jakub Kicinski
- [PATCH net 4/9] net/tls: Honor O_NONBLOCK in tls_sw_s... Chuck Lever
- Re: [PATCH net 4/9] net/tls: Honor O_NONBLOCK in ... Sabrina Dubroca
- Re: [PATCH net 4/9] net/tls: Honor O_NONBLOCK... Chuck Lever
- [PATCH net 1/9] net/tls: Bound time spent on no-data ... Chuck Lever
- Re: [PATCH net 1/9] net/tls: Bound time spent on ... Sabrina Dubroca
- Re: [PATCH net 1/9] net/tls: Bound time spent... Chuck Lever
- Re: [PATCH net 1/9] net/tls: Bound time s... Sabrina Dubroca
- Re: [PATCH net 1/9] net/tls: Bound t... Chuck Lever
- Re: [PATCH net 1/9] net/tls: Bound time spent on ... Jakub Kicinski
- Re: [PATCH net 1/9] net/tls: Bound time spent... Chuck Lever
- Re: [PATCH net 1/9] net/tls: Bound time s... Jakub Kicinski
- [PATCH net 7/9] selftests: tls: skip the zero_len tes... Chuck Lever
- [PATCH net 2/9] net/tls: Consume empty data records i... Chuck Lever
