All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: Alejandro Colomar <alx.manpages@gmail.com>
Cc: "Mickaël Salaün" <mic@digikod.net>,
	"Michael Kerrisk" <mtk.manpages@gmail.com>,
	linux-man@vger.kernel.org
Subject: Re: [PATCH v5 3/3] landlock.7: Explain the best-effort fallback mechanism in the example
Date: Tue, 4 Apr 2023 09:33:54 +0200	[thread overview]
Message-ID: <20230404.16675e4d7765@gnoack.org> (raw)
In-Reply-To: <7eda6974-1f1f-66aa-f63c-f33daf2ab6e1@gmail.com>

Hello!

On Sun, Apr 02, 2023 at 12:01:43AM +0200, Alejandro Colomar wrote:
> On 4/1/23 19:19, Günther Noack wrote:
> > (It feels out of scope for this documentation patch, but do you think
> > these bitmasks should be defined in the uapi/linux/landlock.h header?
> > You have looked at so many man pages already -- Do you happen to know
> > other places in the kernel API where such a problem has come up?)
> 
> I don't remember having seen something similar in other pages.
> 
> I think defining a macro in uapi headers could be the right thing to
> do.  Something like LANDLOCK_ACCESS_FS_RIGHTS_MASK_ABI_{1,2,3} or
> other similar name?

Noted it on my TODO list - it's probably best discussed on the kernel
list whether this is the right approach.


> > 1) Make assumptions about the numbers, for brevity
> >    (as done in the patch I sent).
> > 
> >    [...]
> > 
> > 2) Use the constants from the header and OR them.
> > 
> >    [...]
> > 
> > 3) Third option is the middle way,
> >    naming the "highest" known access right for each ABI version:
> > 
> > __u64 landlock_fs_access_rights[] = {
> >     (LANDLOCK_ACCESS_FS_MAKE_SYM << 1) - 1,  /* ABI v1                 */
> >     (LANDLOCK_ACCESS_FS_REFER << 1) - 1,     /* ABI v2: add "refer"    */
> >     (LANDLOCK_ACCESS_FS_TRUNCATE << 1) - 1,  /* ABI v3: add "truncate" */
> > }
> 
> I'm not sure if I like this one.  I'll leave it up to you to decide
> the one you like.  :)

I'll ponder it a bit and send a new patch soon.

Mickaël, do you have any opinions/preferences on this?

–Günther

  reply	other threads:[~2023-04-04  7:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 17:24 [PATCH v5 1/3] landlock.7: Document Landlock ABI v2 (file reparenting; Linux 5.19) Günther Noack
2023-03-24 17:24 ` [PATCH v5 2/3] landlock.7: Document Landlock ABI v3 (file truncation; Linux 6.2) Günther Noack
2023-03-31 22:20   ` Alejandro Colomar
2023-03-24 17:24 ` [PATCH v5 3/3] landlock.7: Explain the best-effort fallback mechanism in the example Günther Noack
2023-03-24 18:24   ` Günther Noack
2023-03-31 22:29   ` Alejandro Colomar
2023-04-01 17:19     ` Günther Noack
2023-04-01 22:01       ` Alejandro Colomar
2023-04-04  7:33         ` Günther Noack [this message]
2023-04-05  2:50           ` Alejandro Colomar
2023-04-17 21:13           ` Mickaël Salaün
2023-04-18 14:47             ` Alejandro Colomar
2023-04-02  1:21       ` Alejandro Colomar
2023-04-04  7:17         ` Günther Noack
2023-03-31 22:17 ` [PATCH v5 1/3] landlock.7: Document Landlock ABI v2 (file reparenting; Linux 5.19) 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=20230404.16675e4d7765@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=mtk.manpages@gmail.com \
    /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.