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 v2 0/3] Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX
Date: Fri, 15 May 2026 18:57:50 +0200 [thread overview]
Message-ID: <20260515165753.8830-1-gnoack3000@gmail.com> (raw)
Thanks for the review!
This documents the LANDLOCK_ACCESS_FS_RESOLVE_UNIX feature,
introduced in the upcoming Linux 7.1 (Landlock ABI v9).
I applied the suggestions unmodified in most cases. For the ABI
versions, I used the same style as in the landlock_restrict_self(2)
manpage, which I like for its succinctness.
* Patch 1: should already be applied (including it just for
completeness, because it's not reflected in the git.kernel.org
mirror yet)
* Patch 2: Changes the ABI version style for existing documentation,
this is fine to apply before Linux 7.1.
* Patch 3: Describes the new "resolve UNIX" functionality in Linux 7.1
–Günther
Change Log
==========
V2:
- s/only applies/applies only/.
- Use italics for "*" in LANDLOCK_SCOPE_*.
- s/resolve attempt/resolution attempt/
- ABI version indicators: Use cardinals for ABI versions, and refer
to it next to tagged paragraph titles where possible. Also,
introduce an additional preparation commit to fix this up for the
exitisting documentation.
- Use C99 comments in source code example
V1: Initial version
Günther Noack (3):
man/man7/landlock.7: Adapt compatibility in code example to ABI v8
man/man7/landlock.7: Simplify references to ABI versions
man/man7/landlock.7: Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX (ABI v9)
man/man7/landlock.7 | 75 ++++++++++++++++++++++++++++++---------------
1 file changed, 51 insertions(+), 24 deletions(-)
Range-diff against v1:
1: 07b854876a09 = 1: fd6de0eb416e man/man7/landlock.7: Adapt compatibility in code example to ABI v8
-: ------------ > 2: 33b9972559c5 man/man7/landlock.7: Simplify references to ABI versions
2: 414c8fa8f643 ! 3: a937ec4a113b man/man7/landlock.7: Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX (ABI v9)
@@ Commit message
## man/man7/landlock.7 ##
@@ man/man7/landlock.7: whose implementations are safe and return the right error codes
+ .BR FICLONERANGE ,
+ .BR FIDEDUPERANGE )
.RE
- .IP
- This access right is available since the fifth version of the Landlock ABI.
+.TP
-+.B LANDLOCK_ACCESS_FS_RESOLVE_UNIX
++.BR LANDLOCK_ACCESS_FS_RESOLVE_UNIX " (since Landlock ABI version 9)"
+Look up pathname UNIX
+domain sockets
+.RB ( unix (7)).
@@ man/man7/landlock.7: whose implementations are safe and return the right error c
+.BR sendmsg (2)
+with an explicit recipient address.
+.IP
-+This access right only applies to connections to UNIX server sockets
++This access right applies only to connections to UNIX server sockets
+which were created outside the newly created Landlock domain
+(e.g., from within a parent domain or from an unrestricted process).
+Newly created UNIX servers
@@ man/man7/landlock.7: whose implementations are safe and return the right error c
+In this regard,
+.B LANDLOCK_ACCESS_FS_RESOLVE_UNIX
+has the same semantics as the
-+.B LANDLOCK_SCOPE_*
++.BI LANDLOCK_SCOPE_ *
+flags.
+.IP
-+If a resolve attempt is denied,
++If a resolution attempt is denied,
+the operation returns an
+.B EACCES
+error,
+in line with other filesystem access rights
+(but different to denials for abstract UNIX domain sockets).
-+.IP
-+This access right is available since the ninth version of the Landlock ABI.
.P
Whether an opened file can be truncated with
.BR ftruncate (2)
@@ man/man7/landlock.7: and only use the available subset of access rights:
- (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v6: same */
- (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v7: same */
- (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v8: same */
-+ (LANDLOCK_ACCESS_FS_MAKE_SYM << 1) \- 1, /* v1 */
-+ (LANDLOCK_ACCESS_FS_REFER << 1) \- 1, /* v2: add "refer" */
-+ (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1, /* v3: add "truncate" */
-+ (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1, /* v4: TCP support */
-+ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v5: add "ioctl_dev" */
-+ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v6: same */
-+ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v7: same */
-+ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, /* v8: same */
-+ (LANDLOCK_ACCESS_FS_RESOLVE_UNIX << 1) \- 1, /* v9: add "resolve_unix" */
++ (LANDLOCK_ACCESS_FS_MAKE_SYM << 1) \- 1, // v1
++ (LANDLOCK_ACCESS_FS_REFER << 1) \- 1, // v2: add "refer"
++ (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1, // v3: add "truncate"
++ (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1, // v4: TCP support
++ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, // v5: add "ioctl_dev"
++ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, // v6: same
++ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, // v7: same
++ (LANDLOCK_ACCESS_FS_IOCTL_DEV << 1) \- 1, // v8: same
++ (LANDLOCK_ACCESS_FS_RESOLVE_UNIX << 1) \- 1, // v9: add "resolve_unix"
};
\&
int abi = landlock_create_ruleset(NULL, 0,
--
2.54.0
next reply other threads:[~2026-05-15 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 16:57 Günther Noack [this message]
2026-05-15 16:57 ` [PATCH v2 1/3] man/man7/landlock.7: Adapt compatibility in code example to ABI v8 Günther Noack
2026-05-15 16:57 ` [PATCH v2 2/3] man/man7/landlock.7: Simplify references to ABI versions Günther Noack
2026-05-15 22:54 ` Alejandro Colomar
2026-05-15 16:57 ` [PATCH v2 3/3] man/man7/landlock.7: Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX (ABI v9) Günther Noack
2026-05-15 22:56 ` 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=20260515165753.8830-1-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