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]
Date:   Fri, 21 Apr 2023 04:34:56 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Haifeng Xu <haifeng.xu@...pee.com>
Cc:     mszeredi@...hat.com, bigeasy@...utronix.de, mcgrof@...nel.org,
        xiubli@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] vfs: clean up d_backing_inode() function

On Fri, Apr 21, 2023 at 10:50:05AM +0800, Haifeng Xu wrote:
> 
> 
> On 2023/4/21 04:45, Al Viro wrote:
> > On Wed, Apr 19, 2023 at 10:47:04AM +0000, Haifeng Xu wrote:
> >> d_backing_inode() does the same thing with d_inode(), so using
> >> d_inode() to get the inode of dentry instead of d_backing_inode().
> >>
> >> Signed-off-by: Haifeng Xu <haifeng.xu@...pee.com>
> >> Suggested-by: Miklos Szeredi <mszeredi@...hat.com>
> > 
> > Fine by me, but generally that kind of search-and-replace is
> > better done differently:
> > 
> > 1) patch replacing the definition of d_backing_inode() with
> > #define d_backing_inode d_inode
> > 
> > 2) mail to Linus, asking to do mechanical search-and-replace
> > just prior to -rc1; see e.g. 7c0f6ba682b9 for example of
> > that being done.  In this case the script would be
> > sed -i -e "s/\<d_backing_inode\>/d_inode/g" $(git grep -l -w "d_backing_inode")
> > sed -i -e "/#define d_inode d_inode/d" include/linux/dentry.h
> 
> Thanks for your suggestion.
> 
> The file "include/linux/dentry.h" doesn't exist, do you mean "include/linux/dcache.h"?

Yes.

> By the way, why we need to add a definiton first and delete it later instead of replacing 
> the "d_backing_inode" directly?

Because it's much harder to do in a sed script ;-)  Taking out one line is
easier than doing the same to comment + definition.  Seriously, try it; it's
doable, but it's not fun to write and even less so - to read.

> In addition, there's another patch need to be reviewed.
> link: https://lore.kernel.org/all/20230419072736.172593-1-haifeng.xu@shopee.com/

No problems with that one.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ