Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: kuniyu@google.com
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 4/4] af_unix: Remove MSG_OOB.
Date: Tue, 17 Nov 2026 17:19:32 +0000	[thread overview]
Message-ID: <179493597266.3136.6471867064840750751@kernel.org> (raw)
In-Reply-To: <20261116021845.2533130-5-kuniyu@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] This patch removes a userspace-visible AF_UNIX feature with no
  deprecation step and no evidence that nobody uses it.

--

af_unix: Remove MSG_OOB.

This patch removes MSG_OOB support from AF_UNIX stream sockets. It also
removes the CONFIG_AF_UNIX_OOB option, the oob_skb field in struct
unix_sock and the SKB_DROP_REASON_UNIX_SKIP_OOB drop reason. After it,
ioctl(SIOCATMARK), EPOLLPRI and SIGURG on AF_UNIX behave as if
CONFIG_AF_UNIX_OOB=n.

> diff --git a/net/unix/Kconfig b/net/unix/Kconfig
> index 6f1783c1659b8..d378726d5eb92 100644
> --- a/net/unix/Kconfig
> +++ b/net/unix/Kconfig
> @@ -16,13 +16,6 @@ config UNIX
>  
>  	  Say Y unless you know what you are doing.
>  
> -config	AF_UNIX_OOB
> -	bool "UNIX: out-of-bound messages"
> -	depends on UNIX
> -	default y
> -	help
> -	  Support for MSG_OOB in UNIX domain sockets. If unsure, say Y.
> -
>  config UNIX_DIAG
>  	tristate "UNIX: socket monitoring interface"
>  	depends on UNIX
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 96c13682938e1..cc5c7fa40b4d4 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c

[ ... ]

> @@ -2403,12 +2334,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
>  
>  	if (msg->msg_flags & MSG_OOB) {
>  		err = -EOPNOTSUPP;
> -#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
> -		if (len)
> -			len--;
> -		else
> -#endif
> -			goto out_err;
> +		goto out_err;
>  	}

[Severity: Medium]
Could this break existing userspace on kernels built with the default
config?

The removed AF_UNIX_OOB option was default y, and its help text said "If
unsure, say Y". So most kernels since v5.15 have shipped MSG_OOB support
for AF_UNIX SOCK_STREAM sockets. On those kernels:

  send(MSG_OOB) queued a 1-byte OOB skb and raised SIGURG on the peer
  through sk_send_sigurg() in queue_oob()

  recv(MSG_OOB) read the byte back through unix_stream_recv_urg()

  ioctl(SIOCATMARK) reported the mark

  unix_poll() returned EPOLLPRI

After this patch, an unprivileged process that calls send() or recv()
with MSG_OOB on a connected AF_UNIX SOCK_STREAM socket always gets
-EOPNOTSUPP. The send side fails in unix_stream_sendmsg() and the recv
side fails in unix_stream_read_generic(). SIOCATMARK now falls through
to -ENOIOCTLCMD in unix_ioctl(), and EPOLLPRI and SIGURG are never
generated.

The commit message says plainly that these features go away. Its only
argument that nobody depends on them is "there is no clear use case". Is
there evidence that no userspace relies on this behaviour?

Would it be safer to first switch AF_UNIX_OOB to default n, or to warn on
use, for a few releases before deleting the symbol? With the option
removed outright, anyone who hits a regression has no way to turn the
feature back on.

Inside the tree, the series looks consistent. Earlier patches remove or
rewrite the selftests that used MSG_OOB: af_unix msg_oob.c and
scm_rights.c, the bpf sockmap_redir case, and the landlock
scoped_signal_test. No references to AF_UNIX_OOB, UNIX_SKIP_OOB or
oob_skb remain.

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116021845.2533130-1-kuniyu%40google.com

      reply	other threads:[~2026-11-17 17:19 UTC|newest]

Thread overview: 8+ 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-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-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 [this message]

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=179493597266.3136.6471867064840750751@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@google.com \
    --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