🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18007

Re: [PATCH v1 net-next 2/4] selftests: bpf: sockmap: Remove AF_UNIX MSG_OOB test case.

#18007
From: netdev-bot+sashiko
Date: Tue, 17 Nov 2026 17:19
108 lines
11715 bytes
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?

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 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
Technical Details
Message-ID: <179493597161.3136.12291669288172895358@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365491-linux-kernel-netdev=dewy.ru
References: <20261116021845.2533130-3-kuniyu@google.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365491-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net-next 2/4] selftests: bpf: sockmap: Remove AF_UNIX
 MSG_OOB test case.
Date: Tue, 17 Nov 2026 17:19:31 +0000
Organization: Usenet Network
Message-ID: <179493597161.3136.12291669288172895358@kernel.org>
References: <20261116021845.2533130-3-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2386255"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:rIudytVLeFJhY/AUSF2zzjVm6T8= sha256:G0HiXdtz8qUZo8vmfjnRxst3z2HTwalh8H+zTobREEM=
	sha1:B+ZTQ1QgjoVLc7RNS9mucDg1sBc= sha256:7iSzlWwIJ0dCLO4IIGJtEPzZ9wJs458jkaGdH1ST2rw=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B959C115010; Tue, 17 Nov 2026 20:19:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.5
X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id DvnkdLoqv09y;
	Tue, 17 Nov 2026 20:19:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-365491-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id B877811500D; Tue, 17 Nov 2026 20:19:35 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 3417E60CCC5; Tue, 17 Nov 2026 17:19:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794935973;
	b=owU+4YKvugeoT7qu4NxRDT7TqN91pB7J+jT0qricHg4gCceNEsQm/GUR3KBtNlwj331f
	 X+CEroRLtc5kvPBK+b3AfafvL+aKhQPG6p5WU3C5EEdkLHG/5E2kIsvm2+B9z8PoBUKhP
	 o7vkaWavqctSM4KCMIeRlyls+Z1VSCgDAEb0Dg07NadPbLt0E9EMNX1QxP5f1xJ783fCk
	 mtGYiOZ8UFuuAB1rq7GOWg9k0F+JaYuFjWdn63CzYqy+46lXaNkXqVeQwloaENAUB0253
	 kBDGYuE2JkV2sIgZXI985mmFqvPX/9+nQ4VHRW7NriiV2KxJ4RL+RXz/ZhDL96jBpDQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794935973;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=huFHxyOwSJEeq70j8XuTfasaKzIzpOtIVN2ePHRwlVI=;
	b=llG4HNSHBrR/B8TXsWlWAaz+H9Nr4FILzqGucbjAk9NnlHAEPJ5+J4o4FIli6L6Z2UZM
	 e8b8yKZbqq2AnmyTxvB7oTO9Xks7T+csgxXyscCvoa/VQWsiYX3lCurRzL5KqIVKgfkHI
	 biysKAxDY2URyznRul+QwqTUPOR2NYV2v/YtRbuNLezbHRLaD424JMCLQKtmVNtqfhzNc
	 aHrO0DydgnkXBm46EN6fMksNpT82LcfKFH0CbVdSbBhSBG2AORVUlXgTXAIsDQkVrlFfi
	 6YWb5zUHyXoOlr3YGfAOY2oJV0gNwIDXvJk5qOUeEzhThsPIvRUpYmt3GL7N+bAmKAA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nCHLintG;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D19A606A330;
	Tue, 17 Nov 2026 17:19:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nCHLintG
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794935972;
	b=H7m9fRKylDaoB/a2Lc+h6ZsbB9dCakt2CUpv4C1tMxct21nzXV6ld5rslIVTk/TJC5cY
	 5db/vDeJrYC64RxDDLXijxrkTtN4Abryp91GUv1DFm8Zd07X8wuYaTMsw2nHpti4u7E/L
	 Ef4ZW1wk7E7JX+39cQGYnLuRKI9GnKkasxmuJl5XSuGtffHzHTc6bmlyS00k0tluepDkN
	 c/6d8ziRMhWlx0FAZuiOu1/uP+y9nPDgLf6I8/U7o0khVn1LI02gUPv4Shc1u69USID8o
	 5dMbAU870MMcwHIpaysFwj9YcqNXv9crL7qTuKJZg6jF7K+6o1Vvd0ZD9gMc70QEh0Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794935972;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=huFHxyOwSJEeq70j8XuTfasaKzIzpOtIVN2ePHRwlVI=;
	b=alNK6+4HZvuqxy74HH4ERGWyGqyHL77KimxeLl8L+4ymNnpJfnFU+iXwcLo/ur+ExqwF
	 McwFHSBKIRaOoUc3ZCyG8O534cxOTiVMHk/VjrPW72hh4i8eft6bBzxDvdvbooienTweW
	 DR3ChxUwgixlH2jdWN7eH8uSWlXatM/9/NGJpExMj3h0fVYSB4RRJG+1/xUSTykjt8y7j
	 nvYmd2GUUGle3yvKJ6FRFb6PvqvraSzyNKz0lusI934bLLa6kQFSsmfLxKdieqxG8lcZS
	 /hGt3F6cVziPNsGp6k5cHRH6+nwFnlemc6awhXML6GppGB/xGXeOU6F0QoSU4BbhSQA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nCHLintG;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D503606A334
	for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 17:19:32 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 100641F000CB;
	Tue, 17 Nov 2026 17:19:32 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794935972;
	bh=huFHxyOwSJEeq70j8XuTfasaKzIzpOtIVN2ePHRwlVI=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=nCHLintGCNiF4KRb2IaSPS+XqLo4EM4FX0BNGKoUa5tVOTV8jERZosLpXOA9owL4b
	 6SSCnodMnUT+iEQ92mE5Z3POZVU+l+6sjYlT82pumJd9lDJKBmDb09dpxpz7jCbYpK
	 eLmNu/q89PHFsMA0mkoIlimAu0N0IB7JgmWQbs4W0gPItU7Zzqspf5FDMf1VK1s+0p
	 paNrxH9s4Dv1kpdMuCmR6LJpxl1DarqTsCEzgCjwN5m6ctPfpksfcnXonahVo0l47Y
	 1GX6H1o4dYe5xHt34Hkw5xSS39lD1nTu/z8kE4ZbSGyNlAyED80qY0i3JA1+ZkkhdY
	 9P4aLcoszIV8w==
X-Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
 pabeni@redhat.com, horms@kernel.org, kuni1840@gmail.com,
 netdev@vger.kernel.org
X-In-Reply-To: <20261116021845.2533130-3-kuniyu@google.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list