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] [day] [month] [year] [list]
Message-ID: <CAJfpegtNMrFfwXjP8tMb0NvO=paDpESRBfueBit6mW2e7djhZg@mail.gmail.com>
Date:   Fri, 20 Jul 2018 10:32:37 +0200
From:   Miklos Szeredi <miklos@...redi.hu>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Miklos Szeredi <mszeredi@...hat.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 (v4.18 regression fix)] vfs: don't evict uninitialized inode

On Thu, Jul 19, 2018 at 11:45 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Wed, Jul 18, 2018 at 01:18:33PM +0100, Al Viro wrote:
>
>> BTW, why have you left generic_readlink() sitting around?  AFAICS,
>> it could've been folded into the only remaining caller just as
>> you've made it static in late 2016...  I'll fold it in;
>> just curious what was the reason for not doing that back then...
>
> BTW^2:
> const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done)
> {
>         const char *res = ERR_PTR(-EINVAL);
>         struct inode *inode = d_inode(dentry);
>
>         if (d_is_symlink(dentry)) {
>                 res = ERR_PTR(security_inode_readlink(dentry));
>                 if (!res)
>                         res = inode->i_op->get_link(dentry, inode, done);
>         }
>         return res;
> }
> hits a method call that is not needed in the majority of cases.  Is there
> any subtle reason why it shouldn't be
>
> const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done)
> {
>         const char *res = ERR_PTR(-EINVAL);
>         struct inode *inode = d_inode(dentry);
>
>         if (d_is_symlink(dentry)) {
>                 res = ERR_PTR(security_inode_readlink(dentry));
>                 if (!res)
>                         res = inode->i_link;
>                 if (!res)
>                         res = inode->i_op->get_link(dentry, inode, done);
>         }
>         return res;
> }
> instead?

Can't see any issues.  But I also don't think any of the callers are
seriously performance sensitive, so I guess it basically doesn't
matter.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ