From: "Mickaël Salaün" <mic@digikod.net>
To: Xiu Jianfeng <xiujianfeng@huawei.com>,
paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com,
shuah@kernel.org, corbet@lwn.net
Cc: linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH -next 5/5] landlock: update chmod and chown support in document
Date: Mon, 22 Aug 2022 23:25:35 +0200 [thread overview]
Message-ID: <68629a11-93c1-d7ab-ad3d-0fdbde1a35e3@digikod.net> (raw)
In-Reply-To: <20220822114701.26975-6-xiujianfeng@huawei.com>
On 22/08/2022 13:47, Xiu Jianfeng wrote:
> update LANDLOCK_ACCESS_FS_{CHMOD, CHOWN} support and add abi change
> in the document.
>
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> ---
> Documentation/userspace-api/landlock.rst | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/userspace-api/landlock.rst b/Documentation/userspace-api/landlock.rst
> index 2509c2fbf98f..05ab338db529 100644
> --- a/Documentation/userspace-api/landlock.rst
> +++ b/Documentation/userspace-api/landlock.rst
> @@ -61,7 +61,9 @@ the need to be explicit about the denied-by-default access rights.
> LANDLOCK_ACCESS_FS_MAKE_BLOCK |
> LANDLOCK_ACCESS_FS_MAKE_SYM |
> LANDLOCK_ACCESS_FS_REFER |
> - LANDLOCK_ACCESS_FS_TRUNCATE,
> + LANDLOCK_ACCESS_FS_TRUNCATE |
> + LANDLOCK_ACCESS_FS_CHMOD |
> + LANDLOCK_ACCESS_FS_CHOWN
> };
>
> Because we may not know on which kernel version an application will be
> @@ -90,6 +92,10 @@ the ABI.
> case 2:
> /* Removes LANDLOCK_ACCESS_FS_TRUNCATE for ABI < 3 */
> ruleset_attr.handled_access_fs &= ~LANDLOCK_ACCESS_FS_TRUNCATE;
There is a missing fall-through attribute here.
> + case 3:
> + /* Removes LANDLOCK_ACCESS_FS_{CHMOD, CHOWN} for ABI < 4 */
> + ruleset_attr.handled_access_fs &= ~(LANDLOCK_ACCESS_FS_CHMOD |
> + LANDLOCK_ACCESS_FS_CHOWN);
> }
>
> This enables to create an inclusive ruleset that will contain our rules.
next prev parent reply other threads:[~2022-08-22 21:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 11:46 [PATCH -next 0/5] landlock: add chmod and chown support Xiu Jianfeng
2022-08-22 11:46 ` [PATCH -next 1/5] landlock: expand access_mask_t to u32 type Xiu Jianfeng
2022-08-22 11:46 ` [PATCH -next 2/5] landlock: add chmod and chown support Xiu Jianfeng
2022-08-22 18:25 ` Günther Noack
2022-08-22 21:07 ` Mickaël Salaün
2022-08-23 12:50 ` xiujianfeng
2022-08-24 11:44 ` Mickaël Salaün
2022-08-26 8:36 ` xiujianfeng
2022-08-26 9:36 ` Mickaël Salaün
2022-08-26 11:14 ` xiujianfeng
2022-08-26 11:32 ` Mickaël Salaün
2022-08-22 11:46 ` [PATCH -next 3/5] landlock/selftests: add selftests for chmod and chown Xiu Jianfeng
2022-08-22 18:53 ` Günther Noack
2022-08-22 21:28 ` Mickaël Salaün
2022-08-24 8:27 ` xiujianfeng
2022-08-22 19:26 ` Günther Noack
2022-08-27 11:14 ` xiujianfeng
2022-08-27 16:57 ` Günther Noack
2022-08-22 11:47 ` [PATCH -next 4/5] landlock/samples: add chmod and chown support Xiu Jianfeng
2022-08-22 11:47 ` [PATCH -next 5/5] landlock: update chmod and chown support in document Xiu Jianfeng
2022-08-22 21:25 ` Mickaël Salaün [this message]
2022-08-22 19:17 ` [PATCH -next 0/5] landlock: add chmod and chown support Günther Noack
2022-08-22 19:35 ` Casey Schaufler
2022-08-22 21:18 ` Günther Noack
2022-08-22 21:21 ` Mickaël Salaün
2022-08-22 21:53 ` Casey Schaufler
2022-08-23 17:10 ` 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=68629a11-93c1-d7ab-ad3d-0fdbde1a35e3@digikod.net \
--to=mic@digikod.net \
--cc=corbet@lwn.net \
--cc=jmorris@namei.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=shuah@kernel.org \
--cc=xiujianfeng@huawei.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;
as well as URLs for NNTP newsgroup(s).