From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Christian Brauner <brauner@kernel.org>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"david@fromorbit.com" <david@fromorbit.com>,
"djwong@kernel.org" <djwong@kernel.org>,
"willy@infradead.org" <willy@infradead.org>,
"jlayton@kernel.org" <jlayton@kernel.org>
Subject: Re: [PATCH v7 1/4] fs: move sgid stripping operation from inode_init_owner into mode_strip_sgid
Date: Tue, 26 Apr 2022 09:22:08 +0000 [thread overview]
Message-ID: <6267C828.3040907@fujitsu.com> (raw)
In-Reply-To: <20220426083933.74jjezusejrpsi6z@wittgenstein>
on 2022/4/26 16:39, Christian Brauner wrote:
> On Tue, Apr 26, 2022 at 07:39:07AM +0000, xuyang2018.jy@fujitsu.com wrote:
>> on 2022/4/26 15:06, Christian Brauner wrote:
>>> On Tue, Apr 26, 2022 at 12:19:49PM +0800, Yang Xu wrote:
>>>> This has no functional change. Just create and export mode_strip_sgid
>>>> api for the subsequent patch. This function is used to strip S_ISGID mode
>>>> when init a new inode.
>>>>
>>>> Reviewed-by: Darrick J. Wong<djwong@kernel.org>
>>>> Reviewed-by: Christian Brauner (Microsoft)<brauner@kernel.org>
>>>> Signed-off-by: Yang Xu<xuyang2018.jy@fujitsu.com>
>>>> ---
>>>
>>> Since this is a very sensitive patch series I think we need to be
>>> annoyingly pedantic about the commit messages. This is really only
>>> necessary because of the nature of these changes so you'll forgive me
>>> for being really annoying about this. Here's what I'd change the commit
>>> message to:
>>>
>>> fs: add mode_strip_sgid() helper
>>>
>>> Add a dedicated helper to handle the setgid bit when creating a new file
>>> in a setgid directory. This is a preparatory patch for moving setgid
>>> stripping into the vfs. The patch contains no functional changes.
>>>
>>> Currently the setgid stripping logic is open-coded directly in
>>> inode_init_owner() and the individual filesystems are responsible for
>>> handling setgid inheritance. Since this has proven to be brittle as
>>> evidenced by old issues we uncovered over the last months (see [1] to
>>> [3] below) we will try to move this logic into the vfs.
>>>
>>> Link: e014f37db1a2 ("xfs: use setattr_copy to set vfs inode attributes" [1]
>>> Link: 01ea173e103e ("xfs: fix up non-directory creation in SGID directories") [2]
>>> Link: fd84bfdddd16 ("ceph: fix up non-directory creation in SGID directories") [3]
>>
>> This seems better, thanks.
>>
>> ps: Sorry, forgive my poor ability for write this.
>
> This really isn't any comment on your ability to write this! I tried to
> make this clear but I obviously failed.
>
> It is really just that this has an associated non-zero regression risk
> and we need to make sure to highlight this and be very clear about the
> motivation for this change. So it's equal parts pedantry and trying to
> keep our own heads off the guillotine.
Understand. So do you have other comments? I plan to send a v8(based on
5.18-rc4).
prev parent reply other threads:[~2022-04-26 10:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 4:19 [PATCH v7 1/4] fs: move sgid stripping operation from inode_init_owner into mode_strip_sgid Yang Xu
2022-04-26 4:19 ` [PATCH v7 2/4] fs: Add missing umask strip in vfs_tmpfile Yang Xu
2022-04-26 4:19 ` [PATCH v7 3/4] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem Yang Xu
2022-04-26 5:21 ` Darrick J. Wong
2022-04-26 8:34 ` Christian Brauner
2022-04-26 4:19 ` [PATCH v7 4/4] ceph: Remove S_ISGID stripping code in ceph_finish_async_create Yang Xu
2022-04-26 7:14 ` Christian Brauner
2022-04-26 8:43 ` xuyang2018.jy
2022-04-26 7:06 ` [PATCH v7 1/4] fs: move sgid stripping operation from inode_init_owner into mode_strip_sgid Christian Brauner
2022-04-26 7:39 ` xuyang2018.jy
2022-04-26 8:39 ` Christian Brauner
2022-04-26 9:22 ` xuyang2018.jy [this message]
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=6267C828.3040907@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=brauner@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/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).