Linux Manual Pages development
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: "Alejandro Colomar" <alx@kernel.org>, "Mickaël Salaün" <mic@digikod.net>
Cc: linux-man@vger.kernel.org, "Günther Noack" <gnoack3000@gmail.com>
Subject: [PATCH v3 1/4] man/man2/landlock_create_ruleset.2: Clarify attr and size constraints
Date: Tue, 21 Apr 2026 19:58:39 +0200	[thread overview]
Message-ID: <20260421175842.6870-2-gnoack3000@gmail.com> (raw)
In-Reply-To: <20260421175842.6870-1-gnoack3000@gmail.com>

When used with special flags like LANDLOCK_CREATE_RULESET_VERSION,
attr must be NULL and size must be 0.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
 man/man2/landlock_create_ruleset.2 | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/man/man2/landlock_create_ruleset.2 b/man/man2/landlock_create_ruleset.2
index d4eb5d827656..dd14f0ceba7c 100644
--- a/man/man2/landlock_create_ruleset.2
+++ b/man/man2/landlock_create_ruleset.2
@@ -116,11 +116,7 @@ Otherwise,
 can be set to:
 .TP
 .B LANDLOCK_CREATE_RULESET_VERSION
-If
-.I attr
-is NULL and
-.I size
-is 0, then the returned value is the highest supported Landlock ABI version
+Return the highest supported Landlock ABI version
 (starting at 1).
 This version can be used for a best-effort security approach,
 which is encouraged when user space is not pinned to a specific kernel
@@ -129,6 +125,15 @@ version.
 Unless noted otherwise,
 all features documented in these manual pages are available with the
 version 1.
+.P
+If
+.B LANDLOCK_CREATE_RULESET_VERSION
+is set,
+then
+.I attr
+must be NULL and
+.I size
+must be 0.
 .SH RETURN VALUE
 On success,
 .BR landlock_create_ruleset ()
@@ -159,6 +164,14 @@ Unknown
 or unknown access, or unknown scope, or too small
 .IR size .
 .TP
+.B EINVAL
+Non-NULL
+.I attr
+or non-zero
+.I size
+in combination with
+.BR LANDLOCK_CREATE_RULESET_VERSION .
+.TP
 .B ENOMSG
 Empty accesses (i.e.,
 .I attr
-- 
2.53.0


  reply	other threads:[~2026-04-21 17:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 17:58 [PATCH v3 0/4] Update Landlock docs to Landlock ABI v8 Günther Noack
2026-04-21 17:58 ` Günther Noack [this message]
2026-04-21 17:58 ` [PATCH v3 2/4] man/man[27]/{landlock_create_ruleset.2,landlock.7}: Document LANDLOCK_CREATE_RULESET_ERRATA Günther Noack
2026-04-21 17:58 ` [PATCH v3 3/4] man/man[27]/{landlock_restrict_self.2,landlock.7}: Document LANDLOCK_RESTRICT_SELF_TSYNC (ABI v8) Günther Noack
2026-04-21 17:58 ` [PATCH v3 4/4] man/man2/landlock_restrict_self.2: Document ABI requirement for logging flags Günther Noack
2026-04-21 22:00   ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260421175842.6870-2-gnoack3000@gmail.com \
    --to=gnoack3000@gmail.com \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mic@digikod.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox