From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Xiubo Li <xiubli@redhat.com>
Cc: "david@fromorbit.com" <david@fromorbit.com>,
"djwong@kernel.org" <djwong@kernel.org>,
"brauner@kernel.org" <brauner@kernel.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"jlayton@kernel.org" <jlayton@kernel.org>
Subject: Re: [PATCH v3 7/7] ceph: Remove S_ISGID clear code in ceph_finish_async_create
Date: Mon, 18 Apr 2022 03:12:41 +0000 [thread overview]
Message-ID: <625CE57F.7050501@fujitsu.com> (raw)
In-Reply-To: <c26f5638-b97e-babf-3177-99fbcd4bbec2@redhat.com>
on 2022/4/18 11:04, Xiubo Li wrote:
>
> On 4/15/22 7:02 PM, Yang Xu wrote:
>> Since vfs has stripped S_ISGID, we don't need this code any more.
>>
>> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
>> ---
>> fs/ceph/file.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
>> index 6c9e837aa1d3..8e3b99853333 100644
>> --- a/fs/ceph/file.c
>> +++ b/fs/ceph/file.c
>> @@ -651,10 +651,6 @@ static int ceph_finish_async_create(struct inode
>> *dir, struct dentry *dentry,
>> /* Directories always inherit the setgid bit. */
>> if (S_ISDIR(mode))
>> mode |= S_ISGID;
>> - else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) &&
>> - !in_group_p(dir->i_gid) &&
>> - !capable_wrt_inode_uidgid(&init_user_ns, dir, CAP_FSETID))
>> - mode &= ~S_ISGID;
>
> Could you point me where has done this for ceph ?
You can see the 6th patch, it added prepare_mode for tmpfile, open,
mknodat, mkdirat in vfs. The prepare_mode does inode sgid strip and
umask strip.
Best Regards
Yang Xu
>
> -- Xiubo
>
>
>> } else {
>> in.gid = cpu_to_le32(from_kgid(&init_user_ns, current_fsgid()));
>> }
>
next prev parent reply other threads:[~2022-04-18 3:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 11:02 [PATCH v3 1/7] fs/inode: move sgid strip operation from inode_init_owner into inode_sgid_strip Yang Xu
2022-04-15 11:02 ` [PATCH v3 2/7] fs/namei.c: Add missing umask strip in vfs_tmpfile Yang Xu
2022-04-15 14:17 ` Christian Brauner
2022-04-18 2:55 ` xuyang2018.jy
2022-04-15 11:02 ` [PATCH v3 3/7] xfs: Only do posix acl setup/release operation under CONFIG_XFS_POSIX_ACL Yang Xu
2022-04-15 11:02 ` [PATCH v3 4/7] nfs3: Only do posix acl setup/release operation under CONFIG_NFS_V3_ACL Yang Xu
2022-04-15 11:02 ` [PATCH v3 5/7] fs: Add new helper prepare_mode Yang Xu
2022-04-15 14:19 ` Christian Brauner
2022-04-15 11:02 ` [PATCH v3 6/7] fs: strip file's S_ISGID mode on vfs instead of on underlying filesystem Yang Xu
2022-04-15 14:24 ` Christian Brauner
2022-04-18 3:05 ` xuyang2018.jy
2022-04-15 11:02 ` [PATCH v3 7/7] ceph: Remove S_ISGID clear code in ceph_finish_async_create Yang Xu
2022-04-18 3:04 ` Xiubo Li
2022-04-18 3:12 ` xuyang2018.jy [this message]
2022-04-15 14:09 ` [PATCH v3 1/7] fs/inode: move sgid strip operation from inode_init_owner into inode_sgid_strip Christian Brauner
2022-04-18 2:08 ` xuyang2018.jy
2022-04-18 3:08 ` Matthew Wilcox
2022-04-18 8:39 ` xuyang2018.jy
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=625CE57F.7050501@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=linux-nfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=xiubli@redhat.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