From: Michal Luczaj <mhal@rbox.co>
To: Kuniyuki Iwashima <kuniyu@google.com>
Cc: Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
John Fastabend <john.fastabend@gmail.com>,
Jakub Sitnicki <jakub@cloudflare.com>,
Jiayuan Chen <jiayuan.chen@linux.dev>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Cong Wang <cong.wang@bytedance.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf v2 4/4] selftests/bpf: Fail unbound UDP on sockmap update
Date: Thu, 2 Jul 2026 01:19:17 +0200 [thread overview]
Message-ID: <92dfafa5-3465-458e-b57f-00b23a0f9a46@rbox.co> (raw)
In-Reply-To: <CAAVpQUAJYkOBEtgUpL5UgnwM9Hu3Y57a9xZWRy7zHg5XkGnW5w@mail.gmail.com>
On 6/26/26 23:03, Kuniyuki Iwashima wrote:
> On Fri, Jun 26, 2026 at 1:37 PM Michal Luczaj <mhal@rbox.co> wrote:
>>
>> sockmap now rejects unbound UDP sockets. Adjust test_maps.
>>
>> This effectively reverts commit c39aa2159974 ("bpf, selftests: Fix
>> test_maps now that sockmap supports UDP").
>>
>> Signed-off-by: Michal Luczaj <mhal@rbox.co>
>> ---
>> tools/testing/selftests/bpf/test_maps.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
>> index c32da7bd8be2..81cd5d0d69c1 100644
>> --- a/tools/testing/selftests/bpf/test_maps.c
>> +++ b/tools/testing/selftests/bpf/test_maps.c
>> @@ -759,12 +759,12 @@ static void test_sockmap(unsigned int tasks, void *data)
>> goto out_sockmap;
>> }
>>
>> - /* Test update with unsupported UDP socket */
>> + /* Test update with unsupported unbound UDP socket */
>> udp = socket(AF_INET, SOCK_DGRAM, 0);
>> i = 0;
>> err = bpf_map_update_elem(fd, &i, &udp, BPF_ANY);
>> - if (err) {
>> - printf("Failed socket update SOCK_DGRAM '%i:%i'\n",
>> + if (!err) {
>> + printf("Failed allowed unbound SOCK_DGRAM socket update '%i:%i'\n",
>
> nit: Maybe s/Failed/Unexpectedly succeeded/ ?
Sure. I've tried to align with the other printfs ("failed allowed..."), but
I agree it was unclear.
> If we want to avoid breakage, this patch needs to be squashed to
> the fix patch, but it's discouraged in netdev, not sure about bpf tree.
I guess I'll just post v3 as is, and squash if requested.
thanks,
Michal
next prev parent reply other threads:[~2026-07-01 23:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 20:36 [PATCH bpf v2 0/4] bpf, sockmap: Fix sockmap leaking UDP socks Michal Luczaj
2026-06-26 20:36 ` [PATCH bpf v2 1/4] bpf, sockmap: Reject unhashed UDP sockets on sockmap update Michal Luczaj
2026-06-26 20:45 ` Kuniyuki Iwashima
2026-06-29 11:38 ` Jakub Sitnicki
2026-07-01 22:59 ` John Fastabend
2026-06-26 20:36 ` [PATCH bpf v2 2/4] selftests/bpf: Ensure UDP sockets are bound Michal Luczaj
2026-06-26 20:47 ` Kuniyuki Iwashima
2026-06-28 21:58 ` Michal Luczaj
2026-06-26 20:36 ` [PATCH bpf v2 3/4] selftests/bpf: Adapt sockmap update error handling Michal Luczaj
2026-06-26 20:58 ` Kuniyuki Iwashima
2026-06-28 21:59 ` Michal Luczaj
2026-06-26 21:14 ` bot+bpf-ci
2026-06-26 20:36 ` [PATCH bpf v2 4/4] selftests/bpf: Fail unbound UDP on sockmap update Michal Luczaj
2026-06-26 21:03 ` Kuniyuki Iwashima
2026-07-01 23:19 ` Michal Luczaj [this message]
2026-06-27 17:34 ` [PATCH bpf v2 0/4] bpf, sockmap: Fix sockmap leaking UDP socks sun jian
2026-06-28 22:00 ` Michal Luczaj
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=92dfafa5-3465-458e-b57f-00b23a0f9a46@rbox.co \
--to=mhal@rbox.co \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cong.wang@bytedance.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=emil@etsalapatis.com \
--cc=horms@kernel.org \
--cc=jakub@cloudflare.com \
--cc=jiayuan.chen@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=willemb@google.com \
--cc=yonghong.song@linux.dev \
/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