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]
Date:   Thu, 24 Sep 2020 10:40:16 +0300
From:   Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
To:     Amir Goldstein <amir73il@...il.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



On 9/23/20 7:36 PM, Amir Goldstein wrote:
>>> @@ -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?

Actually we've enabled index=on by default in kernel config in Virtuozzo 
only in the new update which is not yet released. So probably we can 
switch to index=nouuid with null uuid in fh.

> 
> Thanks,
> Amir.
> 

-- 
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ