Thread (8 messages) 8 messages, 3 authors, 2026-04-08

[PATCH 1/3] man/man2/landlock*.2: Reorder errors alphabetically

From: Günther Noack <hidden>
Date: 2026-03-29 12:48:30
Subsystem: the rest · Maintainer: Linus Torvalds

Reorder lists of error codes alphabetically, in line with man-pages(7).

Cc: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <redacted>
---
 man/man2/landlock_add_rule.2       | 38 +++++++++++++++---------------
 man/man2/landlock_create_ruleset.2 | 18 +++++++-------
 man/man2/landlock_restrict_self.2  | 20 ++++++++--------
 3 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/man/man2/landlock_add_rule.2 b/man/man2/landlock_add_rule.2
index 108364528830..48d7d3b25c9e 100644
--- a/man/man2/landlock_add_rule.2
+++ b/man/man2/landlock_add_rule.2
@@ -139,8 +139,23 @@ is
 .BR LANDLOCK_RULE_NET_PORT ,
 but TCP is not supported by the running kernel.
 .TP
-.B EOPNOTSUPP
-Landlock is supported by the kernel but disabled at boot time.
+.B EBADF
+.I ruleset_fd
+is not a file descriptor for the current thread,
+or a member of
+.I rule_attr
+is not a file descriptor as expected.
+.TP
+.B EBADFD
+.I ruleset_fd
+is not a ruleset file descriptor,
+or a member of
+.I rule_attr
+is not the expected file descriptor type.
+.TP
+.B EFAULT
+.I rule_attr
+was not a valid address.
 .TP
 .B EINVAL
 .I flags
@@ -171,27 +186,12 @@ Empty accesses (i.e.,
 .I rule_attr\->allowed_access
 is 0).
 .TP
-.B EBADF
-.I ruleset_fd
-is not a file descriptor for the current thread,
-or a member of
-.I rule_attr
-is not a file descriptor as expected.
-.TP
-.B EBADFD
-.I ruleset_fd
-is not a ruleset file descriptor,
-or a member of
-.I rule_attr
-is not the expected file descriptor type.
+.B EOPNOTSUPP
+Landlock is supported by the kernel but disabled at boot time.
 .TP
 .B EPERM
 .I ruleset_fd
 has no write access to the underlying ruleset.
-.TP
-.B EFAULT
-.I rule_attr
-was not a valid address.
 .SH STANDARDS
 Linux.
 .SH HISTORY
diff --git a/man/man2/landlock_create_ruleset.2 b/man/man2/landlock_create_ruleset.2
index ae5c89f5354f..8cffd8c770fa 100644
--- a/man/man2/landlock_create_ruleset.2
+++ b/man/man2/landlock_create_ruleset.2
@@ -134,15 +134,6 @@ is set to indicate the error.
 .BR landlock_create_ruleset ()
 can fail for the following reasons:
 .TP
-.B EOPNOTSUPP
-Landlock is supported by the kernel but disabled at boot time.
-.TP
-.B EINVAL
-Unknown
-.IR flags ,
-or unknown access, or too small
-.IR size .
-.TP
 .B E2BIG
 .I size
 is too big.
@@ -151,10 +142,19 @@ is too big.
 .I attr
 was not a valid address.
 .TP
+.B EINVAL
+Unknown
+.IR flags ,
+or unknown access, or too small
+.IR size .
+.TP
 .B ENOMSG
 Empty accesses (i.e.,
 .I attr
 did not specify any access rights to restrict).
+.TP
+.B EOPNOTSUPP
+Landlock is supported by the kernel but disabled at boot time.
 .SH STANDARDS
 Linux.
 .SH HISTORY
diff --git a/man/man2/landlock_restrict_self.2 b/man/man2/landlock_restrict_self.2
index 43fc8c6efcc7..530ef9a4cd25 100644
--- a/man/man2/landlock_restrict_self.2
+++ b/man/man2/landlock_restrict_self.2
@@ -82,12 +82,9 @@ is set to indicate the error.
 .BR landlock_restrict_self ()
 can fail for the following reasons:
 .TP
-.B EOPNOTSUPP
-Landlock is supported by the kernel but disabled at boot time.
-.TP
-.B EINVAL
-.I flags
-is not 0.
+.B E2BIG
+The maximum number of composed rulesets is reached for the calling thread.
+This limit is currently 64.
 .TP
 .B EBADF
 .I ruleset_fd
@@ -97,6 +94,13 @@ is not a file descriptor for the current thread.
 .I ruleset_fd
 is not a ruleset file descriptor.
 .TP
+.B EINVAL
+Invalid value in
+.IR flags .
+.TP
+.B EOPNOTSUPP
+Landlock is supported by the kernel but disabled at boot time.
+.TP
 .B EPERM
 .I ruleset_fd
 has no read access to the underlying ruleset,
@@ -105,10 +109,6 @@ or the calling thread is not running with
 or it doesn't have the
 .B CAP_SYS_ADMIN
 in its user namespace.
-.TP
-.B E2BIG
-The maximum number of composed rulesets is reached for the calling thread.
-This limit is currently 64.
 .SH STANDARDS
 Linux.
 .SH HISTORY
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help