From: Pavel Begunkov <asml.silence@gmail.com>
To: Mina Almasry <almasrymina@google.com>
Cc: Kaifeng Wang <kaifengw@google.com>,
netdev@vger.kernel.org, edumazet@google.com,
ncardwell@google.com, kuniyu@google.com, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
willemb@google.com, kaiyuanz@google.com, sdf@fomichev.me,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] tcp: reject devmem tx with fastopen and repair
Date: Sat, 24 Oct 2026 15:50:51 +0100 [thread overview]
Message-ID: <b3c2571d-9b20-4f6e-96b6-f3c066af30e2@gmail.com> (raw)
In-Reply-To: <CAHS8izN72w--+5pxxzg44eCOdaeYcJUpXSeJUoqEdZRRq7xPXg@mail.gmail.com>
On 10/21/26 18:15, Mina Almasry wrote:
> On Wed, Oct 21, 2026 at 8:17 AM Pavel Begunkov <asml.silence@gmail.com> wrote:
...>>> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
>>> index 87ef6d5cbfeb..2792923f0748 100644
>>> --- a/net/ipv4/tcp.c
>>> +++ b/net/ipv4/tcp.c
>>> @@ -1169,14 +1169,18 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
>>> zc = MSG_SPLICE_PAGES;
>>> }
>>>
>>> - if (!sockc_err && sockc.dmabuf_id && (zc != MSG_ZEROCOPY || !binding)) {
>>> - err = -EINVAL;
>>> + if (sockc.dmabuf_id && (zc != MSG_ZEROCOPY || !binding)) {
>>
>> I wonder why it does sockc_err checks like that for devmem, e.g. instead of
>> failing earlier. Maybe Mina remembers?
>
> IIRC, Paolo caught an issue where we were subtely changing behavior.
> Like if someone passes in a bad sockc flags, it's usually ignored, but
> if we process the sockc_err before we need it for devmem we change
> behavior for existing users that were passing bad sockc but not using
> devmem.
Got the idea, thanks. Sounds like this chunk can potentially change
it in the same way, though I'd need to look up that thread with
Paolo to be sure.
--
Pavel Begunkov
next prev parent reply other threads:[~2026-10-24 14:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 17:45 Kaifeng Wang
2026-10-20 16:54 ` Stanislav Fomichev
2026-10-21 10:53 ` Paolo Abeni
2026-10-21 12:59 ` Eric Dumazet
2026-10-21 15:17 ` Pavel Begunkov
2026-10-21 17:15 ` Mina Almasry
2026-10-24 14:50 ` Pavel Begunkov [this message]
2026-10-23 19:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3c2571d-9b20-4f6e-96b6-f3c066af30e2@gmail.com \
--to=asml.silence@gmail.com \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kaifengw@google.com \
--cc=kaiyuanz@google.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®