From: Vivek Goyal <vgoyal@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org,
virtio-fs-list <virtio-fs@redhat.com>,
Seth Forshee <seth.forshee@canonical.com>
Subject: Re: [Virtio-fs] [PATCH 1/1] fuse: send file mode updates using SETATTR
Date: Wed, 17 Mar 2021 13:01:19 -0400 [thread overview]
Message-ID: <20210317170119.GE324911@redhat.com> (raw)
In-Reply-To: <CAJfpegtD-6Xt3JDtoOtqJLXeDzVgjfaVJhHU8OQ8Lpw9tu2FzA@mail.gmail.com>
On Wed, Mar 17, 2021 at 04:43:35PM +0100, Miklos Szeredi wrote:
> On Tue, Mar 16, 2021 at 5:02 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > If ACL changes, it is possible that file mode permission bits change. As of
> > now fuse client relies on file server to make those changes. But it does
> > not send enough information to server so that it can decide where SGID
> > bit should be cleared or not. Server does not know if caller has CAP_FSETID
> > or not. It also does not know what are caller's group memberships and if any
> > of the groups match file owner group.
>
> Right. So what about performing the capability and group membership
> check in the client and sending the result of this check to the
> server?
Hi Miklos,
But that will still be non-atomic, right? I mean server probably will
do setxattr first, then check if SGID was cleared or not, and if it
has not been cleared, then it needs to set the mode.
IOW, we still have two operations (setxattr followed by mode setting).
I had thought about that option. But could not understand what does
it buy us as opposed to guest sending a SETATTR.
>
> Yes, need to extend fuse_setxattr_in.
Ok.
>
> There's still a race with uid and gid changing on the underlying
> filesystem, so the attributes need to be refreshed, but I don't think
> that's a big worry.
Yes, attributes will need to be refreshed.
Thanks
Vivek
WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org,
virtio-fs-list <virtio-fs@redhat.com>,
Luis Henriques <lhenriques@suse.de>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Seth Forshee <seth.forshee@canonical.com>
Subject: Re: [PATCH 1/1] fuse: send file mode updates using SETATTR
Date: Wed, 17 Mar 2021 13:01:19 -0400 [thread overview]
Message-ID: <20210317170119.GE324911@redhat.com> (raw)
In-Reply-To: <CAJfpegtD-6Xt3JDtoOtqJLXeDzVgjfaVJhHU8OQ8Lpw9tu2FzA@mail.gmail.com>
On Wed, Mar 17, 2021 at 04:43:35PM +0100, Miklos Szeredi wrote:
> On Tue, Mar 16, 2021 at 5:02 PM Vivek Goyal <vgoyal@redhat.com> wrote:
> >
> > If ACL changes, it is possible that file mode permission bits change. As of
> > now fuse client relies on file server to make those changes. But it does
> > not send enough information to server so that it can decide where SGID
> > bit should be cleared or not. Server does not know if caller has CAP_FSETID
> > or not. It also does not know what are caller's group memberships and if any
> > of the groups match file owner group.
>
> Right. So what about performing the capability and group membership
> check in the client and sending the result of this check to the
> server?
Hi Miklos,
But that will still be non-atomic, right? I mean server probably will
do setxattr first, then check if SGID was cleared or not, and if it
has not been cleared, then it needs to set the mode.
IOW, we still have two operations (setxattr followed by mode setting).
I had thought about that option. But could not understand what does
it buy us as opposed to guest sending a SETATTR.
>
> Yes, need to extend fuse_setxattr_in.
Ok.
>
> There's still a race with uid and gid changing on the underlying
> filesystem, so the attributes need to be refreshed, but I don't think
> that's a big worry.
Yes, attributes will need to be refreshed.
Thanks
Vivek
next prev parent reply other threads:[~2021-03-17 17:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 16:01 [Virtio-fs] [PATCH 0/1] fuse: acl: Send file mode updates using SETATTR Vivek Goyal
2021-03-16 16:01 ` Vivek Goyal
2021-03-16 16:01 ` [Virtio-fs] [PATCH 1/1] fuse: send " Vivek Goyal
2021-03-16 16:01 ` Vivek Goyal
2021-03-17 15:43 ` [Virtio-fs] " Miklos Szeredi
2021-03-17 15:43 ` Miklos Szeredi
2021-03-17 17:01 ` Vivek Goyal [this message]
2021-03-17 17:01 ` Vivek Goyal
2021-03-17 19:25 ` [Virtio-fs] " Miklos Szeredi
2021-03-17 19:25 ` Miklos Szeredi
2021-03-17 22:57 ` [Virtio-fs] " Vivek Goyal
2021-03-17 22:57 ` Vivek Goyal
2021-03-17 14:29 ` [Virtio-fs] [PATCH 0/1] fuse: acl: Send " Luis Henriques
2021-03-17 14:29 ` Luis Henriques
2021-03-17 15:18 ` [Virtio-fs] " Vivek Goyal
2021-03-17 15:18 ` Vivek Goyal
2021-03-17 15:35 ` [Virtio-fs] " Luis Henriques
2021-03-17 15:35 ` Luis Henriques
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=20210317170119.GE324911@redhat.com \
--to=vgoyal@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=seth.forshee@canonical.com \
--cc=virtio-fs@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 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.