[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230526181338.03a99016@kernel.org>
Date: Fri, 26 May 2023 18:13:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Willem de
Bruijn <willemdebruijn.kernel@...il.com>, David Ahern <dsahern@...nel.org>,
Matthew Wilcox <willy@...radead.org>, Jens Axboe <axboe@...nel.dk>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, Chuck Lever
<chuck.lever@...cle.com>, Boris Pismenny <borisp@...dia.com>, John
Fastabend <john.fastabend@...il.com>
Subject: Re: [PATCH net-next 10/12] tls/sw: Convert tls_sw_sendpage() to use
MSG_SPLICE_PAGES
On Wed, 24 May 2023 16:33:09 +0100 David Howells wrote:
> Convert tls_sw_sendpage() and tls_sw_sendpage_locked() to use sendmsg()
> with MSG_SPLICE_PAGES rather than directly splicing in the pages itself.
>
> [!] Note that tls_sw_sendpage_locked() appears to have the wrong locking
> upstream. I think the caller will only hold the socket lock, but it
> should hold tls_ctx->tx_lock too.
Lock ordering, as you probably discovered. It is what it is :|
> + if (msg->msg_flags & ~(MSG_MORE | MSG_DONTWAIT | MSG_NOSIGNAL |
> + MSG_CMSG_COMPAT | MSG_SPLICE_PAGES |
> + MSG_SENDPAGE_NOTLAST | MSG_SENDPAGE_NOPOLICY))
> + return -EOPNOTSUPP;
Now MSG_SENDPAGE_* can leak in thru the sendmsg() call?
Letting MSG_SENDPAGE_NOPOLICY in seems pretty suspicious, no?
Powered by blists - more mailing lists