From: Kuniyuki Iwashima <kuniyu@google.com>
To: netdev-bot+sashiko@kernel.org
Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, kuni1840@gmail.com,
netdev@vger.kernel.org
Subject: Re: [PATCH v1 net-next 2/4] selftests: bpf: sockmap: Remove AF_UNIX MSG_OOB test case.
Date: Wed, 18 Nov 2026 01:43:34 +0000 [thread overview]
Message-ID: <av0Bcx8x4cM5ZLyF@google.com> (raw)
In-Reply-To: <179493597161.3136.12291669288172895358@kernel.org>
On Tue, 17 Nov 2026 17:19:31 +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] In test_redir() and test_send_redir_recv()
> (tools/testing/selftests/bpf/prog_tests/sockmap_redir.c), the patch…
> - [Low] At this commit, the only selftest covering AF_UNIX MSG_OOB with
> sockmap is gone: the `{ AF_UNIX, SOCK_STREAM, MSG_OOB }` entry in…
>
> --
>
> selftests: bpf: sockmap: Remove AF_UNIX MSG_OOB test case.
>
> This commit removes the AF_UNIX SOCK_STREAM MSG_OOB case from the
> sockmap_redir selftest, because MSG_OOB support is going to be dropped
> from AF_UNIX. It also removes the socket_spec.send_flags field, which is
> no longer used, and the OOB handling in test_send_redir_recv() and
> test_socket().
>
> > diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_redir.c b/tools/testing/selftests/bpf/prog_tests/sockmap_redir.c
> > index 9c461d93113db..e73d3a674a741 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/sockmap_redir.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_redir.c
>
> [ ... ]
>
> > @@ -255,20 +251,6 @@ static void test_send_redir_recv(int sd_send, int send_flags, int sd_peer,
> > if (recv_buf != send_buf[0])
> > FAIL("recv(): payload check, %02x != %02x", recv_buf, send_buf[0]);
> >
> > - if (send_flags & MSG_OOB) {
> > - /* Fail reading OOB while in sockmap */
> > - try_recv("bpf.recv(sd_out, MSG_OOB)", sd_out,
> > - MSG_OOB | MSG_DONTWAIT, false);
> > -
> > - /* Remove sd_out from sockmap */
> > - xbpf_map_delete_elem(maps->out, &u32(0));
> > -
> > - /* Check that OOB was dropped on redirect */
> > - try_recv("recv(sd_out, MSG_OOB)", sd_out,
> > - MSG_OOB | MSG_DONTWAIT, false);
> > -
> > - goto del_in;
> > - }
>
> [Severity: Low]
> With these assertions and the { AF_UNIX, SOCK_STREAM, MSG_OOB } entry
> in test_redir() removed, does any selftest still cover AF_UNIX MSG_OOB
> together with sockmap at this commit?
No test is needed anymore, I'm removing it.
>
> The kernel side is still present here. AF_UNIX send(MSG_OOB) still
> works, and unix_stream_bpf_recvmsg() still has the rejection:
>
> net/unix/unix_bpf.c:unix_stream_bpf_recvmsg() {
> ...
> if (flags & MSG_OOB)
> return -EOPNOTSUPP;
This stays in unix_stream_sendmsg() too, but is not worth testing
itself.
> ...
> }
>
> This seems to be intentional and only lasts until the end of the series.
> After the later patch "af_unix: Remove MSG_OOB.", unix_stream_sendmsg()
> and unix_dgram_sendmsg() return -EOPNOTSUPP for MSG_OOB, and the receive
> paths reject it as well. At that point, the "OOB dropped on redirect"
> behaviour checked here no longer exists, and the removed case would fail
> at send().
>
> Removing the test before the feature looks like the right order. This
> note is only about the short coverage gap between the two patches.
>
> [ ... ]
>
> > @@ -365,12 +345,10 @@ static void test_redir(enum bpf_map_type type, struct redir_spec *redir,
> > {
> > struct socket_spec *s, sockets[] = {
> > { AF_INET, SOCK_STREAM },
> > - // { AF_INET, SOCK_STREAM, MSG_OOB }, /* Known to be broken */
>
> [Severity: Low]
> This isn't a bug, but the commit message only mentions the AF_UNIX case
> and send_flags:
>
> Let's remove the test case from sockmap_redir.
>
> Note that struct socket_spec.send_flags is no longer used so
> removed too.
>
> This line also drops the commented-out TCP MSG_OOB entry and its "Known
> to be broken" note. The entry never ran, and without send_flags it could
> not stay as written: MSG_OOB would land in in[0].
>
> Would it be worth mentioning in the commit message that the in-tree note
> about TCP plus sockmap OOB being broken is removed as well?
>
> > { AF_INET6, SOCK_STREAM },
> > { AF_INET, SOCK_DGRAM },
> > { AF_INET6, SOCK_DGRAM },
> > { AF_UNIX, SOCK_STREAM },
> > - { AF_UNIX, SOCK_STREAM, MSG_OOB },
> > { AF_UNIX, SOCK_DGRAM },
>
> [ ... ]
>
> --
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116021845.2533130-1-kuniyu%40google.com
next prev parent reply other threads:[~2026-11-18 1:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 2:18 [PATCH v1 net-next 0/4] af_unix: Drop MSG_OOB support Kuniyuki Iwashima
2026-11-16 2:18 ` [PATCH v1 net-next 1/4] selftests: landlock: Replace MSG_OOB with O_ASYNC+F_SETSIG Kuniyuki Iwashima
2026-11-17 17:19 ` netdev-bot+sashiko
2026-11-18 1:37 ` Kuniyuki Iwashima
2026-11-16 2:18 ` [PATCH v1 net-next 2/4] selftests: bpf: sockmap: Remove AF_UNIX MSG_OOB test case Kuniyuki Iwashima
2026-11-17 17:19 ` netdev-bot+sashiko
2026-11-18 1:43 ` Kuniyuki Iwashima [this message]
2026-11-16 2:18 ` [PATCH v1 net-next 3/4] selftests: af_unix: Remove MSG_OOB tests Kuniyuki Iwashima
2026-11-16 2:18 ` [PATCH v1 net-next 4/4] af_unix: Remove MSG_OOB Kuniyuki Iwashima
2026-11-17 17:19 ` netdev-bot+sashiko
2026-11-18 1:46 ` Kuniyuki Iwashima
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=av0Bcx8x4cM5ZLyF@google.com \
--to=kuniyu@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuni1840@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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