[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87jzahd5r5.fsf@cloudflare.com>
Date: Sun, 26 Jan 2025 15:11:42 +0100
From: Jakub Sitnicki <jakub@...udflare.com>
To: Jiayuan Chen <mrpre@....com>
Cc: bpf@...r.kernel.org, john.fastabend@...il.com, netdev@...r.kernel.org,
martin.lau@...ux.dev, ast@...nel.org, edumazet@...gle.com,
davem@...emloft.net, dsahern@...nel.org, kuba@...nel.org,
pabeni@...hat.com, linux-kernel@...r.kernel.org, song@...nel.org,
andrii@...nel.org, mhal@...x.co, yonghong.song@...ux.dev,
daniel@...earbox.net, xiyou.wangcong@...il.com, horms@...nel.org,
corbet@....net, eddyz87@...il.com, cong.wang@...edance.com,
shuah@...nel.org, mykolal@...com, jolsa@...nel.org, haoluo@...gle.com,
sdf@...ichev.me, kpsingh@...nel.org, linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf v9 3/5] bpf: disable non stream socket for strparser
On Wed, Jan 22, 2025 at 06:09 PM +08, Jiayuan Chen wrote:
> Currently, only TCP supports strparser, but sockmap doesn't intercept
> non-TCP connections to attach strparser. For example, with UDP, although
> the read/write handlers are replaced, strparser is not executed due to
> the lack of a read_sock operation.
>
> Furthermore, in udp_bpf_recvmsg(), it checks whether the psock has data,
> and if not, it falls back to the native UDP read interface, making
> UDP + strparser appear to read correctly. According to its commit history,
> this behavior is unexpected.
>
> Moreover, since UDP lacks the concept of streams, we intercept it directly.
>
> Fixes: 1fa1fe8ff161 ("bpf, sockmap: Test shutdown() correctly exits epoll and recv()=0")
> Signed-off-by: Jiayuan Chen <mrpre@....com>
> ---
Acked-by: Jakub Sitnicki <jakub@...udflare.com>
Powered by blists - more mailing lists