From: Jakub Sitnicki <jakub@cloudflare.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
Cong Wang <cong.wang@bytedance.com>,
Jiang Wang <jiang.wang@bytedance.com>,
Daniel Borkmann <daniel@iogearbox.net>,
"Lorenz Bauer" <lmb@cloudflare.com>
Subject: Re: [Patch bpf v2] skmsg: check sk_rcvbuf limit before queuing to ingress_skb
Date: Sun, 04 Jul 2021 15:10:28 +0200 [thread overview]
Message-ID: <874kdarzqz.fsf@cloudflare.com> (raw)
In-Reply-To: <875yxrs2sc.fsf@cloudflare.com>
On Sat, Jul 03, 2021 at 07:52 PM CEST, Jakub Sitnicki wrote:
[...]
> Then there is the case when a parser prog is attached. In this case the
> skb is really gone if we drop it on redirect.
>
> In sk_psock_strp_read, we ignore the -EIO error from
> sk_psock_verdict_apply, and return to tcp_read_sock how many bytes have
> been parsed.
>
> sk->sk_data_ready
> sk_psock_verdict_data_ready
> ->read_sock(..., sk_psock_verdict_recv)
> tcp_read_sock (used = copied = eaten)
> strp_recv -> ret = eaten
> __strp_recv -> ret = eaten
> strp->cb.rcv_msg -> -EIO
> sk_psock_verdict_apply -> -EIO
> sk_psock_redirect -> -EIO
Copy-paste error. The call chain for the parser case goes as so:
sk->sk_data_ready
sk_psock_strp_data_ready
strp_data_ready
strp_read_sock
->read_sock(..., strp_recv)
tcp_read_sock (used = copied = skb->len)
strp_recv -> ret = skb->len
__strp_recv -> ret = skb->len (dummy parser case)
strp->cb.rcv_msg -> -EIO
sk_psock_verdict_apply -> -EIO
sk_psock_redirect -> -EIO
next prev parent reply other threads:[~2021-07-04 13:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 6:16 [Patch bpf v2] skmsg: check sk_rcvbuf limit before queuing to ingress_skb Cong Wang
2021-07-01 15:56 ` Jakub Sitnicki
2021-07-01 16:26 ` John Fastabend
2021-07-01 16:23 ` John Fastabend
2021-07-01 18:00 ` Cong Wang
2021-07-02 19:33 ` Cong Wang
2021-07-03 17:52 ` Jakub Sitnicki
2021-07-04 13:10 ` Jakub Sitnicki [this message]
2021-07-04 19:53 ` Cong Wang
2021-07-05 8:24 ` Jakub Sitnicki
2021-07-05 16:24 ` John Fastabend
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=874kdarzqz.fsf@cloudflare.com \
--to=jakub@cloudflare.com \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=jiang.wang@bytedance.com \
--cc=john.fastabend@gmail.com \
--cc=lmb@cloudflare.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.