All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: fh@oppo.com, linux-f2fs-devel@lists.sourceforge.net,
	Bin Shu <shubin@oppo.com>
Subject: Re: [f2fs-dev] [PATCH] f2fs: fix to set inode->i_mode correctly for posix_acl_update_mode
Date: Wed, 16 Dec 2020 22:24:38 -0800	[thread overview]
Message-ID: <X9r5phvHEKL8K8RS@google.com> (raw)
In-Reply-To: <08854b69-717e-672e-de85-f1e41c6edd9e@huawei.com>

On 12/16, Chao Yu wrote:
> Jaegeuk,
> 
> Do you remember why we use i_acl_mode to store acl related mode?
> Can we get rid of it?

IIRC, it is used for error handling, so it seems we can't remove it.

> 
> Thanks,
> 
> On 2020/12/16 17:16, Chao Yu wrote:
> > On 2020/12/14 11:54, Weichao Guo wrote:
> > > We should update the ~S_IRWXUGO part of inode->i_mode in __setattr_copy,
> > > because posix_acl_update_mode updates mode based on inode->i_mode,
> > > which finally overwrites the ~S_IRWXUGO part of i_acl_mode with old i_mode.
> > > 
> > > Testcase to reproduce this bug:
> > > 0. adduser abc
> > > 1. mkfs.f2fs /dev/sdd
> > > 2. mount -t f2fs /dev/sdd /mnt/f2fs
> > > 3. mkdir /mnt/f2fs/test
> > > 4. setfacl -m u:abc:r /mnt/f2fs/test
> > > 5. chmod +s /mnt/f2fs/test
> > 
> > Good catch!
> > 
> > > 
> > > Signed-off-by: Weichao Guo <guoweichao@oppo.com>
> > > Signed-off-by: Bin Shu <shubin@oppo.com>
> > 
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > 
> > Thanks,
> > 
> > 
> > _______________________________________________
> > Linux-f2fs-devel mailing list
> > Linux-f2fs-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> > .
> > 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2020-12-17  6:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  3:54 [f2fs-dev] [PATCH] f2fs: fix to set inode->i_mode correctly for posix_acl_update_mode Weichao Guo
2020-12-16  9:16 ` Chao Yu
2020-12-16  9:21   ` Chao Yu
2020-12-17  6:24     ` Jaegeuk Kim [this message]
2020-12-22  8:24 ` Chao Yu
2020-12-22  9:32   ` Weichao Guo
2020-12-22 10:49     ` Chao Yu
2020-12-22 12:14       ` Weichao Guo
2020-12-23  1:14         ` Chao Yu
2020-12-23  4:38           ` Weichao Guo
2020-12-23  4:42             ` Weichao Guo
2020-12-23  8:48             ` Chao Yu

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=X9r5phvHEKL8K8RS@google.com \
    --to=jaegeuk@kernel.org \
    --cc=fh@oppo.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=shubin@oppo.com \
    --cc=yuchao0@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.