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:   Mon, 18 Jul 2022 10:18:18 +0200
From:   Miklos Szeredi <miklos@...redi.hu>
To:     Jiachen Zhang <zhangjiachen.jaycee@...edance.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Xie Yongji <xieyongji@...edance.com>, fam.zheng@...edance.com,
        Miklos Szeredi <mszeredi@...hat.com>
Subject: Re: [PATCH] fuse: writeback_cache consistency enhancement (writeback_cache_v2)

On Mon, 18 Jul 2022 at 08:01, Jiachen Zhang
<zhangjiachen.jaycee@...edance.com> wrote:
>
> On Fri, Jul 15, 2022 at 6:07 PM Miklos Szeredi <miklos@...redi.hu> wrote:
> >
> > On Fri, 24 Jun 2022 at 07:58, Jiachen Zhang
> > <zhangjiachen.jaycee@...edance.com> wrote:

> > > +       if (fc->writeback_cache_v2 && S_ISREG(inode->i_mode)) {
> > > +               inode_lock(inode);
> >
> > I don't think this can work.   fuse_change_attributes() might be
> > called from within inlode locked context.  E.g.
> >
> > lookup_slow -> __lookup_slow -> d_revalidate -> fuse_dentry_revalidate
> > -> fuse_change_attributes
> >
>
> Yes, this is a problem that should be fixed. As we can not check the
> inode lock state from the inode->i_rwsem structure, I think we can
> pass the inode lock state along the FUSE function call-path to
> fuse_change_attributes(), and only when we can certainly know whether
> the inode is locked or unlocked then we continue the
> writeback_cache_v2 logics. What do you think?

Not liking it very much.

Better create a new lock for this purpose that we do always know the state of.

Thanks,
Miklos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ