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: <CAOQ4uxhjWsK1dfQu4K8uvRyGeGnFrM6opq32RxMOT4pWdqm+3A@mail.gmail.com>
Date:   Wed, 23 Sep 2020 19:36:01 +0300
From:   Amir Goldstein <amir73il@...il.com>
To:     Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
Cc:     Miklos Szeredi <miklos@...redi.hu>,
        Vivek Goyal <vgoyal@...hat.com>,
        overlayfs <linux-unionfs@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] ovl: introduce new "index=nouuid" option for inodes
 index feature

> > @@ -414,7 +415,7 @@ static int ovl_check_origin(struct ovl_fs *ofs, struct dentry *upperdentry,
> >   * Return 0 on match, -ESTALE on mismatch, < 0 on error.
> >   */
> >  static int ovl_verify_fh(struct dentry *dentry, const char *name,
> > -                        const struct ovl_fh *fh)
> > +                        const struct ovl_fh *fh, bool nouuid)
> >  {
> >         struct ovl_fh *ofh = ovl_get_fh(dentry, name);
> >         int err = 0;
> > @@ -425,8 +426,14 @@ static int ovl_verify_fh(struct dentry *dentry, const char *name,
> >         if (IS_ERR(ofh))
> >                 return PTR_ERR(ofh);
> >
> > -       if (fh->fb.len != ofh->fb.len || memcmp(&fh->fb, &ofh->fb, fh->fb.len))
> > +       if (fh->fb.len != ofh->fb.len) {
> >                 err = -ESTALE;
> > +       } else {
> > +               if (nouuid && !uuid_equal(&fh->fb.uuid, &ofh->fb.uuid))
> > +                       ofh->fb.uuid = fh->fb.uuid;
> > +               if (memcmp(&fh->fb, &ofh->fb, fh->fb.len))
> > +                       err = -ESTALE;
> > +       }
> >

On second thought I am wondering if we should do that differently.
If users want to work with index=nouuid, they need to work with it from day 1.
index=nouuid should export null uuid in NFS handles and write null uuid
in trusted.overlay.origin xattr.

So in ovl_encode_real_fh() you set null uuid and
instead of relaxing uuid_equal() in ovl_decode_real_fh()
you change it to uuid_is_null().

Do you have a problem with that for Virtuozzo use case?

Thanks,
Amir.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ