From: Casey Schaufler <casey@schaufler-ca.com>
To: "Günther Noack" <gnoack3000@gmail.com>,
"Xiu Jianfeng" <xiujianfeng@huawei.com>
Cc: mic@digikod.net, paul@paul-moore.com, jmorris@namei.org,
serge@hallyn.com, shuah@kernel.org, corbet@lwn.net,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-doc@vger.kernel.org, casey@schaufler-ca.com
Subject: Re: [PATCH -next 0/5] landlock: add chmod and chown support
Date: Mon, 22 Aug 2022 12:35:18 -0700 [thread overview]
Message-ID: <39df1a34-51dc-da55-ff1c-59cab896c8a0@schaufler-ca.com> (raw)
In-Reply-To: <YwPWN/d15S24PuLS@nuc>
On 8/22/2022 12:17 PM, Günther Noack wrote:
> Hi!
>
> Very exciting to see! Thank you for sending this! :)
>
> I'm just throwing in some comments based on the very similar truncate
> patch set, in the hope that it helps. (But obviously, Mickaël Salaün
> has the last word on this code.)
>
> Slightly higher level question: Should we start to group the
> functionality of multiple LSM hooks under one Landlock flag? (Will it
> be harder to change the LSM hook interface in the future if we
> continue to add one flag per hook? Or is this structure already
> exposed to userspace by other LSMs?)
I'm not a landlock expert. The question is nonsensical, yet somewhat
frightening nonetheless. Could you put just a touch more context into
what you're asking for?
> For example, some of the "missing" operations listed on the Landlock
> documentation could also be grouped roughly as:
>
> Modifying files:
> - truncate
>
> Modifying file metadata:
> - chmod
> - chown
> - setxattr
> - utime
>
> Observing files (check presence and file metadata):
> - access
> - stat
> - readlink, following links (can observe symlink presence)
> - chdir (can observe dir presence and 'x' attribute)
>
> Ungrouped:
> - flock
> - ioctl
> - fcntl
>
> Do you have opinions on this?
>
> —Günther
>
> On Mon, Aug 22, 2022 at 07:46:56PM +0800, Xiu Jianfeng wrote:
>> hi,
>> this patchset adds chmod and chown support for landlock
>>
>> Xiu Jianfeng (5):
>> landlock: expand access_mask_t to u32 type
>> landlock: add chmod and chown support
>> landlock/selftests: add selftests for chmod and chown
>> landlock/samples: add chmod and chown support
>> landlock: update chmod and chown support in document
>>
>> Documentation/userspace-api/landlock.rst | 8 +-
>> include/uapi/linux/landlock.h | 8 +-
>> samples/landlock/sandboxer.c | 12 +-
>> security/landlock/fs.c | 16 +-
>> security/landlock/limits.h | 2 +-
>> security/landlock/ruleset.h | 2 +-
>> security/landlock/syscalls.c | 2 +-
>> tools/testing/selftests/landlock/base_test.c | 2 +-
>> tools/testing/selftests/landlock/fs_test.c | 234 ++++++++++++++++++-
>> 9 files changed, 274 insertions(+), 12 deletions(-)
>>
>> --
>> 2.17.1
>>
> --
next prev parent reply other threads:[~2022-08-22 19:35 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
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 [this message]
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=39df1a34-51dc-da55-ff1c-59cab896c8a0@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=corbet@lwn.net \
--cc=gnoack3000@gmail.com \
--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=mic@digikod.net \
--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