* [PATCH 1/4] man/man2/landlock_create_ruleset.2: Clarify default Landlock ABI
@ 2026-04-13 19:34 Günther Noack
2026-04-13 19:34 ` [PATCH 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA Günther Noack
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Günther Noack @ 2026-04-13 19:34 UTC (permalink / raw)
To: Alejandro Colomar, Mickaël Salaün; +Cc: linux-man, Günther Noack
The documented Landlock features are not all available since ABI v1.
We are mentioning it explicitly when features require specific
Landlock ABI versions.
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
man/man2/landlock_create_ruleset.2 | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/man/man2/landlock_create_ruleset.2 b/man/man2/landlock_create_ruleset.2
index 5425ed59878b..7bca831cbd65 100644
--- a/man/man2/landlock_create_ruleset.2
+++ b/man/man2/landlock_create_ruleset.2
@@ -125,8 +125,10 @@ is 0, then the returned value is the highest supported Landlock ABI version
This version can be used for a best-effort security approach,
which is encouraged when user space is not pinned to a specific kernel
version.
-All features documented in these man pages are available with the version
-1.
+.IP
+Unless noted otherwise,
+all features documented in these man pages are available with the
+version 1.
.SH RETURN VALUE
On success,
.BR landlock_create_ruleset ()
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA
2026-04-13 19:34 [PATCH 1/4] man/man2/landlock_create_ruleset.2: Clarify default Landlock ABI Günther Noack
@ 2026-04-13 19:34 ` Günther Noack
2026-04-13 19:34 ` [PATCH 3/4] man/man[27]/{landlock_restrict_self.2,landlock.7}: Document LANDLOCK_RESTRICT_SELF_TSYNC (ABI v8) Günther Noack
2026-04-13 19:34 ` [PATCH 4/4] man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags Günther Noack
2 siblings, 0 replies; 4+ messages in thread
From: Günther Noack @ 2026-04-13 19:34 UTC (permalink / raw)
To: Alejandro Colomar, Mickaël Salaün; +Cc: linux-man, Günther Noack
Document the LANDLOCK_CREATE_RULESET_ERRATA flag, which returns a
bitmask of fixed issues for the current Landlock ABI version.
This mechanism was introduced in Linux 6.15, but backported to all
older kernel releases where these errata fixes were backported to.
On official Linux kernel releases, if landlock_create_ruleset() with
LANDLOCK_CREATE_RULESET_ERRATA returns an error, this is equivalent to
the case where none of the known errata have been fixed.
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
man/man2/landlock_create_ruleset.2 | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/man/man2/landlock_create_ruleset.2 b/man/man2/landlock_create_ruleset.2
index 7bca831cbd65..90d0341d2682 100644
--- a/man/man2/landlock_create_ruleset.2
+++ b/man/man2/landlock_create_ruleset.2
@@ -129,11 +129,34 @@ version.
Unless noted otherwise,
all features documented in these man pages are available with the
version 1.
+.TP
+.B LANDLOCK_CREATE_RULESET_ERRATA
+If
+.I attr
+is NULL and
+.I size
+is 0, then the returned value is a bitmask of fixed issues
+for the current Landlock ABI version.
+If bit N is set (i.e.,
+.IR "errata & (1 << (N - 1))" ),
+then erratum N has been fixed in the running kernel.
+.IP
+In addition to ABI versions, Landlock's errata mechanism tracks fixes
+for issues that may affect backwards compatibility
+or require userspace awareness.
+.IP
+Only check errata if your application specifically relies on behavior
+that changed due to the fix.
+The fixes generally make Landlock less restrictive or more correct,
+not more restrictive.
+.IP
+This flag is available on Linux versions where errata were fixed.
.SH RETURN VALUE
On success,
.BR landlock_create_ruleset ()
returns a new Landlock ruleset file descriptor,
-or a Landlock ABI version,
+a Landlock ABI version,
+or a Landlock errata bitmask,
according to
.IR flags .
On error,
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/4] man/man[27]/{landlock_restrict_self.2,landlock.7}: Document LANDLOCK_RESTRICT_SELF_TSYNC (ABI v8)
2026-04-13 19:34 [PATCH 1/4] man/man2/landlock_create_ruleset.2: Clarify default Landlock ABI Günther Noack
2026-04-13 19:34 ` [PATCH 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA Günther Noack
@ 2026-04-13 19:34 ` Günther Noack
2026-04-13 19:34 ` [PATCH 4/4] man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags Günther Noack
2 siblings, 0 replies; 4+ messages in thread
From: Günther Noack @ 2026-04-13 19:34 UTC (permalink / raw)
To: Alejandro Colomar, Mickaël Salaün; +Cc: linux-man, Günther Noack
Document the new LANDLOCK_RESTRICT_SELF_TSYNC flag, which applies the
Landlock configuration atomically to all threads of the calling process.
Available since Linux 7.0 (Landlock ABI version 8).
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
man/man2/landlock_restrict_self.2 | 18 ++++++++++++++++++
man/man7/landlock.7 | 2 ++
2 files changed, 20 insertions(+)
diff --git a/man/man2/landlock_restrict_self.2 b/man/man2/landlock_restrict_self.2
index 9e80a40ee4a4..1265ea2feb91 100644
--- a/man/man2/landlock_restrict_self.2
+++ b/man/man2/landlock_restrict_self.2
@@ -133,6 +133,24 @@ It can also be used with a
.I ruleset_fd
value of \-1 to mute subdomain logs
without creating a domain.
+.P
+The following flag supports policy enforcement in multithreaded processes:
+.TP
+.B LANDLOCK_RESTRICT_SELF_TSYNC
+Applies the new Landlock configuration atomically
+to all threads of the current process,
+including the Landlock domain and logging configuration.
+This overrides the Landlock configuration of sibling threads,
+irrespective of previously established Landlock domains
+and logging configurations on those threads.
+.IP
+If the calling thread is running with
+.IR no_new_privs ,
+this operation enables
+.I no_new_privs
+on the sibling threads as well.
+.IP
+This flag is available since Landlock ABI version 8.
.SH RETURN VALUE
On success,
.BR landlock_restrict_self ()
diff --git a/man/man7/landlock.7 b/man/man7/landlock.7
index bcf06ea30ad4..06910ccab5b1 100644
--- a/man/man7/landlock.7
+++ b/man/man7/landlock.7
@@ -476,6 +476,8 @@ _ _ _
7 6.15 LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF
\^ \^ LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON
\^ \^ LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF
+_ _ _
+8 7.0 LANDLOCK_RESTRICT_SELF_TSYNC
.TE
.P
Users should use the Landlock ABI version rather than the kernel version
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 4/4] man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags
2026-04-13 19:34 [PATCH 1/4] man/man2/landlock_create_ruleset.2: Clarify default Landlock ABI Günther Noack
2026-04-13 19:34 ` [PATCH 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA Günther Noack
2026-04-13 19:34 ` [PATCH 3/4] man/man[27]/{landlock_restrict_self.2,landlock.7}: Document LANDLOCK_RESTRICT_SELF_TSYNC (ABI v8) Günther Noack
@ 2026-04-13 19:34 ` Günther Noack
2 siblings, 0 replies; 4+ messages in thread
From: Günther Noack @ 2026-04-13 19:34 UTC (permalink / raw)
To: Alejandro Colomar, Mickaël Salaün; +Cc: linux-man, Günther Noack
Missed this on the earlier commit; we should mention since which
Landlock version these flags are available. Users can correlate this
with the Landlock ABI version as it can be queried through
landlock_create_ruleset(2).
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
man/man2/landlock_restrict_self.2 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/man/man2/landlock_restrict_self.2 b/man/man2/landlock_restrict_self.2
index 1265ea2feb91..99288b582fea 100644
--- a/man/man2/landlock_restrict_self.2
+++ b/man/man2/landlock_restrict_self.2
@@ -134,6 +134,8 @@ It can also be used with a
value of \-1 to mute subdomain logs
without creating a domain.
.P
+These flags are available since Landlock ABI version 7.
+.P
The following flag supports policy enforcement in multithreaded processes:
.TP
.B LANDLOCK_RESTRICT_SELF_TSYNC
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-13 19:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 19:34 [PATCH 1/4] man/man2/landlock_create_ruleset.2: Clarify default Landlock ABI Günther Noack
2026-04-13 19:34 ` [PATCH 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA Günther Noack
2026-04-13 19:34 ` [PATCH 3/4] man/man[27]/{landlock_restrict_self.2,landlock.7}: Document LANDLOCK_RESTRICT_SELF_TSYNC (ABI v8) Günther Noack
2026-04-13 19:34 ` [PATCH 4/4] man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags Günther Noack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox