lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230602-behoben-tauglich-b6ecd903f2a9@brauner>
Date:   Fri, 2 Jun 2023 15:08:33 +0200
From:   Christian Brauner <brauner@...nel.org>
To:     Aleksandr Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>
Cc:     Xiubo Li <xiubli@...hat.com>, stgraber@...ntu.com,
        linux-fsdevel@...r.kernel.org, Jeff Layton <jlayton@...nel.org>,
        Ilya Dryomov <idryomov@...il.com>, ceph-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 10/13] ceph: allow idmapped setattr inode op

On Fri, Jun 02, 2023 at 03:05:50PM +0200, Aleksandr Mikhalitsyn wrote:
> On Fri, Jun 2, 2023 at 2:54 PM Christian Brauner <brauner@...nel.org> wrote:
> >
> > On Fri, Jun 02, 2023 at 02:45:30PM +0200, Aleksandr Mikhalitsyn wrote:
> > > On Fri, Jun 2, 2023 at 3:30 AM Xiubo Li <xiubli@...hat.com> wrote:
> > > >
> > > >
> > > > On 5/24/23 23:33, Alexander Mikhalitsyn wrote:
> > > > > From: Christian Brauner <christian.brauner@...ntu.com>
> > > > >
> > > > > Enable __ceph_setattr() to handle idmapped mounts. This is just a matter
> > > > > of passing down the mount's idmapping.
> > > > >
> > > > > Cc: Jeff Layton <jlayton@...nel.org>
> > > > > Cc: Ilya Dryomov <idryomov@...il.com>
> > > > > Cc: ceph-devel@...r.kernel.org
> > > > > Signed-off-by: Christian Brauner <christian.brauner@...ntu.com>
> > > > > Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>
> > > > > ---
> > > > >   fs/ceph/inode.c | 11 +++++++++--
> > > > >   1 file changed, 9 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> > > > > index 37e1cbfc7c89..f1f934439be0 100644
> > > > > --- a/fs/ceph/inode.c
> > > > > +++ b/fs/ceph/inode.c
> > > > > @@ -2050,6 +2050,13 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
> > > > >
> > > > >       dout("setattr %p issued %s\n", inode, ceph_cap_string(issued));
> > > > >
> > > > > +     /*
> > > > > +      * The attr->ia_{g,u}id members contain the target {g,u}id we're
> >
> > This is now obsolete... In earlier imlementations attr->ia_{g,u}id was
> > used and contained the filesystem wide value, not the idmapped mount
> > value.
> >
> > However, this was misleading and we changed that in commit b27c82e12965
> > ("attr: port attribute changes to new types") and introduced dedicated
> > new types into struct iattr->ia_vfs{g,u}id. So the you need to use
> > attr->ia_vfs{g,u}id as documented in include/linux/fs.h and you need to
> > transform them into filesystem wide values and then to raw values you
> > send over the wire.
> >
> > Alex should be able to figure this out though.
> 
> Hi Christian,
> 
> Thanks for pointing this out. Unfortunately I wasn't able to notice
> that. I'll take a look closer and fix that.

Just to clarify: I wasn't trying to imply that you should've figured
this out on your own. I was just trying to say that you should be able
figure out the exact details how to implement this in ceph after I told
you about the attr->ia_vfs{g,u}id change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ