* [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes
@ 2026-10-21 21:07 Günther Noack
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
` (7 more replies)
0 siblings, 8 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
Hello!
This is patch set (A) spun off from the "Documentation fixes in
unix(7)" patch set [1], which is now split into these three parts:
(A) Miscellaneous fixes, mostly in unix.7, one in socket.7 <-- this one
(B) Socket options and Socket-level Control Messages (SCM_*)
(C) sock_diag.7
This patch set fixes miscellaneous inaccuracies and documents missing
error codes. It applies cleanly on the current "master".
Thank you for your reviews on v1 and v2 of the still-joined patch set.
Compared to v2, the following things happened:
* Some commit message rewording (especially quoted the kernel code
more directly).
* In the Abstract UDS scoping commit below, reworded the subsequent
paragraph sligthly to avoid confusion with the "namespace"
terminology being used differently in adjacent paragraphs.
* I removed the commit that changed the wording about Out-of-Band
messaging, per Kuniyuki's suggestion in [2].
This patch set has been produced with the help of a LLM, which was
helpful for spotting a long list of inaccuracies, comparing the
documentation with the kernel implementation. (More details in [1])
–Günther
[1] https://lore.kernel.org/all/20261018173712.27670-1-gnoack3000@gmail.com/
[2] https://lore.kernel.org/all/CAAVpQUBh+J-aBLbkpzT7qmt7B714O529HWcTuQsVLT4wLBnDJA@mail.gmail.com/
Günther Noack (8):
man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to
unix(7)
man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET
man/man7/unix.7: SIOCINQ: Document behavior for SOCK_SEQPACKET
man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM
man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted
man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is
required
man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC,
and EPERM
man/man2/bind.2 | 4 ++-
man/man7/socket.7 | 16 ++++++++--
man/man7/unix.7 | 75 ++++++++++++++++++++++++++++++++++++++++-------
3 files changed, 80 insertions(+), 15 deletions(-)
--
2.56.0
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7)
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-23 18:20 ` Alejandro Colomar
2026-10-24 5:27 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET Günther Noack
` (6 subsequent siblings)
7 siblings, 2 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-man, Günther Noack, Jon Maloy, samanthakumar,
Kuniyuki Iwashima
The option is implemented through proto_ops->set_peek_off, which is
nowadays also set for UDP and TCP sockets:
linux.git 627d2d6b5500 (2016-04-05; "udp: enable MSG_PEEK at non-zero offset")
Linux 4.7, UDP over IPv4 and IPv6
linux.git 05ea491641d3 (2024-04-11; "tcp: add support for SO_PEEK_OFF socket option")
Linux 6.10, TCP over IPv4
linux.git be9a4fb831b8 (2024-08-29; "tcp: add SO_PEEK_OFF socket option tor TCPv6")
Linux 6.12, TCP over IPv6
Cc: Jon Maloy <jmaloy@redhat.com>
Cc: samanthakumar <samanthakumar@google.com>
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
Double checked in code -- this feature has been added to these other
protocols since that man page section was written; I made sure that we
have all relevant commits listed as comments in the man page source.
man/man7/socket.7 | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/man/man7/socket.7 b/man/man7/socket.7
index 96f6f173a40b..ebe0264d7ae4 100644
--- a/man/man7/socket.7
+++ b/man/man7/socket.7
@@ -662,14 +662,24 @@ For more information, see
.TP
.BR SO_PEEK_OFF " (since Linux 3.4)"
.\" commit ef64a54f6e558155b4f149bb10666b9e914b6c54
-This option, which is currently supported only for
-.BR unix (7)
-sockets, sets the value of the "peek offset" for the
+This option sets the value of the "peek offset" for the
.BR recv (2)
system call when used with
.B MSG_PEEK
flag.
.IP
+This option is supported for
+.\" commit f55bb7f9cb82dec2f2e803d7bd0fc5929248e4d8
+.BR unix (7)
+sockets since Linux 3.4,
+.\" commit 627d2d6b550094d88f9e518e15967e7bf906ebbf
+for UDP sockets since Linux 4.7,
+and for TCP sockets since
+.\" commit 05ea491641d338422edbd87af3b311c16ea762f5
+Linux 6.10 (IPv4) and
+.\" commit be9a4fb831b8b6dc5724dd3e61973ea91b413ec1
+Linux 6.12 (IPv6).
+.IP
When this option is set to a negative value
(it is set to \-1 for all new sockets),
traditional behavior is provided:
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:28 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior " Günther Noack
` (5 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-man, Günther Noack, Michael Kerrisk, Kuniyuki Iwashima
SOCK_SEQPACKET sockets use unix_stream_connect() as their connect
operation (as defined in the ops structure unix_seqpacket_ops in
linux.git net/unix/af_unix.c). That function records the peer
credentials for both ends for later lookup.
unix_socketpair() records them for socket pairs of every type.
Connected SOCK_DGRAM sockets (unix_dgram_connect()) still don't record
peer credentials, so those remain excluded.
In the code, the function that initializes the peercred is
init_peercred()/update_peercred().
Fixes: 73b3a5686084 (2005-08-16; "Clarified details of use of SO_PEERCRED.")
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
Double checked in code.
The unix(7) SOCK_SEQPACKET socket type is also connection-oriented and
shares the "connect" logic with SOCK_STREAM sockets.
man/man7/unix.7 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index 1054d7f52a30..d0c1765dfd79 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -342,9 +342,9 @@ feature test macro to obtain the definition of that structure from
.IP
The use of this option is possible only for connected
.B AF_UNIX
-stream sockets and for
+stream and sequenced-packet sockets, and for
.B AF_UNIX
-stream and datagram socket pairs created using
+socket pairs created using
.BR socketpair (2).
.\"
.SS Autobind feature
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior for SOCK_SEQPACKET
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
2026-10-21 21:07 ` [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:34 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace Günther Noack
` (4 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
Document the SIOCINQ behavior for SOCK_SEQPACKET,
which sums up the lengths of all messages in the receive queue.
Restructure sentence order, so that socket type differences are
discussed in on paragraph, and commonalities in the next.
For reference, the SIOCINQ lookup is implemented in
unix_inq_len() in linux.git net/unix/af_unix.c.
This function first rejects SIOCINQ for listening sockets with
-EINVAL, then does a case analysis for the three types of Unix Domain
Sockets:
For SOCK_STREAM, the result is:
return READ_ONCE(unix_sk(sk)->inq_len);
For SOCK_SEQPACKET, the result is calculated using:
skb_queue_walk(&sk->sk_receive_queue, skb)
amount += unix_skb_len(skb);
For SOCK_DGRAM, the result is:
skb = skb_peek(&sk->sk_receive_queue);
if (skb)
amount = skb->len;
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
I double checked this all in the code, and quoted the code. Both the
commit message and commit body were substantially edited based on the
initial LLM-based version. (Nevertheless, I would have likely missed
the inaccuracy if the LLM hadn't found it.)
The LLM initially just slapped an additional sentence into the
paragraph, but that was mixing the socket-type-specific concerns with
the general description -- I split that paragraph apart so that we
have one paragraph for the three socket types and one for the
socket-type-independent description.
man/man7/unix.7 | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index d0c1765dfd79..4c46b54206a5 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -606,6 +606,19 @@ can be:
For
.B SOCK_STREAM
sockets, this call returns the number of unread bytes in the receive buffer.
+For
+.B SOCK_DGRAM
+sockets,
+the returned value is the same as
+for Internet domain datagram sockets;
+see
+.BR udp (7).
+For
+.B SOCK_SEQPACKET
+sockets,
+this call returns the total number of bytes
+in all messages queued in the receive buffer.
+.IP
The socket must not be in LISTEN state, otherwise an error
.RB ( EINVAL )
is returned.
@@ -625,13 +638,6 @@ defined in
.\" That number is normally larger than the number of bytes of pending
.\" output. Since this info is, from userland's point of view, imprecise,
.\" and it may well change, probably best not to document this now.
-For
-.B SOCK_DGRAM
-sockets,
-the returned value is the same as
-for Internet domain datagram sockets;
-see
-.BR udp (7).
.SH ERRORS
.TP
.B EADDRINUSE
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
` (2 preceding siblings ...)
2026-10-21 21:07 ` [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior " Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:39 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM Günther Noack
` (3 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
Point out that Abstract Unix Domain Sockets are visible within the
current network namespace, unlike Named Unix Domain Sockets, where the
remote socket is looked up through the mount namespace.
To avoid confusion, remove the word "namespace" from the subsequent
paragraph, where it is used in a more colloquial form (there is no
abstract socket namespace in the sense of namespaces(7)).
This is already described in network_namespaces(7) as well, but might
be mentionworthy here too.
The lookup of Abtract addresses happens in __unix_find_socket_byname()
in linux.git net/unix/af_unix.c, where it is looked up in the network
namespace (struct net *net) in a hash table in that namespace:
sk_for_each(s, &net->unx.table.buckets[hash]) {
// ...
}
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
Verified in code
man/man7/unix.7 | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index 4c46b54206a5..232fdbf4c3cd 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -257,7 +257,17 @@ has no effect on the accessibility of the socket.
Abstract sockets automatically disappear when all open references
to the socket are closed.
.P
-The abstract socket namespace is a nonportable Linux extension.
+Each network namespace has its own abstract socket namespace (see
+.BR network_namespaces (7)):
+a socket can connect or send to an abstract address
+only if the socket bound to that address
+is in the same network namespace.
+In contrast,
+pathname sockets are not confined to a network namespace;
+they can be reached from any network namespace
+in which the socket file is accessible.
+.P
+Abstract sockets are a nonportable Linux extension.
.\"
.SS Socket options
For historical reasons, these socket options are specified with a
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
` (3 preceding siblings ...)
2026-10-21 21:07 ` [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:44 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted Günther Noack
` (2 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
unix_create() in linux.git net/unix/af_unix.c does:
case SOCK_RAW:
sock->type = SOCK_DGRAM;
fallthrough;
case SOCK_DGRAM:
so both socket(AF_UNIX, SOCK_RAW, 0) and the equivalent socketpair()
invocation succeed and create datagram sockets.
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
For completeness;
It is more complete to spell it out, but on the other hand, people
should not be passing the SOCK_RAW type when they really mean
SOCK_DGRAM. I'm on the fence about whether this is useful. If you
want to omit this one, it also feels reasonable.
man/man7/unix.7 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index 232fdbf4c3cd..29843235def0 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -39,6 +39,11 @@ and (since Linux 2.6.4)
for a sequenced-packet socket that is connection-oriented,
preserves message boundaries,
and delivers messages in the order that they were sent.
+On Linux,
+.B SOCK_RAW
+.\" unix_create() in net/unix/af_unix.c
+is also accepted as an alias for
+.BR SOCK_DGRAM .
.P
UNIX domain sockets support passing file descriptors or process credentials
to other processes using ancillary data.
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
` (4 preceding siblings ...)
2026-10-21 21:07 ` [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:47 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required Günther Noack
2026-10-21 21:08 ` [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM Günther Noack
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
unix_create() in linux.git net/unix/af_unix.c starts with this check:
if (protocol && protocol != PF_UNIX)
return -EPROTONOSUPPORT;
Therefore, not only AF_UNIX (a.k.a. PF_UNIX) is accepted as a protocol
value in the unix(7) socket(2) invocation, but also 0. 0 is the usual
value, and is also given as example in the SYNOPSIS at the top of
unix(7).
Fixes: 9d1fd1157306 (1999-06-15, 2022-12-19; "man-pages 1.24")
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
I double checked it in the code.
man/man7/unix.7 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index 29843235def0..054f1af75dd5 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -729,7 +729,7 @@ or
.BR sendmsg (2).
.TP
.B EPROTONOSUPPORT
-Passed protocol is not
+Passed protocol is neither 0 nor
.BR AF_UNIX .
.TP
.B EPROTOTYPE
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
` (5 preceding siblings ...)
2026-10-21 21:07 ` [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted Günther Noack
@ 2026-10-21 21:07 ` Günther Noack
2026-10-24 5:56 ` Kuniyuki Iwashima
2026-10-21 21:08 ` [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM Günther Noack
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:07 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
In addition to the search permission, binding a named UNIX domain
socket requires write permission on the parent directory. Bring the
wording in line with similar documentation for EACCES on other
syscalls such as mkdir(2), mknod(2), connect(2), link(2) and
rename(2).
Fixes: 9d1fd1157306 (1999-06-15, 2022-12-19; "man-pages 1.24")
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
Reworded commit message and made sure that wording is in-line with
other man pages.
man/man2/bind.2 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/man/man2/bind.2 b/man/man2/bind.2
index ccb77e553cb2..6838a9d164aa 100644
--- a/man/man2/bind.2
+++ b/man/man2/bind.2
@@ -150,7 +150,9 @@ The following errors are specific to UNIX domain
sockets:
.TP
.B EACCES
-Search permission is denied on a component of the path prefix.
+Write permission is denied on the directory
+in which the socket would be created,
+or search permission is denied on a component of the path prefix.
(See also
.BR path_resolution (7).)
.TP
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
` (6 preceding siblings ...)
2026-10-21 21:07 ` [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required Günther Noack
@ 2026-10-21 21:08 ` Günther Noack
2026-10-24 6:03 ` Kuniyuki Iwashima
7 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-21 21:08 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Günther Noack, Kuniyuki Iwashima
These are all returned directly from linux.git net/unix/af_unix.c:
EACCES
unix_find_bsd() checks path_permission(&path, MAY_WRITE) on the
socket file of the remote address. The rule was already described
in prose, but the error was not listed.
EAGAIN
unix_stream_connect() returns -EAGAIN when the listener's backlog
is full and the socket is nonblocking (there is no EINPROGRESS for
AF_UNIX). unix_dgram_sendmsg() returns -EAGAIN when the receiver's
queue is full and the send would block.
EMSGSIZE
unix_dgram_sendmsg() fails if 'len > sk->sk_sndbuf - 32'. This is
the limit described in "Sockets API".
ENOSPC
unix_autobind() fails when all 2^20 autobind names are taken.
EPERM
unix_dgram_connect() and unix_dgram_sendmsg() fail if
!unix_may_send(), that is, if the target datagram socket is
connected to a socket other than the caller's.
This is not something that the remote end normally does,
but it's a possible corner case.
Cc: Kuniyuki Iwashima <kuniyu@google.com>
Assisted-by: LLM
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
Notes:
Verified in code. Kept LLM wording, which seemed OK.
Remark:
The case where the remote end is connected to a different socket is
obscure, but still possible with Unix Domain Sockets, when a program
first bind(2)s to a name, and then connect(2)s to another name. Then
that socket can be discovered by another process through the bound
name, but sending a dgram fails if the sender is not the one that that
socket has connected to.
man/man7/unix.7 | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/man/man7/unix.7 b/man/man7/unix.7
index 054f1af75dd5..79198445c581 100644
--- a/man/man7/unix.7
+++ b/man/man7/unix.7
@@ -655,10 +655,25 @@ defined in
.\" and it may well change, probably best not to document this now.
.SH ERRORS
.TP
+.B EACCES
+The caller does not have write permission on the socket file
+specified as the remote address to
+.BR connect (2)
+or
+.BR sendto (2)
+(see "Pathname socket ownership and permissions", above).
+.TP
.B EADDRINUSE
The specified local address is already in use or the filesystem socket
object already exists.
.TP
+.B EAGAIN
+The socket is nonblocking, and either
+.BR connect (2)
+was called on a stream or sequenced-packet socket
+and the backlog of the listening socket is full,
+or a datagram was sent to a socket whose receive queue is full.
+.TP
.B EBADF
This error can occur for
.BR sendmsg (2)
@@ -694,6 +709,11 @@ invalid state for the applied operation.
called on an already connected socket or a target address was
specified on a connected socket.
.TP
+.B EMSGSIZE
+The datagram to be sent is larger than the limit imposed by the
+.B SO_SNDBUF
+socket option (see "Sockets API", above).
+.TP
.B ENFILE
The system-wide limit on the total number of open files has been reached.
.TP
@@ -705,6 +725,11 @@ did not exist.
.B ENOMEM
Out of memory.
.TP
+.B ENOSPC
+The socket was to be autobound,
+but all autobind addresses are in use
+(see "Autobind feature", above).
+.TP
.B ENOTCONN
Socket operation needs a target address, but the socket is not connected.
.TP
@@ -716,6 +741,13 @@ use the out-of-band data option.
The sender passed invalid credentials in the
.IR "struct ucred" .
.TP
+.B EPERM
+.BR connect (2)
+or
+.BR sendto (2)
+specified a datagram socket as the remote address,
+but that socket is connected to a different socket.
+.TP
.B EPIPE
Remote socket was closed on a stream socket.
If enabled, a
--
2.56.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7)
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
@ 2026-10-23 18:20 ` Alejandro Colomar
2026-10-26 20:48 ` Günther Noack
2026-10-24 5:27 ` Kuniyuki Iwashima
1 sibling, 1 reply; 28+ messages in thread
From: Alejandro Colomar @ 2026-10-23 18:20 UTC (permalink / raw)
To: Günther Noack; +Cc: linux-man, Jon Maloy, samanthakumar, Kuniyuki Iwashima
[-- Attachment #1: Type: text/plain, Size: 2555 bytes --]
Hi,
> Date: 2026-10-21 23:07:53+0200
> From: Günther Noack <gnoack3000@gmail.com>
>
> The option is implemented through proto_ops->set_peek_off, which is
> nowadays also set for UDP and TCP sockets:
>
> linux.git 627d2d6b5500 (2016-04-05; "udp: enable MSG_PEEK at non-zero offset")
> Linux 4.7, UDP over IPv4 and IPv6
> linux.git 05ea491641d3 (2024-04-11; "tcp: add support for SO_PEEK_OFF socket option")
> Linux 6.10, TCP over IPv4
> linux.git be9a4fb831b8 (2024-08-29; "tcp: add SO_PEEK_OFF socket option tor TCPv6")
> Linux 6.12, TCP over IPv6
>
> Cc: Jon Maloy <jmaloy@redhat.com>
> Cc: samanthakumar <samanthakumar@google.com>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
> ---
>
> Notes:
> Double checked in code -- this feature has been added to these other
> protocols since that man page section was written; I made sure that we
> have all relevant commits listed as comments in the man page source.
Actually, I prefer them in the commit message. These days of git(1),
the comments in the source code are less useful and more noise.
Cheers,
Alex
>
> man/man7/socket.7 | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/man/man7/socket.7 b/man/man7/socket.7
> index 96f6f173a40b..ebe0264d7ae4 100644
> --- a/man/man7/socket.7
> +++ b/man/man7/socket.7
> @@ -662,14 +662,24 @@ For more information, see
> .TP
> .BR SO_PEEK_OFF " (since Linux 3.4)"
> .\" commit ef64a54f6e558155b4f149bb10666b9e914b6c54
> -This option, which is currently supported only for
> -.BR unix (7)
> -sockets, sets the value of the "peek offset" for the
> +This option sets the value of the "peek offset" for the
> .BR recv (2)
> system call when used with
> .B MSG_PEEK
> flag.
> .IP
> +This option is supported for
> +.\" commit f55bb7f9cb82dec2f2e803d7bd0fc5929248e4d8
> +.BR unix (7)
> +sockets since Linux 3.4,
> +.\" commit 627d2d6b550094d88f9e518e15967e7bf906ebbf
> +for UDP sockets since Linux 4.7,
> +and for TCP sockets since
> +.\" commit 05ea491641d338422edbd87af3b311c16ea762f5
> +Linux 6.10 (IPv4) and
> +.\" commit be9a4fb831b8b6dc5724dd3e61973ea91b413ec1
> +Linux 6.12 (IPv6).
> +.IP
> When this option is set to a negative value
> (it is set to \-1 for all new sockets),
> traditional behavior is provided:
> --
> 2.56.0
>
>
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7)
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
2026-10-23 18:20 ` Alejandro Colomar
@ 2026-10-24 5:27 ` Kuniyuki Iwashima
1 sibling, 0 replies; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:27 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man, Jon Maloy, samanthakumar
On Wed, 21 Oct 2026 23:07:53 +0200, Günther Noack wrote:
> The option is implemented through proto_ops->set_peek_off, which is
> nowadays also set for UDP and TCP sockets:
>
> linux.git 627d2d6b5500 (2016-04-05; "udp: enable MSG_PEEK at non-zero offset")
> Linux 4.7, UDP over IPv4 and IPv6
> linux.git 05ea491641d3 (2024-04-11; "tcp: add support for SO_PEEK_OFF socket option")
> Linux 6.10, TCP over IPv4
> linux.git be9a4fb831b8 (2024-08-29; "tcp: add SO_PEEK_OFF socket option tor TCPv6")
> Linux 6.12, TCP over IPv6
>
> Cc: Jon Maloy <jmaloy@redhat.com>
> Cc: samanthakumar <samanthakumar@google.com>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET
2026-10-21 21:07 ` [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET Günther Noack
@ 2026-10-24 5:28 ` Kuniyuki Iwashima
0 siblings, 0 replies; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:28 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man, Michael Kerrisk
On Wed, 21 Oct 2026 23:07:54 +0200, Günther Noack wrote:
> SOCK_SEQPACKET sockets use unix_stream_connect() as their connect
> operation (as defined in the ops structure unix_seqpacket_ops in
> linux.git net/unix/af_unix.c). That function records the peer
> credentials for both ends for later lookup.
>
> unix_socketpair() records them for socket pairs of every type.
>
> Connected SOCK_DGRAM sockets (unix_dgram_connect()) still don't record
> peer credentials, so those remain excluded.
>
> In the code, the function that initializes the peercred is
> init_peercred()/update_peercred().
>
> Fixes: 73b3a5686084 (2005-08-16; "Clarified details of use of SO_PEERCRED.")
> Cc: Michael Kerrisk <mtk.manpages@gmail.com>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior for SOCK_SEQPACKET
2026-10-21 21:07 ` [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior " Günther Noack
@ 2026-10-24 5:34 ` Kuniyuki Iwashima
2026-10-26 20:59 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:34 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:07:55 +0200, Günther Noack wrote:
> Document the SIOCINQ behavior for SOCK_SEQPACKET,
> which sums up the lengths of all messages in the receive queue.
>
> Restructure sentence order, so that socket type differences are
> discussed in on paragraph, and commonalities in the next.
>
> For reference, the SIOCINQ lookup is implemented in
> unix_inq_len() in linux.git net/unix/af_unix.c.
>
> This function first rejects SIOCINQ for listening sockets with
> -EINVAL, then does a case analysis for the three types of Unix Domain
> Sockets:
>
> For SOCK_STREAM, the result is:
>
> return READ_ONCE(unix_sk(sk)->inq_len);
>
> For SOCK_SEQPACKET, the result is calculated using:
>
> skb_queue_walk(&sk->sk_receive_queue, skb)
> amount += unix_skb_len(skb);
>
> For SOCK_DGRAM, the result is:
>
> skb = skb_peek(&sk->sk_receive_queue);
> if (skb)
> amount = skb->len;
>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> ---
>
> Notes:
> I double checked this all in the code, and quoted the code. Both the
> commit message and commit body were substantially edited based on the
> initial LLM-based version. (Nevertheless, I would have likely missed
> the inaccuracy if the LLM hadn't found it.)
>
> The LLM initially just slapped an additional sentence into the
> paragraph, but that was mixing the socket-type-specific concerns with
> the general description -- I split that paragraph apart so that we
> have one paragraph for the three socket types and one for the
> socket-type-independent description.
>
> man/man7/unix.7 | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/man/man7/unix.7 b/man/man7/unix.7
> index d0c1765dfd79..4c46b54206a5 100644
> --- a/man/man7/unix.7
> +++ b/man/man7/unix.7
> @@ -606,6 +606,19 @@ can be:
> For
> .B SOCK_STREAM
and SOCK_SEQPACKET
> sockets, this call returns the number of unread bytes in the receive buffer.
> +For
> +.B SOCK_DGRAM
> +sockets,
> +the returned value is the same as
> +for Internet domain datagram sockets;
> +see
> +.BR udp (7).
Simply say it's the length of the first datagram.
so that we don't need to jump to udp doc.
> +For
> +.B SOCK_SEQPACKET
> +sockets,
> +this call returns the total number of bytes
> +in all messages queued in the receive buffer.
> +.IP
> The socket must not be in LISTEN state, otherwise an error
> .RB ( EINVAL )
> is returned.
> @@ -625,13 +638,6 @@ defined in
> .\" That number is normally larger than the number of bytes of pending
> .\" output. Since this info is, from userland's point of view, imprecise,
> .\" and it may well change, probably best not to document this now.
> -For
> -.B SOCK_DGRAM
> -sockets,
> -the returned value is the same as
> -for Internet domain datagram sockets;
> -see
> -.BR udp (7).
> .SH ERRORS
> .TP
> .B EADDRINUSE
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
2026-10-21 21:07 ` [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace Günther Noack
@ 2026-10-24 5:39 ` Kuniyuki Iwashima
2026-10-26 21:11 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:39 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:07:56 +0200, Günther Noack wrote:
> Point out that Abstract Unix Domain Sockets are visible within the
> current network namespace, unlike Named Unix Domain Sockets, where the
s/Named/pathname/.
pathname, unnamed, abstract are used in Address format section.
> remote socket is looked up through the mount namespace.
>
> To avoid confusion, remove the word "namespace" from the subsequent
> paragraph, where it is used in a more colloquial form (there is no
> abstract socket namespace in the sense of namespaces(7)).
The change still uses "abstract socket namespace".
>
> This is already described in network_namespaces(7) as well, but might
> be mentionworthy here too.
>
> The lookup of Abtract addresses happens in __unix_find_socket_byname()
> in linux.git net/unix/af_unix.c, where it is looked up in the network
> namespace (struct net *net) in a hash table in that namespace:
>
> sk_for_each(s, &net->unx.table.buckets[hash]) {
> // ...
> }
>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> ---
>
> Notes:
> Verified in code
>
> man/man7/unix.7 | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/man/man7/unix.7 b/man/man7/unix.7
> index 4c46b54206a5..232fdbf4c3cd 100644
> --- a/man/man7/unix.7
> +++ b/man/man7/unix.7
> @@ -257,7 +257,17 @@ has no effect on the accessibility of the socket.
> Abstract sockets automatically disappear when all open references
> to the socket are closed.
> .P
> -The abstract socket namespace is a nonportable Linux extension.
> +Each network namespace has its own abstract socket namespace (see
> +.BR network_namespaces (7)):
Remove this sentence and...
> +a socket can connect or send to an abstract address
> +only if the socket bound to that address
> +is in the same network namespace.
add "(see network_namespaces (7))" here.
> +In contrast,
> +pathname sockets are not confined to a network namespace;
> +they can be reached from any network namespace
> +in which the socket file is accessible.
> +.P
> +Abstract sockets are a nonportable Linux extension.
> .\"
> .SS Socket options
> For historical reasons, these socket options are specified with a
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM
2026-10-21 21:07 ` [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM Günther Noack
@ 2026-10-24 5:44 ` Kuniyuki Iwashima
2026-10-26 21:13 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:44 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:07:57 +0200, Günther Noack wrote:
> unix_create() in linux.git net/unix/af_unix.c does:
>
> case SOCK_RAW:
> sock->type = SOCK_DGRAM;
> fallthrough;
> case SOCK_DGRAM:
>
> so both socket(AF_UNIX, SOCK_RAW, 0) and the equivalent socketpair()
> invocation succeed and create datagram sockets.
>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> ---
>
> Notes:
> For completeness;
>
> It is more complete to spell it out, but on the other hand, people
> should not be passing the SOCK_RAW type when they really mean
> SOCK_DGRAM. I'm on the fence about whether this is useful. If you
> want to omit this one, it also feels reasonable.
Yes, please drop this patch.
There is fallback but only for a historical reason; just to
support too old BSD program IIRC.
We should not say it's officially supported when it's just
converted to SOCK_DGRAM.
>
> man/man7/unix.7 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/man/man7/unix.7 b/man/man7/unix.7
> index 232fdbf4c3cd..29843235def0 100644
> --- a/man/man7/unix.7
> +++ b/man/man7/unix.7
> @@ -39,6 +39,11 @@ and (since Linux 2.6.4)
> for a sequenced-packet socket that is connection-oriented,
> preserves message boundaries,
> and delivers messages in the order that they were sent.
> +On Linux,
> +.B SOCK_RAW
> +.\" unix_create() in net/unix/af_unix.c
> +is also accepted as an alias for
> +.BR SOCK_DGRAM .
> .P
> UNIX domain sockets support passing file descriptors or process credentials
> to other processes using ancillary data.
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted
2026-10-21 21:07 ` [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted Günther Noack
@ 2026-10-24 5:47 ` Kuniyuki Iwashima
2026-10-26 21:15 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:47 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:07:58 +0200, Günther Noack wrote:
> unix_create() in linux.git net/unix/af_unix.c starts with this check:
>
> if (protocol && protocol != PF_UNIX)
> return -EPROTONOSUPPORT;
>
> Therefore, not only AF_UNIX (a.k.a. PF_UNIX) is accepted as a protocol
> value in the unix(7) socket(2) invocation, but also 0. 0 is the usual
> value, and is also given as example in the SYNOPSIS at the top of
> unix(7).
For the same reason with the previous patch, please drop this change.
It's not worth documenting.
>
> Fixes: 9d1fd1157306 (1999-06-15, 2022-12-19; "man-pages 1.24")
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> ---
>
> Notes:
> I double checked it in the code.
>
> man/man7/unix.7 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man/man7/unix.7 b/man/man7/unix.7
> index 29843235def0..054f1af75dd5 100644
> --- a/man/man7/unix.7
> +++ b/man/man7/unix.7
> @@ -729,7 +729,7 @@ or
> .BR sendmsg (2).
> .TP
> .B EPROTONOSUPPORT
> -Passed protocol is not
> +Passed protocol is neither 0 nor
> .BR AF_UNIX .
> .TP
> .B EPROTOTYPE
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required
2026-10-21 21:07 ` [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required Günther Noack
@ 2026-10-24 5:56 ` Kuniyuki Iwashima
2026-10-24 5:58 ` Kuniyuki Iwashima
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:56 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:07:59 +0200, Günther Noack wrote:
> In addition to the search permission, binding a named UNIX domain
> socket requires write permission on the parent directory. Bring the
> wording in line with similar documentation for EACCES on other
> syscalls such as mkdir(2), mknod(2), connect(2), link(2) and
> rename(2).
>
> Fixes: 9d1fd1157306 (1999-06-15, 2022-12-19; "man-pages 1.24")
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required
2026-10-24 5:56 ` Kuniyuki Iwashima
@ 2026-10-24 5:58 ` Kuniyuki Iwashima
2026-10-26 21:16 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 5:58 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Sat, 24 Oct 2026 05:56:53 +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:07:59 +0200, Günther Noack wrote:
> > In addition to the search permission, binding a named UNIX domain
nit: s/named/pathname/
> > socket requires write permission on the parent directory. Bring the
> > wording in line with similar documentation for EACCES on other
> > syscalls such as mkdir(2), mknod(2), connect(2), link(2) and
> > rename(2).
> >
> > Fixes: 9d1fd1157306 (1999-06-15, 2022-12-19; "man-pages 1.24")
> > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > Assisted-by: LLM
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
>
> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM
2026-10-21 21:08 ` [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM Günther Noack
@ 2026-10-24 6:03 ` Kuniyuki Iwashima
2026-10-26 21:27 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-24 6:03 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Wed, 21 Oct 2026 23:08:00 +0200, Günther Noack wrote:
> These are all returned directly from linux.git net/unix/af_unix.c:
>
> EACCES
> unix_find_bsd() checks path_permission(&path, MAY_WRITE) on the
> socket file of the remote address. The rule was already described
> in prose, but the error was not listed.
>
> EAGAIN
> unix_stream_connect() returns -EAGAIN when the listener's backlog
> is full and the socket is nonblocking (there is no EINPROGRESS for
> AF_UNIX). unix_dgram_sendmsg() returns -EAGAIN when the receiver's
> queue is full and the send would block.
>
> EMSGSIZE
> unix_dgram_sendmsg() fails if 'len > sk->sk_sndbuf - 32'. This is
> the limit described in "Sockets API".
>
> ENOSPC
> unix_autobind() fails when all 2^20 autobind names are taken.
>
> EPERM
> unix_dgram_connect() and unix_dgram_sendmsg() fail if
> !unix_may_send(), that is, if the target datagram socket is
> connected to a socket other than the caller's.
>
> This is not something that the remote end normally does,
> but it's a possible corner case.
>
> Cc: Kuniyuki Iwashima <kuniyu@google.com>
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> ---
>
> Notes:
> Verified in code. Kept LLM wording, which seemed OK.
>
> Remark:
>
> The case where the remote end is connected to a different socket is
> obscure, but still possible with Unix Domain Sockets, when a program
> first bind(2)s to a name, and then connect(2)s to another name. Then
> that socket can be discovered by another process through the bound
> name, but sending a dgram fails if the sender is not the one that that
> socket has connected to.
>
> man/man7/unix.7 | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/man/man7/unix.7 b/man/man7/unix.7
> index 054f1af75dd5..79198445c581 100644
> --- a/man/man7/unix.7
> +++ b/man/man7/unix.7
> @@ -655,10 +655,25 @@ defined in
> .\" and it may well change, probably best not to document this now.
> .SH ERRORS
> .TP
> +.B EACCES
> +The caller does not have write permission on the socket file
If we align with other doc, "write permission is denied..."
> +specified as the remote address to
> +.BR connect (2)
> +or
> +.BR sendto (2)
> +(see "Pathname socket ownership and permissions", above).
> +.TP
> .B EADDRINUSE
> The specified local address is already in use or the filesystem socket
> object already exists.
s/filesystem socket object/file/
Two sockets can have the same address once one's file
is removed even without closing the socket.
> .TP
> +.B EAGAIN
> +The socket is nonblocking, and either
> +.BR connect (2)
> +was called on a stream or sequenced-packet socket
> +and the backlog of the listening socket is full,
> +or a datagram was sent to a socket whose receive queue is full.
> +.TP
> .B EBADF
> This error can occur for
> .BR sendmsg (2)
> @@ -694,6 +709,11 @@ invalid state for the applied operation.
> called on an already connected socket or a target address was
> specified on a connected socket.
> .TP
> +.B EMSGSIZE
> +The datagram to be sent is larger than the limit imposed by the
> +.B SO_SNDBUF
> +socket option (see "Sockets API", above).
> +.TP
> .B ENFILE
> The system-wide limit on the total number of open files has been reached.
> .TP
> @@ -705,6 +725,11 @@ did not exist.
> .B ENOMEM
> Out of memory.
> .TP
> +.B ENOSPC
> +The socket was to be autobound,
> +but all autobind addresses are in use
> +(see "Autobind feature", above).
> +.TP
> .B ENOTCONN
> Socket operation needs a target address, but the socket is not connected.
> .TP
> @@ -716,6 +741,13 @@ use the out-of-band data option.
> The sender passed invalid credentials in the
> .IR "struct ucred" .
> .TP
> +.B EPERM
> +.BR connect (2)
> +or
> +.BR sendto (2)
> +specified a datagram socket as the remote address,
> +but that socket is connected to a different socket.
> +.TP
> .B EPIPE
> Remote socket was closed on a stream socket.
> If enabled, a
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7)
2026-10-23 18:20 ` Alejandro Colomar
@ 2026-10-26 20:48 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 20:48 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: linux-man, Jon Maloy, samanthakumar, Kuniyuki Iwashima
Thank you for the review!
On Fri, Oct 23, 2026 at 08:20:06PM +0200, Alejandro Colomar wrote:
> > Notes:
> > Double checked in code -- this feature has been added to these other
> > protocols since that man page section was written; I made sure that we
> > have all relevant commits listed as comments in the man page source.
>
> Actually, I prefer them in the commit message. These days of git(1),
> the comments in the source code are less useful and more noise.
Fair, I'll drop the newly introduced commit hashes from the source and
list them all in the commit message in a slightly more comprehensive
form (including the Unix commits).
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior for SOCK_SEQPACKET
2026-10-24 5:34 ` Kuniyuki Iwashima
@ 2026-10-26 20:59 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 20:59 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
On Sat, Oct 24, 2026 at 05:34:00AM +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:07:55 +0200, Günther Noack wrote:
> > Document the SIOCINQ behavior for SOCK_SEQPACKET,
> > which sums up the lengths of all messages in the receive queue.
> >
> > Restructure sentence order, so that socket type differences are
> > discussed in on paragraph, and commonalities in the next.
> >
> > For reference, the SIOCINQ lookup is implemented in
> > unix_inq_len() in linux.git net/unix/af_unix.c.
> >
> > This function first rejects SIOCINQ for listening sockets with
> > -EINVAL, then does a case analysis for the three types of Unix Domain
> > Sockets:
> >
> > For SOCK_STREAM, the result is:
> >
> > return READ_ONCE(unix_sk(sk)->inq_len);
> >
> > For SOCK_SEQPACKET, the result is calculated using:
> >
> > skb_queue_walk(&sk->sk_receive_queue, skb)
> > amount += unix_skb_len(skb);
> >
> > For SOCK_DGRAM, the result is:
> >
> > skb = skb_peek(&sk->sk_receive_queue);
> > if (skb)
> > amount = skb->len;
> >
> > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > Assisted-by: LLM
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > ---
> >
> > Notes:
> > I double checked this all in the code, and quoted the code. Both the
> > commit message and commit body were substantially edited based on the
> > initial LLM-based version. (Nevertheless, I would have likely missed
> > the inaccuracy if the LLM hadn't found it.)
> >
> > The LLM initially just slapped an additional sentence into the
> > paragraph, but that was mixing the socket-type-specific concerns with
> > the general description -- I split that paragraph apart so that we
> > have one paragraph for the three socket types and one for the
> > socket-type-independent description.
> >
> > man/man7/unix.7 | 20 +++++++++++++-------
> > 1 file changed, 13 insertions(+), 7 deletions(-)
> >
> > diff --git a/man/man7/unix.7 b/man/man7/unix.7
> > index d0c1765dfd79..4c46b54206a5 100644
> > --- a/man/man7/unix.7
> > +++ b/man/man7/unix.7
> > @@ -606,6 +606,19 @@ can be:
> > For
> > .B SOCK_STREAM
>
> and SOCK_SEQPACKET
OK fair. This was explained a bit below, but maybe too close to the
implementation. When I initially looked at this, I found it a bit
surprising that for SOCK_SEQPACKET, it returns the size of all of them
combined, but for SOCK_DGRAM only the size of the next one.
I'll conflate this as you suggested into "For SOCK_STREAM and
SOCK_SEQPACKET..." (dropping the other sentence about SOCK_SEQPACKET.)
> > sockets, this call returns the number of unread bytes in the receive buffer.
> > +For
> > +.B SOCK_DGRAM
> > +sockets,
> > +the returned value is the same as
> > +for Internet domain datagram sockets;
> > +see
> > +.BR udp (7).
>
> Simply say it's the length of the first datagram.
> so that we don't need to jump to udp doc.
Sounds good, it now reads:
For SOCK_DGRAM sockets, this call returns the size of the next
pending datagram, or 0 when no datagram is pending.
(Using the same wording as udp(7))
> > +For
> > +.B SOCK_SEQPACKET
> > +sockets,
> > +this call returns the total number of bytes
> > +in all messages queued in the receive buffer.
> > +.IP
(Dropped this part as discussed above)
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
2026-10-24 5:39 ` Kuniyuki Iwashima
@ 2026-10-26 21:11 ` Günther Noack
2026-10-27 5:12 ` Kuniyuki Iwashima
0 siblings, 1 reply; 28+ messages in thread
From: Günther Noack @ 2026-10-26 21:11 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
Hello! Thanks for the review!
On Sat, Oct 24, 2026 at 05:39:52AM +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:07:56 +0200, Günther Noack wrote:
> > Point out that Abstract Unix Domain Sockets are visible within the
> > current network namespace, unlike Named Unix Domain Sockets, where the
>
> s/Named/pathname/.
>
> pathname, unnamed, abstract are used in Address format section.
Thanks, fixed.
> > remote socket is looked up through the mount namespace.
> >
> > To avoid confusion, remove the word "namespace" from the subsequent
> > paragraph, where it is used in a more colloquial form (there is no
> > abstract socket namespace in the sense of namespaces(7)).
>
> The change still uses "abstract socket namespace".
In the "Abstract Sockets" section, the word "namespace" is not used
any more in the general sense, but only in the sense of a
setns(2)/namespaces(7) namespace.
There are some places in the man page where the word "namespace" is
still used colloquially, but these are not in the vicinity of this
change and feel less prone to confusion. Do you think I should update
these all in the same commit?
> > This is already described in network_namespaces(7) as well, but might
> > be mentionworthy here too.
> >
> > The lookup of Abtract addresses happens in __unix_find_socket_byname()
> > in linux.git net/unix/af_unix.c, where it is looked up in the network
> > namespace (struct net *net) in a hash table in that namespace:
> >
> > sk_for_each(s, &net->unx.table.buckets[hash]) {
> > // ...
> > }
> >
> > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > Assisted-by: LLM
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > ---
> >
> > Notes:
> > Verified in code
> >
> > man/man7/unix.7 | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/man/man7/unix.7 b/man/man7/unix.7
> > index 4c46b54206a5..232fdbf4c3cd 100644
> > --- a/man/man7/unix.7
> > +++ b/man/man7/unix.7
> > @@ -257,7 +257,17 @@ has no effect on the accessibility of the socket.
> > Abstract sockets automatically disappear when all open references
> > to the socket are closed.
> > .P
> > -The abstract socket namespace is a nonportable Linux extension.
> > +Each network namespace has its own abstract socket namespace (see
> > +.BR network_namespaces (7)):
>
> Remove this sentence and...
>
>
> > +a socket can connect or send to an abstract address
> > +only if the socket bound to that address
> > +is in the same network namespace.
>
> add "(see network_namespaces (7))" here.
Good idea, that's shorter.
> > +In contrast,
> > +pathname sockets are not confined to a network namespace;
> > +they can be reached from any network namespace
> > +in which the socket file is accessible.
> > +.P
> > +Abstract sockets are a nonportable Linux extension.
> > .\"
> > .SS Socket options
> > For historical reasons, these socket options are specified with a
> > --
> > 2.56.0
> >
Thanks,
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM
2026-10-24 5:44 ` Kuniyuki Iwashima
@ 2026-10-26 21:13 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 21:13 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
On Sat, Oct 24, 2026 at 05:44:19AM +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:07:57 +0200, Günther Noack wrote:
> > unix_create() in linux.git net/unix/af_unix.c does:
> >
> > case SOCK_RAW:
> > sock->type = SOCK_DGRAM;
> > fallthrough;
> > case SOCK_DGRAM:
> >
> > so both socket(AF_UNIX, SOCK_RAW, 0) and the equivalent socketpair()
> > invocation succeed and create datagram sockets.
> >
> > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > Assisted-by: LLM
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > ---
> >
> > Notes:
> > For completeness;
> >
> > It is more complete to spell it out, but on the other hand, people
> > should not be passing the SOCK_RAW type when they really mean
> > SOCK_DGRAM. I'm on the fence about whether this is useful. If you
> > want to omit this one, it also feels reasonable.
>
> Yes, please drop this patch.
>
> There is fallback but only for a historical reason; just to
> support too old BSD program IIRC.
>
> We should not say it's officially supported when it's just
> converted to SOCK_DGRAM.
Sounds good, dropping it.
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted
2026-10-24 5:47 ` Kuniyuki Iwashima
@ 2026-10-26 21:15 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 21:15 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
On Sat, Oct 24, 2026 at 05:47:09AM +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:07:58 +0200, Günther Noack wrote:
> > unix_create() in linux.git net/unix/af_unix.c starts with this check:
> >
> > if (protocol && protocol != PF_UNIX)
> > return -EPROTONOSUPPORT;
> >
> > Therefore, not only AF_UNIX (a.k.a. PF_UNIX) is accepted as a protocol
> > value in the unix(7) socket(2) invocation, but also 0. 0 is the usual
> > value, and is also given as example in the SYNOPSIS at the top of
> > unix(7).
>
> For the same reason with the previous patch, please drop this change.
>
> It's not worth documenting.
Fair enough, dropped.
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required
2026-10-24 5:58 ` Kuniyuki Iwashima
@ 2026-10-26 21:16 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 21:16 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
On Sat, Oct 24, 2026 at 05:58:10AM +0000, Kuniyuki Iwashima wrote:
> On Sat, 24 Oct 2026 05:56:53 +0000, Kuniyuki Iwashima wrote:
> > On Wed, 21 Oct 2026 23:07:59 +0200, Günther Noack wrote:
> > > In addition to the search permission, binding a named UNIX domain
>
> nit: s/named/pathname/
Thanks, fixed.
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM
2026-10-24 6:03 ` Kuniyuki Iwashima
@ 2026-10-26 21:27 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-26 21:27 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
Thanks for the review!
On Sat, Oct 24, 2026 at 06:03:02AM +0000, Kuniyuki Iwashima wrote:
> On Wed, 21 Oct 2026 23:08:00 +0200, Günther Noack wrote:
> > These are all returned directly from linux.git net/unix/af_unix.c:
> >
> > EACCES
> > unix_find_bsd() checks path_permission(&path, MAY_WRITE) on the
> > socket file of the remote address. The rule was already described
> > in prose, but the error was not listed.
> >
> > EAGAIN
> > unix_stream_connect() returns -EAGAIN when the listener's backlog
> > is full and the socket is nonblocking (there is no EINPROGRESS for
> > AF_UNIX). unix_dgram_sendmsg() returns -EAGAIN when the receiver's
> > queue is full and the send would block.
> >
> > EMSGSIZE
> > unix_dgram_sendmsg() fails if 'len > sk->sk_sndbuf - 32'. This is
> > the limit described in "Sockets API".
> >
> > ENOSPC
> > unix_autobind() fails when all 2^20 autobind names are taken.
> >
> > EPERM
> > unix_dgram_connect() and unix_dgram_sendmsg() fail if
> > !unix_may_send(), that is, if the target datagram socket is
> > connected to a socket other than the caller's.
> >
> > This is not something that the remote end normally does,
> > but it's a possible corner case.
> >
> > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > Assisted-by: LLM
> > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > ---
> >
> > Notes:
> > Verified in code. Kept LLM wording, which seemed OK.
> >
> > Remark:
> >
> > The case where the remote end is connected to a different socket is
> > obscure, but still possible with Unix Domain Sockets, when a program
> > first bind(2)s to a name, and then connect(2)s to another name. Then
> > that socket can be discovered by another process through the bound
> > name, but sending a dgram fails if the sender is not the one that that
> > socket has connected to.
> >
> > man/man7/unix.7 | 32 ++++++++++++++++++++++++++++++++
> > 1 file changed, 32 insertions(+)
> >
> > diff --git a/man/man7/unix.7 b/man/man7/unix.7
> > index 054f1af75dd5..79198445c581 100644
> > --- a/man/man7/unix.7
> > +++ b/man/man7/unix.7
> > @@ -655,10 +655,25 @@ defined in
> > .\" and it may well change, probably best not to document this now.
> > .SH ERRORS
> > .TP
> > +.B EACCES
> > +The caller does not have write permission on the socket file
>
> If we align with other doc, "write permission is denied..."
Done.
(IIRC, the man pages have similar, but inconsistent, wording for this,
but this is the shorter variant.)
> > +specified as the remote address to
> > +.BR connect (2)
> > +or
> > +.BR sendto (2)
> > +(see "Pathname socket ownership and permissions", above).
> > +.TP
> > .B EADDRINUSE
> > The specified local address is already in use or the filesystem socket
> > object already exists.
>
> s/filesystem socket object/file/
>
> Two sockets can have the same address once one's file
> is removed even without closing the socket.
Sounds good, changed it to "file"; I guess it does not matter what
kind of file is preexisting under the desired name.
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
2026-10-26 21:11 ` Günther Noack
@ 2026-10-27 5:12 ` Kuniyuki Iwashima
2026-10-27 7:58 ` Günther Noack
0 siblings, 1 reply; 28+ messages in thread
From: Kuniyuki Iwashima @ 2026-10-27 5:12 UTC (permalink / raw)
To: Günther Noack; +Cc: Alejandro Colomar, linux-man
On Mon, 26 Oct 2026 22:11:56 +0100, Günther Noack wrote:
> Hello! Thanks for the review!
>
> On Sat, Oct 24, 2026 at 05:39:52AM +0000, Kuniyuki Iwashima wrote:
> > On Wed, 21 Oct 2026 23:07:56 +0200, Günther Noack wrote:
> > > Point out that Abstract Unix Domain Sockets are visible within the
> > > current network namespace, unlike Named Unix Domain Sockets, where the
> >
> > s/Named/pathname/.
> >
> > pathname, unnamed, abstract are used in Address format section.
>
> Thanks, fixed.
>
>
> > > remote socket is looked up through the mount namespace.
> > >
> > > To avoid confusion, remove the word "namespace" from the subsequent
> > > paragraph, where it is used in a more colloquial form (there is no
> > > abstract socket namespace in the sense of namespaces(7)).
> >
> > The change still uses "abstract socket namespace".
>
> In the "Abstract Sockets" section, the word "namespace" is not used
> any more in the general sense, but only in the sense of a
> setns(2)/namespaces(7) namespace.
>
> There are some places in the man page where the word "namespace" is
> still used colloquially, but these are not in the vicinity of this
> change and feel less prone to confusion. Do you think I should update
> these all in the same commit?
I understand the "namespace" itself is a generic word but it
feels a bit odd as it most likely means CLONE_NEWXXX in Linux.
But fixing up all would be apparently boring, so I'll let you
decide, and leaving them as is is 100% fine ;)
>
>
> > > This is already described in network_namespaces(7) as well, but might
> > > be mentionworthy here too.
> > >
> > > The lookup of Abtract addresses happens in __unix_find_socket_byname()
> > > in linux.git net/unix/af_unix.c, where it is looked up in the network
> > > namespace (struct net *net) in a hash table in that namespace:
> > >
> > > sk_for_each(s, &net->unx.table.buckets[hash]) {
> > > // ...
> > > }
> > >
> > > Cc: Kuniyuki Iwashima <kuniyu@google.com>
> > > Assisted-by: LLM
> > > Signed-off-by: Günther Noack <gnoack3000@gmail.com>
> > > ---
> > >
> > > Notes:
> > > Verified in code
> > >
> > > man/man7/unix.7 | 12 +++++++++++-
> > > 1 file changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/man/man7/unix.7 b/man/man7/unix.7
> > > index 4c46b54206a5..232fdbf4c3cd 100644
> > > --- a/man/man7/unix.7
> > > +++ b/man/man7/unix.7
> > > @@ -257,7 +257,17 @@ has no effect on the accessibility of the socket.
> > > Abstract sockets automatically disappear when all open references
> > > to the socket are closed.
> > > .P
> > > -The abstract socket namespace is a nonportable Linux extension.
> > > +Each network namespace has its own abstract socket namespace (see
> > > +.BR network_namespaces (7)):
> >
> > Remove this sentence and...
> >
> >
> > > +a socket can connect or send to an abstract address
> > > +only if the socket bound to that address
> > > +is in the same network namespace.
> >
> > add "(see network_namespaces (7))" here.
>
> Good idea, that's shorter.
>
>
> > > +In contrast,
> > > +pathname sockets are not confined to a network namespace;
> > > +they can be reached from any network namespace
> > > +in which the socket file is accessible.
> > > +.P
> > > +Abstract sockets are a nonportable Linux extension.
> > > .\"
> > > .SS Socket options
> > > For historical reasons, these socket options are specified with a
> > > --
> > > 2.56.0
> > >
>
> Thanks,
> –Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace
2026-10-27 5:12 ` Kuniyuki Iwashima
@ 2026-10-27 7:58 ` Günther Noack
0 siblings, 0 replies; 28+ messages in thread
From: Günther Noack @ 2026-10-27 7:58 UTC (permalink / raw)
To: Kuniyuki Iwashima; +Cc: Alejandro Colomar, linux-man
Thanks for the review!
On Tue, Oct 27, 2026 at 05:12:54AM +0000, Kuniyuki Iwashima wrote:
> On Mon, 26 Oct 2026 22:11:56 +0100, Günther Noack wrote:
> > On Sat, Oct 24, 2026 at 05:39:52AM +0000, Kuniyuki Iwashima wrote:
> > > > remote socket is looked up through the mount namespace.
> > > >
> > > > To avoid confusion, remove the word "namespace" from the subsequent
> > > > paragraph, where it is used in a more colloquial form (there is no
> > > > abstract socket namespace in the sense of namespaces(7)).
> > >
> > > The change still uses "abstract socket namespace".
> >
> > In the "Abstract Sockets" section, the word "namespace" is not used
> > any more in the general sense, but only in the sense of a
> > setns(2)/namespaces(7) namespace.
> >
> > There are some places in the man page where the word "namespace" is
> > still used colloquially, but these are not in the vicinity of this
> > change and feel less prone to confusion. Do you think I should update
> > these all in the same commit?
>
> I understand the "namespace" itself is a generic word but it
> feels a bit odd as it most likely means CLONE_NEWXXX in Linux.
>
> But fixing up all would be apparently boring, so I'll let you
> decide, and leaving them as is is 100% fine ;)
On the other hand, it's not much work either. I'll create a small
extra patch as part of this series to clean up the remaining uses of
namespace. We can discuss that separately then.
–Günther
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-10-27 7:58 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 21:07 [PATCH 0/8] {unix,socket,bind}.7: General Unix Domain Socket fixes Günther Noack
2026-10-21 21:07 ` [PATCH 1/8] man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7) Günther Noack
2026-10-23 18:20 ` Alejandro Colomar
2026-10-26 20:48 ` Günther Noack
2026-10-24 5:27 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 2/8] man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET Günther Noack
2026-10-24 5:28 ` Kuniyuki Iwashima
2026-10-21 21:07 ` [PATCH 3/8] man/man7/unix.7: SIOCINQ: Document behavior " Günther Noack
2026-10-24 5:34 ` Kuniyuki Iwashima
2026-10-26 20:59 ` Günther Noack
2026-10-21 21:07 ` [PATCH 4/8] man/man7/unix.7: Explain Abstract UDS scoping to the network namespace Günther Noack
2026-10-24 5:39 ` Kuniyuki Iwashima
2026-10-26 21:11 ` Günther Noack
2026-10-27 5:12 ` Kuniyuki Iwashima
2026-10-27 7:58 ` Günther Noack
2026-10-21 21:07 ` [PATCH 5/8] man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM Günther Noack
2026-10-24 5:44 ` Kuniyuki Iwashima
2026-10-26 21:13 ` Günther Noack
2026-10-21 21:07 ` [PATCH 6/8] man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted Günther Noack
2026-10-24 5:47 ` Kuniyuki Iwashima
2026-10-26 21:15 ` Günther Noack
2026-10-21 21:07 ` [PATCH 7/8] man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required Günther Noack
2026-10-24 5:56 ` Kuniyuki Iwashima
2026-10-24 5:58 ` Kuniyuki Iwashima
2026-10-26 21:16 ` Günther Noack
2026-10-21 21:08 ` [PATCH 8/8] man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM Günther Noack
2026-10-24 6:03 ` Kuniyuki Iwashima
2026-10-26 21:27 ` Günther Noack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox