From: Alejandro Colomar <alx.manpages@gmail.com>
To: "Günther Noack" <gnoack3000@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: Wed, 5 Apr 2023 04:50:14 +0200 [thread overview]
Message-ID: <70de076b-86bd-fd09-6f59-cc682c2412f7@gmail.com> (raw)
In-Reply-To: <20230404.16675e4d7765@gnoack.org>
[-- Attachment #1.1: Type: text/plain, Size: 2426 bytes --]
Hello!
On 4/4/23 09:33, Günther Noack wrote:
> 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.
Sure! Feel free to CC me there.
>
>
>>> 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.
Ok. No hurries.
>
> Mickaël, do you have any opinions/preferences on this?
>
> –Günther
On 4/4/23 09:17, Günther Noack wrote:
>> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING#n132>
>> ...
> Thank you for pointing this out (and for reworking this
> documentation)!
:-)
> I had indeed missed the CONTRIBUTING doc.
> The "make -t" trick is also new to me.
Heh, I've fine-tuned makefiles too much to come up with this
workflow. :p
I met that feature long ago reading make(1)'s man page, but didn't
know what it would be useful for, until I recently realized it could
help in this use case.
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-04-05 2:50 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
2023-04-05 2:50 ` Alejandro Colomar [this message]
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=70de076b-86bd-fd09-6f59-cc682c2412f7@gmail.com \
--to=alx.manpages@gmail.com \
--cc=gnoack3000@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox