man/: tfix
PATCH 1/3 man/: tfix
--- man/man2/dup.2 | 2 +- man/man2/memfd_secret.2 | 2 +- man/man2/sched_setaffinity.2 | 2 +- man/man2/seccomp_unotify.2 | 2 +- man/man2/select.2 | 2 +- man/man2/send.2 | 2 +- man/man2/sigsuspend.2 | 2 +- man/man5/proc_meminfo.5 | 2 +- man/man7/landlock.7 | 4 ++-- man/man7/pipe.7 | 2 +- man/man7/socket.7 | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-)
man/man2/dup.2 +1 -1
@@ -238,7 +238,7 @@ .SH NOTES before calling .BR dup2 (), because of the race condition described above. -Instead, code something like the following could be used: +Instead, something like the following could be used: .P .in +4n .EX
man/man2/memfd_secret.2 +1 -1
@@ -119,7 +119,7 @@ .SH ERRORS .B EMFILE The per-process limit on the number of open file descriptors has been reached. .TP -.B EMFILE +.B ENFILE The system-wide limit on the total number of open files has been reached. .TP .B ENOMEM
man/man2/sched_setaffinity.2 +1 -1
@@ -223,7 +223,7 @@ .SS C library/kernel differences .P On success, the raw .BR sched_getaffinity () -system call returns the number of bytes placed copied into the +system call returns the number of bytes copied into the .I mask buffer; this will be the minimum of
man/man2/seccomp_unotify.2 +1 -1
@@ -982,7 +982,7 @@ .SS Design goals; use of SECCOMP_USER_NOTIF_FLAG_CONTINUE .B can not be used to implement a security policy! It should only ever be used in scenarios where a more privileged process -supervises the system calls of a lesser privileged target to +supervises the system calls of a less privileged target to get around kernel-enforced security restrictions when the supervisor deems this safe. In other words,
man/man2/select.2 +1 -1
@@ -45,7 +45,7 @@ .SH SYNOPSIS .SH DESCRIPTION .BR "WARNING" : .BR select () -can monitor only file descriptors numbers that are less than +can monitor only file descriptor numbers that are less than .B FD_SETSIZE (1024)\[em]an unreasonably low limit for many modern applications\[em]and this limitation will not change.
man/man2/send.2 +1 -1
@@ -342,7 +342,7 @@ .SH ERRORS (For UNIX domain sockets, which are identified by pathname) Write permission is denied on the destination socket file, or search permission is denied for one of the directories -the path prefix. +in the path prefix. (See .BR path_resolution (7).) .IP
man/man2/sigsuspend.2 +1 -1
@@ -47,7 +47,7 @@ .SH DESCRIPTION or .BR SIGSTOP ; specifying these signals in -.IR mask , +.I mask has no effect on the thread's signal mask. .SH RETURN VALUE .BR sigsuspend ()
man/man5/proc_meminfo.5 +1 -1
@@ -20,7 +20,7 @@ .SH DESCRIPTION a parameter name, followed by a colon, the value of the parameter, -and an option unit of measurement (e.g., "kB"). +and an optional unit of measurement (e.g., "kB"). The list below describes the parameter names and the format specifier required to read the field value. Except as noted below,
man/man7/landlock.7 +2 -2
@@ -21,7 +21,7 @@ .SH DESCRIPTION and unexpected or malicious behaviors in applications. .P A Landlock security policy is a set of access rights -(e.g., open a file in read-only, make a directory, etc.) +(e.g., open a file read-only, make a directory, etc.) tied to a file hierarchy. Such policy can be configured and enforced by processes for themselves using three system calls:
@@ -334,7 +334,7 @@ .SS Bind mounts and OverlayFS contains its own set of files and directories, which is different from a bind mount. A policy restricting an OverlayFS layer will not restrict -the resulted merged hierarchy, and vice versa. +the resulting merged hierarchy, and vice versa. Landlock users should then only think about file hierarchies they want to allow access to, regardless of the underlying filesystem. .\"
man/man7/pipe.7 +1 -1
@@ -385,7 +385,7 @@ .SS BUGS .PD .RE .IP -This was racey. +This was racy. Multiple processes could pass point (1) simultaneously, and then allocate pipe buffers that were accounted for only in step (3), with the result that the user's pipe buffer
man/man7/socket.7 +1 -1
@@ -904,7 +904,7 @@ .SS Socket options load distribution in a multi-threaded server to be improved by using a distinct listener socket for each thread. This provides improved load distribution as compared -to traditional techniques such using a single +to traditional techniques such as using a single .BR accept (2)ing thread that distributes connections, or having multiple threads that compete to
base-commit: 6fc2f7aa4502676a857124e05538824367c18c06
Signature · 1 line
2.55.0
PATCH 2/3 man/man7/pipe.7: Note kernel commit of the soft limit triggered cap increase
7543e84442d7 did reference the kernel commit in its commit message, but the convention to include it in the man page source as well is helpful to wider audience.
--- man/man7/pipe.7 | 1 + 1 file changed, 1 insertion(+)
man/man7/pipe.7 +1 -0
@@ -229,6 +229,7 @@ .SS /proc files So long as the total number of pages allocated to pipe buffers for this user is at this limit, individual pipes created by a user will be +.\" commit 46c4c9d1beb7f5b4cec4dd90e7728720583ee348 limited to two pages (one page before Linux 5.14), and attempts to increase a pipe's capacity will be denied.
Signature · 1 line
2.55.0
Alejandro Colomar
maintainerRe: [PATCH 2/3] man/man7/pipe.7: Note kernel commit of the soft limit triggered cap increase
Hi,
Quoted 6 lines · Štěpán Němec
7543e84442d7did reference the kernel commit in its commit message, but the convention to include it in the man page source as well is helpful to wider audience.Fixes 7543e84442d7 ("pipe.7: Document change to default pipe size when soft limit is exceeded")Signed-off-by Štěpán Němec <[email protected]>
Thanks! I've applied the patch.
Cheers,
Alex
Quoted 20 lines
--- man/man7/pipe.7 | 1 + 1 file changed, 1 insertion(+)man/man7/pipe.7 +1
-0@@ -229,6 +229,7 @@ .SS /proc files So long as the total number of pages allocated to pipe buffers for this user is at this limit, individual pipes created by a user will be +.\" commit 46c4c9d1beb7f5b4cec4dd90e7728720583ee348 limited to two pages (one page before Linux 5.14), and attempts to increase a pipe's capacity will be denied.Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>
PATCH 3/3 man/man7/landlock.7: wfix
In reply to Štěpán Němec--- man/man7/landlock.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man/man7/landlock.7 +2 -2
@@ -296,8 +296,8 @@ .SS Scope flags .SS Layers of file path access rights Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. -Indeed, this complementary policy is composed with the -potentially other rulesets already restricting this thread. +Indeed, this complementary policy is composed with any +other rulesets already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset. .P
Signature · 1 line
2.55.0
Alejandro Colomar
maintainerRe: [PATCH 3/3] man/man7/landlock.7: wfix
Hi!
Quoted 10 lines · Štěpán Němec
Signed-off-by Štěpán Němec <[email protected]>--- man/man7/landlock.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man/man7/landlock.7 +0
-0
man/man7/landlock.7 .SS Scope flags · line 302
Quoted 9 lines
man/man7/landlock.7 +2
-2@@ -296,8 +296,8 @@ .SS Scope flags .SS Layers of file path access rights Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. -Indeed, this complementary policy is composed with the -potentially other rulesets already restricting this thread. +Indeed, this complementary policy is composed with any +other rulesets already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.
I've added to CC the landlock maintainers, so that they review the text. They maintain the same text in the kernel, so it's better to have it coordinated.
Cheers,
Alex
Quoted 5 lines
man/man7/landlock.7 +0
-0.PSignature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Re: [PATCH 3/3] man/man7/landlock.7: wfix
Quoted 16 lines · On Fri, 10 Jul 2026 18:48:36 +0200 Alejandro Colomar wrote:
Quoted 15 lines · Štěpán Němec
Signed-off-by Štěpán Němec <[email protected]>--- man/man7/landlock.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man/man7/landlock.7 +0
-2@@ -296,8 +296,8 @@ .SS Scope flags .SS Layers of file path access rights Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. -Indeed, this complementary policy is composed with the -potentially other rulesets already restricting this thread.
Quoted 8 lines
man/man7/landlock.7 .SS Scope flags · line 302
Quoted 4 lines
man/man7/landlock.7 +2
-0+Indeed, this complementary policy is composed with any +other rulesets already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.I've added to CC the landlock maintainers, so that they review the text. They maintain the same text in the kernel, so it's better to have it coordinated.
Thanks, I did not realize that.
I see now that the texts have already diverged and the equivalent paragraph in the kernel docs (Documentation/userspace-api/landlock.rst) now reads
Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. This complementary policy is stacked with any other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.
(Wording introduced by linux commit dad2f2071516 (2024-10-15; "landlock: Fix grammar issues in documentation").)
FWIW I see little point in this kind of duplication, given that the kernel docs are as readily available to anyone interested as the man pages are; OTOH it seems that the duplication is only partial here (i.e., the documents differ, with only isolated verbatim overlaps), so perhaps the rationale is that the different documents target slightly different audiences (I'm not sure I'd agree).
Anyway, here is a patch simply adjusting the man page text to match the kernel docs (I still believe "potentially" is more distracting than useful there, but it is an improvement on the original.):
----------------------------------- 8< --------------------------------
Subject: [PATCH] man/man7/landlock.7: wfix
Use the current wording of the equivalent paragraph in Linux kernel Documentation/userspace-api/landlock.rst.
--- man/man7/landlock.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man/man7/landlock.7 +2 -2
@@ -296,8 +296,8 @@ .SS Scope flags .SS Layers of file path access rights Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. -Indeed, this complementary policy is composed with the -potentially other rulesets already restricting this thread. +This complementary policy is stacked with any +other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset. .P
base-commit: 794e74fd54156f767801eb60a0d79a496c73e505
Signature · 1 line
2.55.0
Alejandro Colomar
maintainerRe: [PATCH 3/3] man/man7/landlock.7: wfix
Hi Štěpán,
Quoted 1 line · Štěpán Němec
On Fri, 10 Jul 2026 18:48:36 +0200 Alejandro Colomar wrote:
[...]
Quoted 15 lines
Quoted 3 lines
I've added to CC the landlock maintainers, so that they review the text. They maintain the same text in the kernel, so it's better to have it coordinated.
Thanks, I did not realize that.
I see now that the texts have already diverged and the equivalent paragraph in the kernel docs (
Documentation/userspace-api/landlock.rst) now readsEach time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. This complementary policy is stacked with any other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset.
Quoted 6 lines
(Wording introduced by linux commit
dad2f2071516(2024-10-15; "landlock: Fix grammar issues in documentation").)FWIW I see little point in this kind of duplication, given that the kernel docs are as readily available to anyone interested as the man pages are;
Not so much; the manual pages are available for anyone on a terminal without internet connection. The kernel docs are only available if you have the kernel sources or internet.
So, the manual pages are necessary. What I wonder is if the kernel documentation is necessary. I think they could drop it (the duplicated part of it), and refer to the manual page. However, I trust they know what's best for them.
Quoted 5 lines
OTOH it seems that the
duplication is only partial here (i.e., the documents differ, with only isolated verbatim overlaps), so perhaps the rationale is that the different documents target slightly different audiences (I'm not sure I'd agree).
Yup; still, referring to the manual pages instead of duplicating that part in the kernel might (or might not) be a good idea.
Quoted 4 lines
Anyway, here is a patch simply adjusting the man page text to match the kernel docs (I still believe "potentially" is more distracting than useful there, but it is an improvement on the original.):
Thanks! This sounds like an improvement that doesn't need to be reviewed by the kernel maintainers. I've applied it.
Cheers,
Alex
Quoted 31 lines
----------------------------------- 8< --------------------------------
Subject: [PATCH] man/man7/landlock.7: wfixUse the current wording of the equivalent paragraph in Linux kernel
Documentation/userspace-api/landlock.rst.Signed-off-by Štěpán Němec <[email protected]>--- man/man7/landlock.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man/man7/landlock.7 +2
-2@@ -296,8 +296,8 @@ .SS Scope flags .SS Layers of file path access rights Each time a thread enforces a ruleset on itself, it updates its Landlock domain with a new layer of policy. -Indeed, this complementary policy is composed with the -potentially other rulesets already restricting this thread. +This complementary policy is stacked with any +other rulesets potentially already restricting this thread. A sandboxed thread can then safely add more constraints to itself with a new enforced ruleset. .Pbase-commit:
794e74fd54156f767801eb60a0d79a496c73e505Signature · 1 line
2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>
Re: [PATCH 3/3] man/man7/landlock.7: wfix
Quoted 8 lines · On Sat, 18 Jul 2026 14:17:57 +0200 Alejandro Colomar wrote:
Quoted 3 lines · Štěpán Němec
FWIW I see little point in this kind of duplication, given that the kernel docs are as readily available to anyone interested as the man pages are;
Not so much; the manual pages are available for anyone on a terminal without internet connection. The kernel docs are only available if you have the kernel sources or internet.
No, I really don't see a difference here: I don't know a Linux distro that doesn't provide the kernel docs as a package. (You seem to be using Debian and/or its derivatives, so that would be the linux-doc package.)
Quoted 4 lines
So, the manual pages are necessary. What I wonder is if the kernel documentation is necessary. I think they could drop it (the duplicated part of it), and refer to the manual page. However, I trust they know what's best for them.
In principle, if the docs are maintained by kernel developers, the other way round, i.e., preferring the kernel docs, makes more sense to me: being in the same source tree, their maintenance is less likely to be forgotten or neglected (there might also be other factors, such as reST likely being less taxing to work with than roff for most people).
Signature · 1 line
Štěpán
Alejandro Colomar
maintainerRe: [PATCH 3/3] man/man7/landlock.7: wfix
Hi Štěpán,
Quoted 8 lines · Štěpán Němec
Quoted 5 lines · On Sat, 18 Jul 2026 14:17:57 +0200 Alejandro Colomar wrote:
Quoted 3 lines · Štěpán Němec
FWIW I see little point in this kind of duplication, given that the kernel docs are as readily available to anyone interested as the man pages are;
Quoted 8 lines
Quoted 3 lines
Not so much; the manual pages are available for anyone on a terminal without internet connection. The kernel docs are only available if you have the kernel sources or internet.
No, I really don't see a difference here: I don't know a Linux distro that doesn't provide the kernel docs as a package. (You seem to be using Debian and/or its derivatives, so that would be the linux-doc package.)
Hmmm, thanks! I didn't know about it. Still, I find local html docs to be less comfortable for users than manual pages, but it's good to know that it exists.
Have a lovely night!
Alex
Quoted 15 lines
Quoted 4 lines
So, the manual pages are necessary. What I wonder is if the kernel documentation is necessary. I think they could drop it (the duplicated part of it), and refer to the manual page. However, I trust they know what's best for them.
In principle, if the docs are maintained by kernel developers, the other way round, i.e., preferring the kernel docs, makes more sense to me: being in the same source tree, their maintenance is less likely to be forgotten or neglected (there might also be other factors, such as reST likely being less taxing to work with than roff for most people).
Signature · 1 line
Štěpán
Signature · 1 line
<https://www.alejandro-colomar.es>
Alejandro Colomar
maintainer[CC += Mike]
[CC += Mickaël, Günther]
Hi Štěpán!
Quoted 15 lines · Štěpán Němec
Signed-off-by Štěpán Němec <[email protected]>--- man/man2/dup.2 | 2 +- man/man2/memfd_secret.2 | 2 +- man/man2/sched_setaffinity.2 | 2 +- man/man2/seccomp_unotify.2 | 2 +- man/man2/select.2 | 2 +- man/man2/send.2 | 2 +- man/man2/sigsuspend.2 | 2 +- man/man5/proc_meminfo.5 | 2 +- man/man7/landlock.7 | 4 ++-- man/man7/pipe.7 | 2 +- man/man7/socket.7 | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-)
[...]
man/man2/memfd_secret.2 .SH ERRORS · line 122
Quoted 10 lines
man/man2/memfd_secret.2 +1
-1@@ -119,7 +119,7 @@ .SH ERRORS .B EMFILE The per-process limit on the number of open file descriptors has been reached. .TP -.B EMFILE +.B ENFILE
I think I'd fix this typo in a separate commit, since it's a meaningful typo (both EMFILE and ENFILE exist, and they have a slightly different meaning).
In the fix, please include the following tags:
Fixes: ac5edfeb1dd6 (2021-08-27; "memfd_secret.2: New page describing memfd_secret() system call") Cc: Mike Rapoport <[email protected]>
Quoted 3 lines
man/man2/memfd_secret.2 +0
-0The system-wide limit on the total number of open files has been reached. .TP .B ENOMEM
[...]
Quoted 14 lines
man/man7/landlock.7 +1
-1@@ -21,7 +21,7 @@ .SH DESCRIPTION and unexpected or malicious behaviors in applications. .P A Landlock security policy is a set of access rights -(e.g., open a file in read-only, make a directory, etc.) +(e.g., open a file read-only, make a directory, etc.) tied to a file hierarchy. Such policy can be configured and enforced by processes for themselves using three system calls:
man/man7/landlock.7 .SS Bind mounts and OverlayFS · line 340
Quoted 8 lines
man/man7/landlock.7 +1
-1@@ -334,7 +334,7 @@ .SS Bind mounts and OverlayFS contains its own set of files and directories, which is different from a bind mount. A policy restricting an OverlayFS layer will not restrict -the resulted merged hierarchy, and vice versa. +the resulting merged hierarchy, and vice versa. Landlock users should then only think about file hierarchies they want to allow access to, regardless of the underlying filesystem. .\"
This seems to also exist in the kernel internal documentation. I've CCd the maintainers of that documentation.
$ find Documentation/ | grep landlock | xargs grep OverlayFS Documentation/userspace-api/landlock.rst:Bind mounts and OverlayFS Documentation/userspace-api/landlock.rst:An OverlayFS mount point consists of upper and lower layers. These layers are Documentation/userspace-api/landlock.rst:on the upper layer. From a Landlock policy point of view, all OverlayFS layers Documentation/userspace-api/landlock.rst:OverlayFS layer will not restrict the resulted merged hierarchy, and vice versa.
[...]
Have a lovely day!
Alex
Signature · 1 line
<https://www.alejandro-colomar.es>
PATCH 1/1 man/man2/memfd_secret.2: tfix
---
Quoted 8 lines · On Fri, 10 Jul 2026 18:44:19 +0200 Alejandro Colomar wrote:
I think I'd fix this typo in a separate commit, since it's a meaningful typo (both EMFILE and ENFILE exist, and they have a slightly different meaning).
In the fix, please include the following tags:
Fixes: ac5edfeb1dd6 (2021-08-27; "memfd_secret.2: New page describing memfd_secret() system call") Cc: Mike Rapoport <[email protected]>
Fair enough.
FWIW, out of abundance of caution (admittedly verging on paranoia), I did verify that unprivileged memfd_secret distinguished EMFILE and ENFILE as expected (brought about by setrlimit for the former and limiting fs.file-max for the latter in a VM running a recent alpine-edge image) before sending the original patch, but the hypothesis that this was anything other than a typo or a copy-paste error seemed too far-fetched to mention that.
man/man2/memfd_secret.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man2/memfd_secret.2 +1 -1
@@ -119,7 +119,7 @@ .SH ERRORS .B EMFILE The per-process limit on the number of open file descriptors has been reached. .TP -.B EMFILE +.B ENFILE The system-wide limit on the total number of open files has been reached. .TP .B ENOMEM
Signature · 1 line
2.55.0
Alejandro Colomar
maintainerRe: [PATCH] man/man2/memfd_secret.2: tfix
Hi Štěpán,
Quoted 18 lines · Štěpán Němec
Fixes ac5edfeb1dd6 (2021-08-27; "memfd_secret.2: New page describing memfd_secret() system call")Cc Mike Rapoport <[email protected]>Signed-off-by Štěpán Němec <[email protected]>---
Quoted 8 lines · On Fri, 10 Jul 2026 18:44:19 +0200 Alejandro Colomar wrote:
I think I'd fix this typo in a separate commit, since it's a meaningful typo (both EMFILE and ENFILE exist, and they have a slightly different meaning).
In the fix, please include the following tags:
Fixes: ac5edfeb1dd6 (2021-08-27; "memfd_secret.2: New page describing memfd_secret() system call") Cc: Mike Rapoport <[email protected]>Fair enough.
Quoted 7 lines
FWIW, out of abundance of caution (admittedly verging on paranoia), I did verify that unprivileged
memfd_secretdistinguished EMFILE and ENFILE as expected (brought about by setrlimit for the former and limiting fs.file-max for the latter in a VM running a recent alpine-edge image) before sending the original patch, but the hypothesis that this was anything other than a typo or a copy-paste error seemed too far-fetched to mention that.
Thanks! I've applied the patch.
Have a lovely day!
Alex
Quoted 22 lines
man/man2/memfd_secret.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)man/man2/memfd_secret.2 +1
-1@@ -119,7 +119,7 @@ .SH ERRORS .B EMFILE The per-process limit on the number of open file descriptors has been reached. .TP -.B EMFILE +.B ENFILE The system-wide limit on the total number of open files has been reached. .TP .B ENOMEMSignature · 2 lines
-- 2.55.0
Signature · 1 line
<https://www.alejandro-colomar.es>