Documentation fixes in unix(7)
v2 cover Documentation fixes in unix(7)
Hello!
This patch set fixes a variety of inaccuracies in unix(7) and related man pages, clarifies imprecise wording in some places, and adds documentation for some features where documentation was missing (PIDFD passing, SO_PASSRIGHTS).
Alejandro, I am sorry that you don't want to review this any further due to LLM use. For the patch 06/24 where you suspected AI slop, I still think that the commit message was correct before as well [1], but I expanded it in case you want to still take that patch.
I suspect you might be misjudging the level of AI involvement here; while the AI generated the leads on the documentation problems, and generated the initial fixes, I still went through this patch series manually for about a day to read through the associated kernel code and reworded them where needed. I can answer questions on these commits like for any other code review as well.
I'm reposting the entire series with the changes that you requested to 1-6, as well as some smaller commit message fixes to later commits in the patch set (fixed git references, added Fixes: tags, added related commit authors and updated their email addresses in line with the Linux mailmap file).
If you decide to change your mind on your AI contribution policy, we can pick it up from here.
–Günther
[1] https://lore.kernel.org/all/[email protected]/
Original V1 cover letter included below for references:
This patch set fixes a variety of inaccuracies in unix(7) and related man pages, clarifies imprecise wording in some places, and adds documentation for some features where documentation was missing.
Most parts of this patch set are unrelated to each other and can also be applied selectively, if you would prefer to leave some parts out.
Some mentionworthy points about features that were missing or had out of date documentation:
* Out of band messaging support (MSG_OOB):
* This patch set removes a mention that MSG_OOB is *unsupported* in unix(7) on Linux, which was factually wrong.
* unix(7) OOB support can be configured with CONFIG_AF_UNIX_OOB and is therefore not universally available.
* [1] is to my knowledge the only known user - unspecified Oracle products. This was in reply to an attempt where Kuniyuki Iwashima tried to remove the support.
* More bugs/vulnerabilities have been discovered since [2].
* I'm worried that documenting this (and incentivizing its use further) may be counterproductive.
* PIDFD passing support (SCM_PIDFD, SO_PASSPIDFD, SO_PEERPIDFD)
* This feature complements SCM_CREDENTIALS/SO_PEERCRED in that it passed the remote PID as a PIDFD, side-stepping the PID reuse problem and making it race-free.
* I added a commit towards the end documenting that.
* SO_PASSRIGHTS (since 6.16):
* This default-on socket option controls whether the socket owner accepts file descriptors over SCM_RIGHTS. When it is off, the sender gets an EPERM when they try.
* Most people don't receive file descriptors and can turn this off.
* When left on, the receiver process ends up being on the hook for closing these FDs, and it can happen implicitly. When an attacker sends crafted file descriptors, this close operation can take long (flush-on-close() semantics) and keep the receiving process busy.
Some features that I did not document yet, but which are apparently also missing:
* Socket options:
* SO_PEERGROUPS
* SO_PEERSEC (should link to SO_PEERSEC(2const), I guess?)
* SO_INQ / SCM_INQ?
* SO_RIGHTS_NOTRUNC
* Options inheritance across accept(2).
* IOCTLS:
* SIOCUNIXFILE (gives an O_PATH-style FD for the remote end)
* SIOCOUTQ
* SIOCATMARK
Meta-remark on LLM use:
This patch set was written with the help of a LLM, in line with a verbally agreed exception discussed with Alejandro. Because it is to my knowledge the first LLM-assisted contribution, and for full transparency, here are some details on how that went:
The prompts had roughly the following form:
1. "Discover the factual statements in the unix.7 man page and then double check them against the kernel implementation."
* Then, as follow up prompt: "Fix these issues in order of how confident you are about the findings, in one commit each."
2. I asked it separately about the list of AF_UNIX features and socket options that are *not* documented in unix(7) (because that was not part of the original prompt).
3. I asked it to document the PIDFD-related options and SO_PASSRIGHTS, because these seemed important features that deserve more visibility.
For all prompts, the agent had access to the man page repository, the Linux kernel repository, as well as to a skill file (markdown instructions) summarizing the man page style as documented in man-pages(7).
I then went through the list of patches, verified each against the kernel source, and simplified wording where necessary. By and large, the wording was often good. Corrections that I did often took the form of dropping too much detail, and cases where it repeated something in a place that should have been documented in a more central place only and then referenced (e.g., the Autobinding section in unix(7)). A major correction I did was to keep it from documenting the out-of-band messaging support (see reasoning above) -- I was unsure whether that might be counterproductive to a potential deprecation of that feature (but the agent admittedly did not have that context).
Going through these patches by hand was as tedious as it sounds, especially given that these agents also find issues that the human prompter is unfamiliar with... but it's doable. It makes me wonder though whether it would be more productive to use this to flag it to the people who forgot to document their features...
–Günther
[1] https://lore.kernel.org/all/[email protected]/
[2] https://projectzero.google/2025/08/from-chrome-renderer-code-exec-to-kernel.html
Günther Noack (24):
man/man7/unix.7: ERRORS: EINVAL: The address field is sun_family, not
sun_type
man/man7/unix.7: Socket options: SOL_SOCKET is a level, not a family man/man7/unix.7: SO_PASSCRED: ffix
man/man7/sock_diag.7: Fix member order of struct unix_diag_vfs man/man7/sock_diag.7: udiag_wqueue: This is memory in use, not memory
available
man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted man/man7/unix.7: ERRORS: ETOOMANYREFS: Fix the conditions 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/sock_diag.7: udiag_states: Document TCP_CLOSE man/man7/sock_diag.7: UNIX_DIAG_NAME: The payload is not always a
pathname
man/man7/sock_diag.7: Document UDIAG_SHOW_UID man/man7/unix.7: Several items of the same type may be sent in one
message
man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is
required
man/man7/unix.7: Autobind: Fix when it happens, and mention
SO_PASSPIDFD
man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM man/man7/unix.7: SCM_SECURITY: This is not specific to SELinux man/man7/unix.7: SO_PASSSEC: wfix
man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC,
and EPERM
man/man7/unix.7: Abstract sockets are scoped to a network namespace man/man7/unix.7: Remove mentions of unsupported out-of-band messaging man/man7/unix.7: Document SO_PASSPIDFD, SO_PEERPIDFD, and SCM_PIDFD man/man7/unix.7: Document SO_PASSRIGHTS
man/man2/bind.2 | 4 +- man/man7/sock_diag.7 | 40 ++++-- man/man7/socket.7 | 16 ++- man/man7/unix.7 | 308 +++++++++++++++++++++++++++++++++++++------ 4 files changed, 316 insertions(+), 52 deletions(-)
Signature · 1 line
2.56.0
PATCH v2 1/24 man/man7/unix.7: ERRORS: EINVAL: The address field is sun_family, not sun_type
struct sockaddr_un has no sun_type field; the address family is in sun_family, as described in "Address format" above. The check is done by unix_validate_addr() in linux.git net/unix/af_unix.c.
---
Notes:
Fixes an obvious typo
man/man7/unix.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man7/unix.7 +1 -1
@@ -663,7 +663,7 @@ Invalid argument passed. A common cause is that the value .B AF_UNIX was not specified in the -.I sun_type +.I sun_family field of passed addresses, or the socket was in an invalid state for the applied operation. .TP
Signature · 1 line
2.56.0
PATCH v2 2/24 man/man7/unix.7: Socket options: SOL_SOCKET is a level, not a family
In reply to Günther NoackSOL_SOCKET is passed as the "level" argument of getsockopt(2) and setsockopt(2); it is not a socket family. See setsockopt(2).
---
Notes:
Obvious terminology confusion, compare getsockopt(2)
man/man7/unix.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man7/unix.7 +1 -1
@@ -271,7 +271,7 @@ and read with .BR getsockopt (2) by specifying .B SOL_SOCKET -as the socket family. +as the level. .TP .B SO_PASSCRED Enabling this socket option causes receipt of the credentials of
Signature · 1 line
2.56.0
PATCH v2 3/24 man/man7/unix.7: SO_PASSCRED: ffix
In reply to Günther NoackOnly SCM_CREDENTIALS should be set in bold, not the following word.
---
Notes:
This looked unintended.
man/man7/unix.7 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
man/man7/unix.7 +2 -1
@@ -276,7 +276,8 @@ as the level. .B SO_PASSCRED Enabling this socket option causes receipt of the credentials of the sending process in an -.B SCM_CREDENTIALS ancillary +.B SCM_CREDENTIALS +ancillary message in each subsequently received message. The returned credentials are those specified by the sender using .BR SCM_CREDENTIALS ,
Signature · 1 line
2.56.0
PATCH v2 4/24 man/man7/sock_diag.7: Fix member order of struct unix_diag_vfs
In reply to Günther NoackIn the kernel's <linux/unix_diag.h>, udiag_vfs_ino comes before udiag_vfs_dev, and it has been that way since the structure was added in linux.git 5f7b0569460b (2011-12-16; "unix_diag: Unix inode info NLA"). Both members are __u32, so code written after the manual page would silently mix up the inode and the device number.
Also reorder the member descriptions to match.
---
Notes:
Compared against unix_diag.h header,
where the struct field order is different.
man/man7/sock_diag.7 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
man/man7/sock_diag.7 +4 -4
@@ -180,8 +180,8 @@ structure: .in +4n .EX struct unix_diag_vfs { - __u32 udiag_vfs_dev; __u32 udiag_vfs_ino; + __u32 udiag_vfs_dev; }; .EE .in
@@ -189,11 +189,11 @@ struct unix_diag_vfs { The fields of this structure are as follows: .RS .TP -.I udiag_vfs_dev -The device number of the corresponding on-disk socket inode. -.TP .I udiag_vfs_ino The inode number of the corresponding on-disk socket inode. +.TP +.I udiag_vfs_dev +The device number of the corresponding on-disk socket inode. .RE .TP .B UDIAG_SHOW_PEER
Signature · 1 line
2.56.0
Alejandro Colomar
maintainerRe: [PATCH v2 04/24] man/man7/sock_diag.7: Fix member order of struct unix_diag_vfs
Quoted 11 lines
Date: 2026-10-18 19:36:52+0200
From: Günther Noack <[email protected]>In the kernel's <
linux/unix_diag.h>,udiag_vfs_inocomes beforeudiag_vfs_dev, and it has been that way since the structure was added in linux.git5f7b0569460b(2011-12-16; "unix_diag: Unix inode info NLA"). Both members are__u32, so code written after the manual page would silently mix up the inode and the device number.Also reorder the member descriptions to match.
Quoted 7 lines
Fixes 4f6a0a4a909e (2016-12-07; "sock_diag.7: New page documenting NETLINK_SOCK_DIAG interface")Cc Dmitry V. Levin <[email protected]>Cc Pavel Emelyanov <[email protected]>Cc Michael Kerrisk <[email protected]>Assisted-by LLMSigned-off-by Günther Noack <[email protected]>Reviewed-by Alejandro Colomar <[email protected]>
Hi!
Thanks! I've applied patches 1..4.
Have a lovely night!
Alex
Quoted 41 lines
---
Notes:
Compared againstunix_diag.hheader,
where the struct field order is different.man/man7/sock_diag.7 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)man/man7/sock_diag.7 +4
-4@@ -180,8 +180,8 @@ structure: .in +4n .EX struct unix_diag_vfs { - __u32 udiag_vfs_dev; __u32 udiag_vfs_ino; + __u32 udiag_vfs_dev; }; .EE .in@@ -189,11 +189,11 @@ struct unix_diag_vfs { The fields of this structure are as follows: .RS .TP -.I udiag_vfs_dev -The device number of the corresponding on-disk socket inode. -.TP .I udiag_vfs_ino The inode number of the corresponding on-disk socket inode. +.TP +.I udiag_vfs_dev +The device number of the corresponding on-disk socket inode. .RE .TP .B UDIAG_SHOW_PEERSignature · 1 line
2.56.0
Signature · 1 line
<https://www.alejandro-colomar.es>
PATCH v2 5/24 man/man7/sock_diag.7: udiag_wqueue: This is memory in use, not memory available
In reply to Günther NoackThe reported value is equivalent to what SIOCINQ/SIOCOUTQ report, as also discussed in the commit message in linux.git c9da99e6475f (2011-12-30; "unix_diag: Fixup RQLEN extension report"). (Those are socket-flavoured synonyms of TIOCINQ(2const), TIOCOUTQ(2const))
In Linux code, the reasoning is as follows:
* The udiag_wqueue field is set in sk_diag_show_rqlen() in linux.git net/unix/diag.c, where for non-listening sockets, unix_outq_len() is assigned.
* unix_outq_len() in linux.git net/unix/af_unix.c returns sk_wmem_alloc_get().
* sk_wmem_alloc_get() in linux.git include/net/sock.h reads its return value from refcount_read(&sk->sk_wmem_alloc) (with some technical tweaks).
* The field sk_wmem_alloc is documented in the same file as:
@sk_wmem_alloc: transmit queue bytes committed
That this interpretation of sk_wmem_alloc is correct can also be seen in the places where the protocol-specific code adds to it. The UNIX sockets increment sk->sk_wmem_alloc as follows:
* unix_dgram_sendmsg() and unix_stream_sendmsg() in net/unix/af_unix.c invoke sock_alloc_send_pskb()
* sock_alloc_send_pskb() in net/core/sock.c calls skb_set_owner_w()
* skb_set_owner_w() in the same file increments the counter using __refcount_add(skb->truesize, &sk->sk_wmem_alloc, &old_wmem);
---
Notes:
Verified in kernel code; the udiag_wqueue field does indeed have these different semantics -- it's the data already sent, which is still stuck in the output queue, not the maximum size of the output queue.
man/man7/sock_diag.7 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
man/man7/sock_diag.7 +3 -1
@@ -248,7 +248,9 @@ the backlog size which equals to the value passed as the second argument to .BR listen (2). .IP For established sockets: -the amount of memory available for sending. +the amount of memory currently allocated for data +that was sent on this socket +but has not yet been received by the peer. .RE .TP .B UDIAG_SHOW_MEMINFO
Signature · 1 line
2.56.0
PATCH v2 6/24 man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted
In reply to Günther Noackunix_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).
---
Notes:
I double checked it in the code.
man/man7/unix.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man7/unix.7 +1 -1
@@ -708,7 +708,7 @@ or .BR sendmsg (2). .TP .B EPROTONOSUPPORT -Passed protocol is not +Passed protocol is neither 0 nor .BR AF_UNIX . .TP .B EPROTOTYPE
Signature · 1 line
2.56.0
PATCH v2 7/24 man/man7/unix.7: ERRORS: ETOOMANYREFS: Fix the conditions
In reply to Günther NoackThe ETOOMANYREFS error is detected in too_many_unix_fds() in net/unix/af_unix.c when the user's (not the processes') in-flight FDs exceed RLIMIT_NOFILE, and the process has neither CAP_SYS_RESOURCE nor CAP_SYS_ADMIN.
The check was introduced in linux.git 712f4aad406b (2016-01-11; "unix:
properly account for FDs passed over unix sockets").
---
Notes:
Double checked in code -- the condition under which this error is returned was not fully spelled out.
man/man7/unix.7 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
man/man7/unix.7 +6 -2
@@ -732,10 +732,14 @@ when sending a file descriptor as ancillary data over a UNIX domain socket (see the description of .BR SCM_RIGHTS , above). -It occurs if the number of "in-flight" file descriptors exceeds the +It occurs if the number of "in-flight" file descriptors +sent by processes of the caller's real user ID +exceeds the caller's .B RLIMIT_NOFILE -resource limit and the caller does not have the +resource limit and the caller has neither the .B CAP_SYS_RESOURCE +nor the +.B CAP_SYS_ADMIN capability. An in-flight file descriptor is one that has been sent using .BR sendmsg (2)
Signature · 1 line
2.56.0
PATCH v2 8/24 man/man7/socket.7: SO_PEEK_OFF: This option is no longer specific to unix(7)
In reply to Günther NoackThe 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
---
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(-)
man/man7/socket.7 +13 -3
@@ -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:
Signature · 1 line
2.56.0
PATCH v2 9/24 man/man7/unix.7: SO_PEERCRED: Also works for SOCK_SEQPACKET
In reply to Günther NoackSOCK_SEQPACKET sockets use unix_stream_connect() as their connect operation (see unix_seqpacket_ops in linux.git net/unix/af_unix.c), and that function records the peer credentials for both ends. 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.
---
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(-)
man/man7/unix.7 +2 -2
@@ -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
Signature · 1 line
2.56.0
PATCH v2 10/24 man/man7/unix.7: SIOCINQ: Document behavior for SOCK_SEQPACKET
In reply to Günther Noackunix_inq_len() in linux.git net/unix/af_unix.c handles all of SOCK_SOCKET, SOCK_DGRAM and also SOCK_SEQPACKET
* Document 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.
---
Notes:
Double checked in code:
unix_inq_len() first rejects listening sockets, then has a case analysis for the three socket types.
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(-)
man/man7/unix.7 +13 -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
Signature · 1 line
2.56.0
PATCH v2 11/24 man/man7/sock_diag.7: udiag_states: Document TCP_CLOSE
In reply to Günther NoackUNIX sockets can also be in the TCP_CLOSE state and it is possible to query for that with sock_diag's udiag_states. Document that in the description of unix_diag_req (for querying) and unix_diag_msg (for the response).
The implementaiton is in linux.git net/unix/diag.c, where unix_diag_dump() filters on 'req->udiag_states & (1 << sk->sk_state)'.
---
Notes:
The full list of "supported" states here is technically more of an implementation artifact -- the supported states are simply the states that a UNIX socket can assume. So the kernel code does not explicitly check that anywhere, it's just documenting the states that can exist in practice.
The initial LLM phrasing had added a section going into detail about the reasons why a socket might be in TCP_CLOSE state, but it felt like that was anyway obvious, and the phrasing was a bit vague in that it only gave an example. I deleted that sentence and only kept the part that adds the mention of TCP_CLOSE.
man/man7/sock_diag.7 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
man/man7/sock_diag.7 +6 -2
@@ -151,6 +151,9 @@ Supported values are: .P 1 << .B TCP_LISTEN +.P +1 << +.B TCP_CLOSE .RE .TP .I udiag_ino
@@ -307,9 +310,10 @@ or .TP .I udiag_state This is set to one of -.B TCP_LISTEN +.BR TCP_LISTEN , +.BR TCP_ESTABLISHED , or -.BR TCP_ESTABLISHED . +.BR TCP_CLOSE . .TP .I pad This field is set to 0.
Signature · 1 line
2.56.0
PATCH v2 12/24 man/man7/sock_diag.7: UNIX_DIAG_NAME: The payload is not always a pathname
In reply to Günther Noacksk_diag_dump_name() in linux.git net/unix/diag.c copies the sun_path part of the bound address, with length
'addr->len - offsetof(struct sockaddr_un, sun_path)'. For abstract sockets this starts with a null byte and is not a pathname; for pathname sockets, the stored length includes the terminating null byte. For sockets without an address, the attribute is omitted.
---
Notes:
Shortened and simplified the LLM phrasing, which initially also explained the possible valid ways of populating sun_path. That is already adequately explained in unix(7), so I removed that and linked unix(7) instead.
man/man7/sock_diag.7 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
man/man7/sock_diag.7 +7 -3
@@ -169,10 +169,14 @@ attribute as described below: .B UDIAG_SHOW_NAME The attribute reported in answer to this request is .BR UNIX_DIAG_NAME . -The payload associated with this attribute is the pathname to which -the socket was bound (a sequence of bytes up to +The payload associated with this attribute is the +.I sun_path +part of the address to which the socket was bound +(a sequence of bytes up to .B UNIX_PATH_MAX -size). +size, see +.BR unix (7)). +This attribute is not reported for unbound sockets. .TP .B UDIAG_SHOW_VFS The attribute reported in answer to this request is
Signature · 1 line
2.56.0
PATCH v2 13/24 man/man7/sock_diag.7: Document UDIAG_SHOW_UID
In reply to Günther Noacklinux.git cae9910e7344 (2019-05-22; "net: Add UNIX_DIAG_UID to Netlink UNIX socket diagnostics."), first released in Linux 5.3, added the UDIAG_SHOW_UID flag and the UNIX_DIAG_UID attribute. sk_diag_dump_uid() in net/unix/diag.c reports sk_uid(sk) as a uid_t, mapped with from_kuid_munged() into the user namespace of the requesting netlink socket.
---
Notes:
This documents a missing sock_diag feature introduced in 2019.
The phrasing mirrors the phrasing of adjacent sections about other features.
man/man7/sock_diag.7 | 10 ++++++++++ 1 file changed, 10 insertions(+)
man/man7/sock_diag.7 +10 -0
@@ -265,6 +265,16 @@ The attribute reported in answer to this request is .BR UNIX_DIAG_MEMINFO . The payload associated with this attribute is an array of __u32 values described below in the subsection "Socket memory information". +.TP +.BR UDIAG_SHOW_UID " (since Linux 5.3)" +.\" commit cae9910e73446cac68a54e3a7b02aaa12b689026 +The attribute reported in answer to this request is +.BR UNIX_DIAG_UID . +The payload associated with this attribute is a +.I uid_t +value which is the user ID of the owner of the socket, +as seen from the user namespace of the netlink socket +that is used for the query. .P The following attributes are reported back without any specific request: .TP
Signature · 1 line
2.56.0
PATCH v2 14/24 man/man7/unix.7: Several items of the same type may be sent in one message
In reply to Günther Noack__scm_send() in linux.git net/core/scm.c walks all control messages. Each SCM_RIGHTS item is passed to scm_fp_copy(), which appends the file descriptors to the existing scm_fp_list, and fails with EINVAL only if the combined count exceeds SCM_MAX_FD. On the receiving side, scm_detach_fds() emits a single SCM_RIGHTS control message. Each SCM_CREDENTIALS item is validated, and overwrites the credentials of the previous one.
Keep the recommendation as portability advice, and describe the Linux behavior.
---
Notes:
The factual analysis in the commit message is correct.
I kept the LLM phrasing; it did not seem overly wordy to me and the style is in line with the paragraph after it, which also documents Linux-only vs. portable APIs that way.
man/man7/unix.7 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
man/man7/unix.7 +18 -1
@@ -528,7 +528,24 @@ option must be enabled on the socket (see above). .P When sending ancillary data with .BR sendmsg (2), -only one item of each of the above types may be included in the sent message. +portable applications should include +only one item of each of the above types in the sent message. +On Linux, +if several +.B SCM_RIGHTS +items are included, +their file descriptors are combined into a single list, +to which the +.B SCM_MAX_FD +limit applies as a whole, +and the receiver gets them in a single +.B SCM_RIGHTS +item; +if several +.B SCM_CREDENTIALS +items are included, +each of them is checked, +and the last one takes effect. .P At least one byte of real data should be sent when sending ancillary data. On Linux, this is required to successfully send ancillary data over
Signature · 1 line
2.56.0
PATCH v2 15/24 man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is required
In reply to Günther NoackIn 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).
---
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(-)
man/man2/bind.2 +3 -1
@@ -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
Signature · 1 line
2.56.0
PATCH v2 16/24 man/man7/unix.7: Autobind: Fix when it happens, and mention SO_PASSPIDFD
In reply to Günther NoackAutobind happens if either one of SO_PASSCRED/SO_PASSPIDFD is set and either connect() or sendmsg() happens. Mention SO_PASSPIDFD and clarify that autobind does not happen immediately when setting these socket options.
In linux.git net/unix/af_unix.c, the autobind is done by unix_dgram_connect(), unix_stream_connect() and unix_dgram_sendmsg(), if the socket has no address and unix_may_passcred() is true.
unix_may_passcred() is also true when SO_PASSPIDFD is set, which was added in linux.git 5e2ff6704a27 (2023-06-12; "scm: add SO_PASSPIDFD and SCM_PIDFD"), Linux 6.5.
Also, the old text said "not yet connected", but the condition is about the socket not being bound.
---
Notes:
Rephrased the LLM-generated text so that the canonical description is in the "Autobind feature" section and the other place just refers to it.
SO_PASSPIDFD is unfortunately not documented yet at this point in time, but it's still correct to mention it here.
man/man7/unix.7 | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
man/man7/unix.7 +20 -5
@@ -286,8 +286,14 @@ if the sender did not specify .B SCM_CREDENTIALS ancillary data. .IP -When this option is set and the socket is not yet connected, -a unique name in the abstract namespace will be generated automatically. +When this option is set on a socket that is not bound to an address, +the socket is autobound to a unique name in the abstract namespace +when +.BR connect (2) +or +.BR sendmsg (2) +is called on it; +see "Autobind feature", below. .IP The value given as an argument to .BR setsockopt (2)
@@ -355,10 +361,19 @@ call specifies as .IR sizeof(sa_family_t) , .\" i.e., sizeof(short) -or the +or if +.BR connect (2) +or +.BR sendmsg (2) +is called on a socket that was +not explicitly bound to an address +and that has the .B SO_PASSCRED -socket option was specified for a socket that was -not explicitly bound to an address, +or +.\" commit 5e2ff6704a275be009be8979af17c52361b79b89 +.B SO_PASSPIDFD +(since Linux 6.5) +socket option enabled, then the socket is autobound to an abstract address. The address consists of a null byte followed by 5 bytes in the character set
Signature · 1 line
2.56.0
PATCH v2 17/24 man/man7/unix.7: SOCK_RAW is accepted as an alias for SOCK_DGRAM
In reply to Günther Noackunix_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.
---
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(+)
man/man7/unix.7 +5 -0
@@ -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.
Signature · 1 line
2.56.0
PATCH v2 18/24 man/man7/unix.7: SCM_SECURITY: This is not specific to SELinux
In reply to Günther NoackReword the description of SCM_SECURITY to not be specific to SELinux.
The security context is populated in scm_passec() in linux.git net/core/scm.c, through the security_secid_to_secctx() LSM hook, which is currently implemented by SELinux, Smack and AppArmor.
Also clarify the properties of the returned string:
* There is no NAME_MAX limit on the length; SELinux contexts can be longer than that. If the control buffer is too small, put_cmsg() truncates the data and sets MSG_CTRUNC.
* Whether the string is null-terminated also depends on the LSM:
SELinux includes the null byte in the length, but smack_to_secctx() in security/smack/smack_lsm.c uses strlen() and doesn't.
---
Notes:
I reworded the LLM phrasing slightly and rewrote the commit message.
I'm open for feedback about whether this is going into too much detail about the properties of the returned string. Linux does indeed not guarantee that this terminates with a NUL byte, nor that NAME_MAX is large enough to hold it.
man/man7/unix.7 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-)
man/man7/unix.7 +19 -6
@@ -307,7 +307,7 @@ and returned as the result of is an integer boolean flag. .TP .B SO_PASSSEC -Enables receiving of the SELinux security label of the peer socket +Enables receiving of the security label of the peer socket in an ancillary message of type .B SCM_SECURITY (see below).
@@ -534,13 +534,26 @@ message, the option must be enabled on the socket. .TP .B SCM_SECURITY -Receive the SELinux security context (the security label) -of the peer socket. -The received ancillary data is a null-terminated string containing +Receive the security context (the security label) +of the peer socket, +as provided by the active Linux Security Module (LSM), +such as SELinux or Smack. +The received ancillary data is a string containing the security context. -The receiver should allocate at least +Whether the string includes a terminating null byte +depends on the LSM; +the length of the data is given by the +.I cmsg_len +field. +There is no fixed limit on the length of the security context; +allocating .B NAME_MAX -bytes in the data portion of the ancillary message for this data. +bytes in the data portion of the ancillary message +is usually enough. +If the buffer is too small, +the data is truncated and the +.B MSG_CTRUNC +flag is set (see below). .IP To receive the security context, the .B SO_PASSSEC
Signature · 1 line
2.56.0
PATCH v2 19/24 man/man7/unix.7: SO_PASSSEC: wfix
In reply to Günther NoackUse "security context", as in the description of SCM_SECURITY.
--- man/man7/unix.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man7/unix.7 +1 -1
@@ -307,7 +307,7 @@ and returned as the result of is an integer boolean flag. .TP .B SO_PASSSEC -Enables receiving of the security label of the peer socket +Enables receiving of the security context of the peer socket in an ancillary message of type .B SCM_SECURITY (see below).
Signature · 1 line
2.56.0
PATCH v2 20/24 man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC, and EPERM
In reply to Günther NoackThese 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.
---
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(+)
man/man7/unix.7 +32 -0
@@ -690,10 +690,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)
@@ -729,6 +744,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
@@ -740,6 +760,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
@@ -751,6 +776,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
Signature · 1 line
2.56.0
PATCH v2 21/24 man/man7/unix.7: Abstract sockets are scoped to a network namespace
In reply to Günther NoackPoint out that abstract Unix Domain Sockets are visible within the current network namespace.
Abstract addresses are looked up in the per-network-namespace hash table (unix_find_abstract() -> unix_find_socket_byname(net, ...) in linux.git net/unix/af_unix.c), as network_namespaces(7) already mentions.
---
Notes:
Verified in code
man/man7/unix.7 | 10 ++++++++++ 1 file changed, 10 insertions(+)
man/man7/unix.7 +10 -0
@@ -262,6 +262,16 @@ has no effect on the accessibility of the socket. Abstract sockets automatically disappear when all open references to the socket are closed. .P +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 The abstract socket namespace is a nonportable Linux extension. .\" .SS Socket options
Signature · 1 line
2.56.0
PATCH v2 22/24 man/man7/unix.7: Remove mentions of unsupported out-of-band messaging
In reply to Günther NoackLimited support for MSG_OOB was added in linux.git 314001f0bf92 (2021-08-04; "af_unix: Add OOB support").
Its removal was discussed in [1] but has so far not happened.
The support is conditional on the CONFIG_AF_UNIX_OOB kconfig option, so stating that it is supported would also be wrong.
---
Notes:
This one is authored from scratch by hand; in the initial version, the LLM spotted the inaccuracy and then proceeded to document the feature in full glory -- I think it would be the wrong call to propagate the use of a feature whose removal has been discussed already due to low usage and security issues. (See cover letter as well)
man/man7/unix.7 | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
man/man7/unix.7 +2 -11
@@ -401,14 +401,6 @@ The change to 5 bytes came in Linux 2.3.15.) The following paragraphs describe domain-specific details and unsupported features of the sockets API for UNIX domain sockets on Linux. .P -UNIX domain sockets do not support the transmission of -out-of-band data (the -.B MSG_OOB -flag for -.BR send (2) -and -.BR recv (2)). -.P The .BR send (2) .B MSG_MORE
@@ -780,7 +772,8 @@ Socket operation needs a target address, but the socket is not connected. .TP .B EOPNOTSUPP Stream operation called on non-stream oriented socket or tried to -use the out-of-band data option. +use the out-of-band data option +when it isn't supported. .TP .B EPERM The sender passed invalid credentials in the
@@ -883,8 +876,6 @@ at least one byte of nonancillary data in the same or .BR recvmsg (2) call. -.P -UNIX domain stream sockets do not support the notion of out-of-band data. .\" .SH BUGS When binding a socket to an address,
Signature · 1 line
2.56.0
PATCH v2 23/24 man/man7/unix.7: Document SO_PASSPIDFD, SO_PEERPIDFD, and SCM_PIDFD
In reply to Günther NoackThese were added in linux.git 5e2ff6704a27 (2023-06-12; "scm: add SO_PASSPIDFD and SCM_PIDFD") and 7b26952a91cf (2023-06-12; "net: core:
add getsockopt SO_PEERPIDFD"), both in Linux 6.5. They are the PID file descriptor counterparts of SO_PASSCRED/SCM_CREDENTIALS and SO_PEERCRED.
SO_PASSPIDFD
sk_setsockopt() and sk_getsockopt() in net/core/sock.c handle it as a boolean flag for AF_UNIX sockets (EOPNOTSUPP otherwise). Like SO_PASSCRED, it triggers autobind, which was already mentioned in "Autobind feature".
SCM_PIDFD
scm_pidfd_recv() in net/core/scm.c creates the PID file descriptor from scm->pid, which is the PID given in the sender's SCM_CREDENTIALS, or the sender's own PID by default. The fd is created with O_CLOEXEC by pidfd_prepare(). If pidfd_prepare() fails, its negative error number is put into the cmsg data. Sending SCM_PIDFD is rejected by __scm_send() (EINVAL).
Since Linux 6.17, with c679d17d3f2d (2025-07-04; "af_unix:
enable handing out pidfds for reaped tasks in SCM_PIDFD"), PIDFD_STALE is passed, so this also works for reaped processes. Before that, pidfd_prepare() returned -EINVAL for them.
SO_PEERPIDFD
sk_getsockopt() returns a PID file descriptor for sk_peer_pid, or fails with ENODATA if there is none.
Since Linux 6.16, with 20b70e58961b (2025-04-28; "net, pidfs:
enable handing out pidfds for reaped sk->sk_peer_pid"), this also works for reaped processes on AF_UNIX sockets. Before that, it failed with EINVAL.
--- man/man7/unix.7 | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+)
man/man7/unix.7 +101 -0
@@ -316,6 +316,33 @@ and returned as the result of .BR getsockopt (2) is an integer boolean flag. .TP +.BR SO_PASSPIDFD " (since Linux 6.5)" +.\" commit 5e2ff6704a275be009be8979af17c52361b79b89 +Enabling this socket option causes receipt of a PID file descriptor +(see +.BR pidfd_open (2)) +referring to the sending process in an +.B SCM_PIDFD +ancillary message in each subsequently received message +(see below). +.IP +As with +.BR SO_PASSCRED , +when this option is set on a socket that is not bound to an address, +the socket is autobound to a unique name in the abstract namespace +when +.BR connect (2) +or +.BR sendmsg (2) +is called on it; +see "Autobind feature", below. +.IP +The value given as an argument to +.BR setsockopt (2) +and returned as the result of +.BR getsockopt (2) +is an integer boolean flag. +.TP .B SO_PASSSEC Enables receiving of the security context of the peer socket in an ancillary message of type
@@ -367,6 +394,43 @@ stream and sequenced-packet sockets, and for .B AF_UNIX socket pairs created using .BR socketpair (2). +.TP +.BR SO_PEERPIDFD " (since Linux 6.5)" +.\" commit 7b26952a91cf65ff1cc867a2382a8964d8c0ee7d +This read-only socket option returns a new PID file descriptor +(see +.BR pidfd_open (2)) +referring to the peer process connected to this socket. +This is the process whose credentials are returned by +.BR SO_PEERCRED . +Unlike the PID returned by +.BR SO_PEERCRED , +the PID file descriptor cannot come to refer to a different process +if the peer process terminates and its PID is reused. +.IP +The argument to +.BR getsockopt (2) +is a pointer to an +.IR int , +in which the PID file descriptor is returned. +The close-on-exec flag +.RB ( FD_CLOEXEC ) +is set on the new file descriptor. +.IP +If the socket has no peer process, +.BR getsockopt (2) +fails with the error +.BR ENODATA . +.IP +Since Linux 6.16, +.\" commit 20b70e58961b855e61f2c6a7a19a38a64ad1bed6 +a PID file descriptor is returned +even if the peer process has already terminated and been reaped. +Before Linux 6.16, +.BR getsockopt (2) +failed with the error +.B EINVAL +in this case. .\" .SS Autobind feature If a
@@ -535,6 +599,42 @@ message, the .B SO_PASSCRED option must be enabled on the socket. .TP +.BR SCM_PIDFD " (since Linux 6.5)" +.\" commit 5e2ff6704a275be009be8979af17c52361b79b89 +Receive a PID file descriptor +(see +.BR pidfd_open (2)) +referring to the sending process. +The data portion contains a single +.IR int . +The PID file descriptor refers to the process whose PID would be +received in an +.B SCM_CREDENTIALS +message; +if the sender specified +.B SCM_CREDENTIALS +ancillary data, +it refers to the process with the PID given there. +The close-on-exec flag +.RB ( FD_CLOEXEC ) +is set on the new file descriptor. +.IP +If the PID file descriptor cannot be created, +the data portion contains a negative error number instead. +Since Linux 6.17, +.\" commit c679d17d3f2d895b34e660673141ad250889831f +a PID file descriptor is created +even if the sending process has already terminated and been reaped. +Before Linux 6.17, +.B \-EINVAL +was received in this case. +.IP +This message cannot be sent; +it is generated by the kernel. +To receive it, the +.B SO_PASSPIDFD +option must be enabled on the socket. +.TP .B SCM_SECURITY Receive the security context (the security label) of the peer socket,
@@ -1264,6 +1364,7 @@ see and .BR seccomp_unotify (2). .SH SEE ALSO +.BR pidfd_open (2), .BR recvmsg (2), .BR sendmsg (2), .BR socket (2),
Signature · 1 line
2.56.0
PATCH v2 24/24 man/man7/unix.7: Document SO_PASSRIGHTS
In reply to Günther NoackSO_PASSRIGHTS was added in linux.git 77cbe1a6d873 (2025-05-23; "af_unix: Introduce SO_PASSRIGHTS."), in Linux 6.16. It lets a receiver refuse file descriptors passed with SCM_RIGHTS, so that an untrusted peer cannot leave it with file descriptors whose final close() blocks for a long time (for example, a file on a hung NFS mount or a FUSE-controlled file).
The option is enabled by default (unix_create1()). When the receiving socket has it disabled, unix_dgram_sendmsg(), unix_stream_sendmsg(), and queue_oob() fail with EPERM if the message carries file descriptors. The check happens at send time, so messages that are already queued are unaffected.
Also add the new EPERM case to ERRORS.
--- man/man7/unix.7 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
man/man7/unix.7 +37 -0
@@ -343,6 +343,35 @@ and returned as the result of .BR getsockopt (2) is an integer boolean flag. .TP +.BR SO_PASSRIGHTS " (since Linux 6.16)" +.\" commit 77cbe1a6d8730a07f99f9263c2d5f2304cf5e830 +This socket option controls whether the socket accepts +file descriptors from its peers in +.B SCM_RIGHTS +ancillary messages (see below). +It is enabled by default. +When it is disabled, +.BR sendmsg (2) +calls that pass file descriptors to this socket +fail with the error +.BR EPERM . +The option is checked when the message is sent; +disabling it does not affect messages +that are already queued on the socket. +.IP +Processes that do not expect to receive file descriptors +can disable this option. +Once the file descriptors have been passed, +closing them is the responsibility of the receiving process, +and this may block for a long time, +for example for a file on an unresponsive network file system. +.IP +The value given as an argument to +.BR setsockopt (2) +and returned as the result of +.BR getsockopt (2) +is an integer boolean flag. +.TP .B SO_PASSSEC Enables receiving of the security context of the peer socket in an ancillary message of type
@@ -886,6 +915,14 @@ or specified a datagram socket as the remote address, but that socket is connected to a different socket. .TP +.B EPERM +The sender passed file descriptors in an +.B SCM_RIGHTS +ancillary message, +but the receiving socket has the +.B SO_PASSRIGHTS +option disabled. +.TP .B EPIPE Remote socket was closed on a stream socket. If enabled, a
Signature · 1 line
2.56.0
Quoted 7 lines · Günther Noack
Hello!
This patch set fixes a variety of inaccuracies in unix(7) and related man pages, clarifies imprecise wording in some places, and adds documentation for some features where documentation was missing (PIDFD passing,
SO_PASSRIGHTS).
Hi, thanks for working on this.
Quoted 3 lines
Alejandro, I am sorry that you don't want to review this any further due to LLM use.
I understand the frustration since maintainers are getting overwhelmed by too many AI slops these days (I'm not saying this series is) and the review cost is way higher than before.
I'm happy to review this series as a AF_UNIX maintainer to reduce Alejandro's cost, so please CC me on every patch, and CC each author of (relatively) new functionality.
Also, please split the series into 3, general part (socket, bind, protocol stuff, etc), socket diag part, and scm part (SCM_XXX, SO_PASSXXX, etc).
It would be easier for us to review small series than a single large series. (fwiw, netdev mailing list has ~15 patch limit)
Quoted 32 lines
For the patch 06/24 where you suspected AI slop, I
still think that the commit message was correct before as well [1], but I expanded it in case you want to still take that patch.I suspect you might be misjudging the level of AI involvement here; while the AI generated the leads on the documentation problems, and generated the initial fixes, I still went through this patch series manually for about a day to read through the associated kernel code and reworded them where needed. I can answer questions on these commits like for any other code review as well.
I'm reposting the entire series with the changes that you requested to 1-6, as well as some smaller commit message fixes to later commits in the patch set (fixed git references, added Fixes: tags, added related commit authors and updated their email addresses in line with the Linux mailmap file).
If you decide to change your mind on your AI contribution policy, we can pick it up from here.
–Günther
[1] https://lore.kernel.org/all/[email protected]/
Original V1 cover letter included below for references:
This patch set fixes a variety of inaccuracies in unix(7) and related man pages, clarifies imprecise wording in some places, and adds documentation for some features where documentation was missing.
Quoted 7 lines
Most parts of this patch set are unrelated to each other and can also be applied selectively, if you would prefer to leave some parts out.
Some mentionworthy points about features that were missing or had out of date documentation:
* Out of band messaging support (
MSG_OOB):
Please drop these changes. I planned to remove it in the next cycle since recent AI-driven security research targets the poor implementation, and even if the bug is trivial for the plain AF_UNIX, MSG_OOB tends to promote it to UAF (and thus LPE) and risks users for no good reason.
Quoted 86 lines
* This patch set removes a mention that
MSG_OOBis *unsupported* in unix(7) on Linux, which was factually wrong.
* unix(7) OOB support can be configured withCONFIG_AF_UNIX_OOBand is therefore not universally available.
* [1] is to my knowledge the only known user - unspecified Oracle products. This was in reply to an attempt where Kuniyuki Iwashima tried to remove the support.
* More bugs/vulnerabilities have been discovered since [2].
* I'm worried that documenting this (and incentivizing its use further) may be counterproductive.* PIDFD passing support (
SCM_PIDFD,SO_PASSPIDFD,SO_PEERPIDFD)
* This feature complements SCM_CREDENTIALS/SO_PEERCRED in that it passed the remote PID as a PIDFD, side-stepping the PID reuse problem and making it race-free.
* I added a commit towards the end documenting that.*
SO_PASSRIGHTS(since 6.16):
* This default-on socket option controls whether the socket owner accepts file descriptors overSCM_RIGHTS. When it is off, the sender gets an EPERM when they try.
* Most people don't receive file descriptors and can turn this off.
* When left on, the receiver process ends up being on the hook for closing these FDs, and it can happen implicitly. When an attacker sends crafted file descriptors, this close operation can take long (flush-on-close() semantics) and keep the receiving process busy.Some features that I did not document yet, but which are apparently also missing:
* Socket options:
*SO_PEERGROUPS
*SO_PEERSEC(should link toSO_PEERSEC(2const), I guess?)
*SO_INQ/SCM_INQ?
*SO_RIGHTS_NOTRUNC
* Options inheritance across accept(2).
* IOCTLS:
* SIOCUNIXFILE (gives an O_PATH-style FD for the remote end)
* SIOCOUTQ
* SIOCATMARKMeta-remark on LLM use:
This patch set was written with the help of a LLM, in line with a verbally agreed exception discussed with Alejandro. Because it is to my knowledge the first LLM-assisted contribution, and for full transparency, here are some details on how that went:
The prompts had roughly the following form:
1. "Discover the factual statements in the unix.7 man page and then double check them against the kernel implementation."
* Then, as follow up prompt: "Fix these issues in order of how confident you are about the findings, in one commit each."
2. I asked it separately about the list ofAF_UNIXfeatures and socket options that are *not* documented in unix(7) (because that was not part of the original prompt).
3. I asked it to document the PIDFD-related options andSO_PASSRIGHTS, because these seemed important features that deserve more visibility.For all prompts, the agent had access to the man page repository, the Linux kernel repository, as well as to a skill file (markdown instructions) summarizing the man page style as documented in man-pages(7).
I then went through the list of patches, verified each against the kernel source, and simplified wording where necessary. By and large, the wording was often good. Corrections that I did often took the form of dropping too much detail, and cases where it repeated something in a place that should have been documented in a more central place only and then referenced (e.g., the Autobinding section in unix(7)). A major correction I did was to keep it from documenting the out-of-band messaging support (see reasoning above) -- I was unsure whether that might be counterproductive to a potential deprecation of that feature (but the agent admittedly did not have that context).
Going through these patches by hand was as tedious as it sounds, especially given that these agents also find issues that the human prompter is unfamiliar with... but it's doable. It makes me wonder though whether it would be more productive to use this to flag it to the people who forgot to document their features...
–Günther
Quoted 6 lines
[1] https://lore.kernel.org/all/[email protected]/
[2] https://projectzero.google/2025/08/from-chrome-renderer-code-exec-to-kernel.htmlGünther Noack (24):
man/man7/unix.7: ERRORS: EINVAL: The address field issun_family, not
sun_type
Correct the address field s/sun_family/sun_type/
It seems the subjects are not formatted well, which makes me feel AI cannot follow the standard and it is not worth reviewing :/
Quoted 1 line
man/man7/unix.7: Socket options:
SOL_SOCKETis a level, not a family
Describe SOL_SOCKET as socket level, not family
Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix
?? This reminds me of Final Fantasy IX :p
Please fix all of them.
Quoted 38 lines
man/man7/sock_diag.7: Fix member order of struct
unix_diag_vfsman/man7/sock_diag.7:udiag_wqueue: This is memory in use, not memory
available
man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted man/man7/unix.7: ERRORS: ETOOMANYREFS: Fix the conditions man/man7/socket.7:SO_PEEK_OFF: This option is no longer specific tounix(7)man/man7/unix.7:
SO_PEERCRED: Also works forSOCK_SEQPACKETman/man7/unix.7: SIOCINQ: Document behavior forSOCK_SEQPACKETman/man7/sock_diag.7:udiag_states: DocumentTCP_CLOSEman/man7/sock_diag.7:UNIX_DIAG_NAME: The payload is not always a
pathname
man/man7/sock_diag.7: DocumentUDIAG_SHOW_UIDman/man7/unix.7: Several items of the same type may be sent in one
message
man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is
required
man/man7/unix.7: Autobind: Fix when it happens, and mention
SO_PASSPIDFD
man/man7/unix.7:SOCK_RAWis accepted as an alias forSOCK_DGRAMman/man7/unix.7:SCM_SECURITY: This is not specific to SELinux man/man7/unix.7:SO_PASSSEC: wfix
man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC,
and EPERM
man/man7/unix.7: Abstract sockets are scoped to a network namespace man/man7/unix.7: Remove mentions of unsupported out-of-band messaging man/man7/unix.7: DocumentSO_PASSPIDFD,SO_PEERPIDFD, andSCM_PIDFDman/man7/unix.7: DocumentSO_PASSRIGHTSman/man2/bind.2 | 4 +- man/man7/sock_diag.7 | 40 ++++-- man/man7/socket.7 | 16 ++- man/man7/unix.7 | 308 +++++++++++++++++++++++++++++++++++++------ 4 files changed, 316 insertions(+), 52 deletions(-)--
2.56.0
Alejandro Colomar
maintainerHi Kuniyuki,
Quoted 19 lines
Date: 2026-10-18 11:37:16-0700
From: Kuniyuki Iwashima <[email protected]>Quoted 7 lines · Günther Noack
Hello!
This patch set fixes a variety of inaccuracies in unix(7) and related man pages, clarifies imprecise wording in some places, and adds documentation for some features where documentation was missing (PIDFD passing,
SO_PASSRIGHTS).Hi, thanks for working on this.
Quoted 3 lines
Alejandro, I am sorry that you don't want to review this any further due to LLM use.
Quoted 7 lines
I understand the frustration since maintainers are getting overwhelmed by too many AI slops these days (I'm not saying this series is) and the review cost is way higher than before.
I'm happy to review this series as a
AF_UNIXmaintainer to reduce Alejandro's cost, so please CC me on every patch, and CC each author of (relatively) new functionality.
Thanks a lot!
Quoted 6 lines
Also, please split the series into 3, general part (socket, bind, protocol stuff, etc), socket diag part, and scm part (
SCM_XXX,SO_PASSXXX, etc).It would be easier for us to review small series than a single large series. (fwiw, netdev mailing list has ~15 patch limit)
I'm okay with a split.
[...]
Quoted 12 lines
Quoted 4 lines
Some mentionworthy points about features that were missing or had out of date documentation:
* Out of band messaging support (
MSG_OOB):Please drop these changes. I planned to remove it in the next cycle since recent AI-driven security research targets the poor implementation, and even if the bug is trivial for the plain
AF_UNIX,MSG_OOBtends to promote it to UAF (and thus LPE) and risks users for no good reason.
[...]
Quoted 8 lines
Quoted 6 lines
[1] https://lore.kernel.org/all/[email protected]/
[2] https://projectzero.google/2025/08/from-chrome-renderer-code-exec-to-kernel.htmlGünther Noack (24):
man/man7/unix.7: ERRORS: EINVAL: The address field issun_family, not
sun_typeCorrect the address field s/sun_family/sun_type/
I think you meant s/sun_type/sun_family/?
Quoted 2 lines
It seems the subjects are not formatted well, which makes me feel AI cannot follow the standard and it is not worth reviewing :/
The subjects seem okay to me. In the man-pages, we use slightly different conventions than in the kernel, so I guess that's why it seems strange to you. :)
Quoted 4 lines
Quoted 2 lines
man/man7/unix.7: Socket options:
SOL_SOCKETis a level, not a familyDescribe
SOL_SOCKETas socket level, not family
To my own understanding, I'll ask: technically, SOL_SOCKET (like any SOL_*) is a protocol level. The socket level is just one of the many protocol levels, right?
Quoted 5 lines
Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix?? This reminds me of Final Fantasy IX :p
Please fix all of them.
We use 'ffix' as a shorthand for 'formatting fix'. Those patches usually make something bold, or remove bold, but don't do anything meaningful to the page.
Have a lovely day!
Alex
Quoted 39 lines
Quoted 38 lines
man/man7/sock_diag.7: Fix member order of struct
unix_diag_vfsman/man7/sock_diag.7:udiag_wqueue: This is memory in use, not memory
available
man/man7/unix.7: ERRORS: EPROTONOSUPPORT: Protocol 0 is also accepted man/man7/unix.7: ERRORS: ETOOMANYREFS: Fix the conditions man/man7/socket.7:SO_PEEK_OFF: This option is no longer specific tounix(7)man/man7/unix.7:
SO_PEERCRED: Also works forSOCK_SEQPACKETman/man7/unix.7: SIOCINQ: Document behavior forSOCK_SEQPACKETman/man7/sock_diag.7:udiag_states: DocumentTCP_CLOSEman/man7/sock_diag.7:UNIX_DIAG_NAME: The payload is not always a
pathname
man/man7/sock_diag.7: DocumentUDIAG_SHOW_UIDman/man7/unix.7: Several items of the same type may be sent in one
message
man/man2/bind.2: ERRORS: EACCES: Write permission on the directory is
required
man/man7/unix.7: Autobind: Fix when it happens, and mention
SO_PASSPIDFD
man/man7/unix.7:SOCK_RAWis accepted as an alias forSOCK_DGRAMman/man7/unix.7:SCM_SECURITY: This is not specific to SELinux man/man7/unix.7:SO_PASSSEC: wfix
man/man7/unix.7: ERRORS: Document EACCES, EAGAIN, EMSGSIZE, ENOSPC,
and EPERM
man/man7/unix.7: Abstract sockets are scoped to a network namespace man/man7/unix.7: Remove mentions of unsupported out-of-band messaging man/man7/unix.7: DocumentSO_PASSPIDFD,SO_PEERPIDFD, andSCM_PIDFDman/man7/unix.7: DocumentSO_PASSRIGHTSman/man2/bind.2 | 4 +- man/man7/sock_diag.7 | 40 ++++-- man/man7/socket.7 | 16 ++- man/man7/unix.7 | 308 +++++++++++++++++++++++++++++++++++++------ 4 files changed, 316 insertions(+), 52 deletions(-)--
2.56.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Hello Alejandro and Kuniyuki!
Quoted 10 lines · Alejandro Colomar
Quoted 10 lines
Date: 2026-10-18 11:37:16-0700
From: Kuniyuki Iwashima <[email protected]>Quoted 2 lines · Günther Noack
Alejandro, I am sorry that you don't want to review this any further due to LLM use.
I understand the frustration since maintainers are getting overwhelmed by too many AI slops these days (I'm not saying this series is) and the review cost is way higher than before.
Quoted 5 lines
Quoted 3 lines
I'm happy to review this series as a
AF_UNIXmaintainer to reduce Alejandro's cost, so please CC me on every patch, and CC each author of (relatively) new functionality.Thanks a lot!
Thanks from me as well, I will happily take you up on that offer.
Thanks to you as well Alejandro, for reconsidering in [1] and continuing the review!
[1] https://lore.kernel.org/all/atW-XL6H72Nyy3N3@debian/
Quoted 8 lines
Quoted 6 lines
Also, please split the series into 3, general part (socket, bind, protocol stuff, etc), socket diag part, and scm part (
SCM_XXX,SO_PASSXXX, etc).It would be easier for us to review small series than a single large series. (fwiw, netdev mailing list has ~15 patch limit)
I'm okay with a split.
I agree, it is admittedly a large number of patches that I sent here, and I can understand that this is tedious.
I'll have a look in the next days and split this patch set up into more digestible chunks.
Quoted 5 lines
[...]
Quoted 3 lines
Quoted 3 lines
Some mentionworthy points about features that were missing or had out of date documentation:
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
* Out of band messaging support (
MSG_OOB):Please drop these changes. I planned to remove it in the next cycle since recent AI-driven security research targets the poor implementation, and even if the bug is trivial for the plain
AF_UNIX,MSG_OOBtends to promote it to UAF (and thus LPE) and risks users for no good reason.
Yes, OK. To be clear, the man page currently just says that OOB is not supported for Unix Domain Sockets, and my plan was to remove that wording (because it's technically wrong), but to refrain from documenting it so that not even more people pick it up and so that that doesn't get into the way of your deprecation efforts. (It's in commit 22/24.)
If you are saying that the deprecation is close enough, I'll just leave it as is then, so that it keeps saying OOB is not supported.
Quoted 19 lines
Quoted 8 lines
Quoted 6 lines
[1] https://lore.kernel.org/all/[email protected]/
[2] https://projectzero.google/2025/08/from-chrome-renderer-code-exec-to-kernel.htmlGünther Noack (24):
man/man7/unix.7: ERRORS: EINVAL: The address field issun_family, not
sun_typeCorrect the address field s/sun_family/sun_type/
I think you meant s/sun_type/sun_family/?
Quoted 2 lines
It seems the subjects are not formatted well, which makes me feel AI cannot follow the standard and it is not worth reviewing :/
The subjects seem okay to me. In the man-pages, we use slightly different conventions than in the kernel, so I guess that's why it seems strange to you. :)
Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
man/man7/unix.7: Socket options:
SOL_SOCKETis a level, not a familyDescribe
SOL_SOCKETas socket level, not familyTo my own understanding, I'll ask: technically,
SOL_SOCKET(like any SOL_*) is a protocol level. The socket level is just one of the many protocol levels, right?
In my interpretation (but this is also only gathered from the setsockopt(2) man page), the "level" option to setsockopt() and getsockopt() acts as a "namespace" for the actual option value, so that the unrelated socket options that are specific to the protocols don't all need to use the same enum space?
I skimmed through Steven's "UNIX Network Programming Volume 1: The Sockets Networking API" looking for mentions of "level", but the only places where I found it was for getsockopt()/setsockopt() and in struct cmsghdr (see cmsg(3)), where it is also used to qualify a similar enum.
About the getsockopt()/setsockopt() use, the book says:
"level" specifies the code in the system that interprets the option:
the general socket code or some protocol-specific code (e.g., IPv4, IPv6, TCP, or SCTP).
As valid level values that can be passed, the book lists SOL_SOCKET, IPPROTO_IP, IPPROTO_ICMPV6, IPPROTO_IPV6, IPPROTO_TCP and IPPROTO_SCTP.
In any case, in the commit here, we are replacing a mention of
"...can be read with [...] getsockopt(2) by specifying SOL_SOCKET as the socket family"
with:
"...can be read with [...] getsockopt(2) by specifying SOL_SOCKET as the level"
Independent of the exact terminology, that is still a good change to do because it identifies the name of the getsockopt(2) argument, which is "level". (There are also some values which can be passed as level which correspond to socket families in the sense of socket(2), but SOL_SOCKET is not one of them.)
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix?? This reminds me of Final Fantasy IX :p
Please fix all of them.
We use 'ffix' as a shorthand for 'formatting fix'. Those patches usually make something bold, or remove bold, but don't do anything meaningful to the page.
Hah, yes. :) As documented in CONTRIBUTING.d/patches/subject
Computer game references are unintended. ;-)
–Günther
Quoted 63 lines · Günther Noack
Hello Alejandro and Kuniyuki!
Quoted 10 lines · Alejandro Colomar
Quoted 10 lines
Date: 2026-10-18 11:37:16-0700
From: Kuniyuki Iwashima <[email protected]>Quoted 2 lines · Günther Noack
Alejandro, I am sorry that you don't want to review this any further due to LLM use.
I understand the frustration since maintainers are getting overwhelmed by too many AI slops these days (I'm not saying this series is) and the review cost is way higher than before.
Quoted 5 lines
Quoted 3 lines
I'm happy to review this series as a
AF_UNIXmaintainer to reduce Alejandro's cost, so please CC me on every patch, and CC each author of (relatively) new functionality.Thanks a lot!
Thanks from me as well, I will happily take you up on that offer.
Thanks to you as well Alejandro, for reconsidering in [1] and continuing the review!
[1] https://lore.kernel.org/all/atW-XL6H72Nyy3N3@debian/
Quoted 8 lines
Quoted 6 lines
Also, please split the series into 3, general part (socket, bind, protocol stuff, etc), socket diag part, and scm part (
SCM_XXX,SO_PASSXXX, etc).It would be easier for us to review small series than a single large series. (fwiw, netdev mailing list has ~15 patch limit)
I'm okay with a split.
I agree, it is admittedly a large number of patches that I sent here, and I can understand that this is tedious.
I'll have a look in the next days and split this patch set up into more digestible chunks.
Quoted 5 lines
[...]
Quoted 3 lines
Quoted 3 lines
Some mentionworthy points about features that were missing or had out of date documentation:
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
* Out of band messaging support (
MSG_OOB):Please drop these changes. I planned to remove it in the next cycle since recent AI-driven security research targets the poor implementation, and even if the bug is trivial for the plain
AF_UNIX,MSG_OOBtends to promote it to UAF (and thus LPE) and risks users for no good reason.Yes, OK. To be clear, the man page currently just says that OOB is not supported for Unix Domain Sockets, and my plan was to remove that wording (because it's technically wrong), but to refrain from documenting it so that not even more people pick it up and so that that doesn't get into the way of your deprecation efforts. (It's in commit 22/24.)
Quoted 2 lines
If you are saying that the deprecation is close enough, I'll just leave it as is then, so that it keeps saying OOB is not supported.
Yes, I'm going to deprecate it in the coming v7.5 cycle, so please leave it as it.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
[1] https://lore.kernel.org/all/[email protected]/
[2] https://projectzero.google/2025/08/from-chrome-renderer-code-exec-to-kernel.htmlGünther Noack (24):
man/man7/unix.7: ERRORS: EINVAL: The address field issun_family, not
sun_typeCorrect the address field s/sun_family/sun_type/
Quoted 8 lines
Quoted 8 lines
I think you meant s/sun_type/sun_family/?
Quoted 2 lines
It seems the subjects are not formatted well, which makes me feel AI cannot follow the standard and it is not worth reviewing :/
The subjects seem okay to me. In the man-pages, we use slightly different conventions than in the kernel, so I guess that's why it seems strange to you. :)
Oh okay, then it was me not following the standard :p
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
man/man7/unix.7: Socket options:
SOL_SOCKETis a level, not a familyDescribe
SOL_SOCKETas socket level, not familyTo my own understanding, I'll ask: technically,
SOL_SOCKET(like any SOL_*) is a protocol level. The socket level is just one of the many protocol levels, right?
Quoted 5 lines
In my interpretation (but this is also only gathered from the setsockopt(2) man page), the "level" option to
setsockopt()andgetsockopt()acts as a "namespace" for the actual option value, so that the unrelated socket options that are specific to the protocols don't all need to use the same enum space?
Yes, I agree just the "level" is more appropriate.
Quoted 20 lines
I skimmed through Steven's "UNIX Network Programming Volume 1: The Sockets Networking API" looking for mentions of "level", but the only places where I found it was for getsockopt()/setsockopt() and in struct cmsghdr (see cmsg(3)), where it is also used to qualify a similar enum.
About the getsockopt()/setsockopt() use, the book says:
"level" specifies the code in the system that interprets the option:
the general socket code or some protocol-specific code (e.g., IPv4, IPv6, TCP, or SCTP).As valid level values that can be passed, the book lists
SOL_SOCKET,IPPROTO_IP,IPPROTO_ICMPV6,IPPROTO_IPV6,IPPROTO_TCPandIPPROTO_SCTP.In any case, in the commit here, we are replacing a mention of
Quoted 7 lines
"...can be read with [...] getsockopt(2) by specifying
SOL_SOCKETas the socket family"with:
"...can be read with [...] getsockopt(2) by specifying
SOL_SOCKETas the level"
so this looks better to me.
Quoted 22 lines
Independent of the exact terminology, that is still a good change to do because it identifies the name of the getsockopt(2) argument, which is "level". (There are also some values which can be passed as level which correspond to socket families in the sense of socket(2), but
SOL_SOCKETis not one of them.)Quoted 9 lines
Quoted 5 lines
Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix?? This reminds me of Final Fantasy IX :p
Please fix all of them.
We use 'ffix' as a shorthand for 'formatting fix'. Those patches usually make something bold, or remove bold, but don't do anything meaningful to the page.
Hah, yes. :) As documented in CONTRIBUTING.d/patches/subject
Computer game references are unintended. ;-)
–Günther
the meaning of "ffix" (was: [PATCH v2 00/24] Documentation fixes in unix(7))
In reply to Alejandro ColomarQuoted 11 lines · Alejandro Colomar
Quoted 7 lines
Date: 2026-10-18 11:37:16-0700
From: Kuniyuki Iwashima <[email protected]>Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix?? This reminds me of Final Fantasy IX :p
Please fix all of them.
We use 'ffix' as a shorthand for 'formatting fix'. Those patches usually make something bold, or remove bold, but don't do anything meaningful to the page.
Also see man-pages CONTRIBUTING.d/patches/subject:
Trivial subject
For trivial patches, you can use subject tags:
ffix Formatting fix.
tfix Typo fix.
wfix Minor wording fix.
srcfix Change to manual page source that doesn't affect
the output.
Example:
[PATCH v1] tcp.7: tfix
Regards,
Branden
Re: the meaning of "ffix" (was: [PATCH v2 00/24] Documentation fixes in unix(7))
Quoted 16 lines · G. Branden Robinson
Quoted 11 lines · Alejandro Colomar
Quoted 7 lines
Date: 2026-10-18 11:37:16-0700
From: Kuniyuki Iwashima <[email protected]>Quoted 1 line
man/man7/unix.7:
SO_PASSCRED: ffix?? This reminds me of Final Fantasy IX :p
Please fix all of them.
We use 'ffix' as a shorthand for 'formatting fix'. Those patches usually make something bold, or remove bold, but don't do anything meaningful to the page.
Also see man-pages CONTRIBUTING.d/patches/subject:
Quoted 8 lines
Trivial subject
For trivial patches, you can use subject tags:ffix Formatting fix.
tfix Typo fix.
wfix Minor wording fix.
srcfix Change to manual page source that doesn't affect
the output.
Good to know these, thanks for the pointer !
Quoted 7 lines
Example: [PATCH v1] tcp.7: tfixRegards,
Branden