Linux Manual Pages development
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "Günther Noack" <gnoack3000@gmail.com>
Cc: "Mickaël Salaün" <mic@digikod.net>, linux-man@vger.kernel.org
Subject: Re: [PATCH 1/2] man/man7/landlock.7: Adapt compatibility in code example to ABI v8
Date: Thu, 14 May 2026 13:51:59 +0200	[thread overview]
Message-ID: <agW3SQwVtbF6_kJL@devuan> (raw)
In-Reply-To: <20260514070417.7923-2-gnoack3000@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

Hi Günther!

On 2026-05-14T09:04:16+0200, Günther Noack wrote:
> * Bring the code example up to speed with Landlock ABI v8
> * Use the correct ABI level in the MIN() macro
> 
> Signed-off-by: Günther Noack <gnoack3000@gmail.com>

Thanks!  I've applied the patch.


Have a lovely day!
Alex

> ---
>  man/man7/landlock.7 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man7/landlock.7 b/man/man7/landlock.7
> index 06910ccab5b1..0e3a11489af2 100644
> --- a/man/man7/landlock.7
> +++ b/man/man7/landlock.7
> @@ -583,6 +583,9 @@ __u64 landlock_fs_access_rights[] = {
>      (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            */
>  };
>  \&
>  int abi = landlock_create_ruleset(NULL, 0,
> @@ -595,7 +598,7 @@ if (abi == \-1) {
>      perror("Unable to use Landlock");
>      return;  /* Graceful fallback: Do nothing.  */
>  }
> -abi = MIN(abi, 3);
> +abi = MIN(abi, 8);
>  \&
>  /* Only use the available rights in the ruleset.  */
>  attr.handled_access_fs &= landlock_fs_access_rights[abi \- 1];
> -- 
> 2.54.0
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-05-14 11:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14  7:04 [PATCH 0/2] Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX Günther Noack
2026-05-14  7:04 ` [PATCH 1/2] man/man7/landlock.7: Adapt compatibility in code example to ABI v8 Günther Noack
2026-05-14 11:51   ` Alejandro Colomar [this message]
2026-05-14  7:04 ` [PATCH 2/2] man/man7/landlock.7: Document LANDLOCK_ACCESS_FS_RESOLVE_UNIX (ABI v9) Günther Noack
2026-05-14 12:21   ` Alejandro Colomar
2026-05-15 17:47     ` Günther Noack

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=agW3SQwVtbF6_kJL@devuan \
    --to=alx@kernel.org \
    --cc=gnoack3000@gmail.com \
    --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