From: "Günther Noack" <gnoack3000@gmail.com>
To: Matthieu Buffet <matthieu@buffet.re>
Cc: "Alejandro Colomar" <alx@kernel.org>,
"Mickaël Salaün" <mic@digikod.net>,
linux-man@vger.kernel.org
Subject: Re: [PATCH 2/3] man/man7/landlock.7: Document AF_UNSPEC behaviour and error codes
Date: Sat, 26 Sep 2026 12:13:20 +0200 [thread overview]
Message-ID: <20260926.a28e567365e5@gnoack.org> (raw)
In-Reply-To: <20260917075853.10231-3-matthieu@buffet.re>
Nit in patch subject: "behavior" (man pages use US English)
On Thu, Sep 17, 2026 at 09:58:51AM +0200, Matthieu Buffet wrote:
> Current TCP documentation is missing a description of how AF_UNSPEC is
> mapped (depending on operation and address contents) to AF_INET, and the
> error codes synthesized by Landlock.
>
> Signed-off-by: Matthieu Buffet <matthieu@buffet.re>
> ---
> man/man7/landlock.7 | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/man/man7/landlock.7 b/man/man7/landlock.7
> index 880dd50582f3..51e63f40052c 100644
> --- a/man/man7/landlock.7
> +++ b/man/man7/landlock.7
> @@ -276,6 +276,24 @@ Bind a TCP socket to a local port.
> .TP
> .BR LANDLOCK_ACCESS_NET_CONNECT_TCP " (since Landlock ABI version 4)"
> Connect an active TCP socket to a remote port.
> +.P
> +Note on
> +.BR AF_UNSPEC :
> +Calling
> +.BR connect (2)
> +with that address family
I realize this is technically correct, but to a reader who does not
remember the nomenclature of the socket() call in detail, it is
possible to misinterpret "that address family" as referring to TCP,
rather than to "AF_UNSPEC".
connect(AF_UNSPEC) also does not work universally on all socket
families and types (see connect(2)), so the socket that it's being
used with also has an address family that plays a role here.
Maybe simpler to just say "AF_UNSPEC" instead of "that address
family"?
> +can only dissolve existing associations,
> +and as such is always allowed.
> +Calling
> +.BR bind (2)
> +with that address family
> +is treated the same way the network stack treats it:
> +for IPv4 and
> +.B INADDR_ANY
> +it is treated as
> +.BR AF_INET .
> +All other uses of that address family result in the same error codes
> +as when Landlock is not in use.
It's unclear to me how bind() with an AF_UNSPEC family address is
relevant to Landlock sandboxing? Is this relevant to include?
> .\"
> .SS Scope flags
> These flags enable isolating a sandboxed process from a set of IPC actions.
> --
> 2.47.3
>
I also could not find this change in the kernel documentation, I
assume you plan to copy it there as well?
–Günther
next prev parent reply other threads:[~2026-09-26 10:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 7:58 [PATCH 0/3] Add Landlock UDP support documentation Matthieu Buffet
2026-09-17 7:58 ` [PATCH 1/3] man/man2/landlock_add_rule.2: Clarify ephemeral port range Matthieu Buffet
2026-09-26 10:00 ` Günther Noack
2026-09-29 19:02 ` Mickaël Salaün
2026-09-17 7:58 ` [PATCH 2/3] man/man7/landlock.7: Document AF_UNSPEC behaviour and error codes Matthieu Buffet
2026-09-26 10:13 ` Günther Noack [this message]
2026-09-17 7:58 ` [PATCH 3/3] man/man7/landlock.7, man/man2/landlock_add_rule.2: Document UDP support Matthieu Buffet
2026-09-26 14:01 ` Günther Noack
2026-09-29 19:03 ` Mickaël Salaün
2026-09-29 19:02 ` [PATCH 0/3] Add Landlock UDP support documentation Mickaël Salaün
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=20260926.a28e567365e5@gnoack.org \
--to=gnoack3000@gmail.com \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=matthieu@buffet.re \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.