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: <CACOAw_yE01siQ3AgK=PRdoiD3kX1Wn2aAFDb3V9MKPecn6pcYA@mail.gmail.com>
Date: Tue, 7 Jan 2025 10:16:03 -0800
From: Daeho Jeong <daeho43@...il.com>
To: Chao Yu <chao@...nel.org>
Cc: Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org, 
	linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: don't call block truncation for aliased file

On Tue, Jan 7, 2025 at 7:00 AM Chao Yu via Linux-f2fs-devel
<linux-f2fs-devel@...ts.sourceforge.net> wrote:
>
> On 2025/1/7 10:32, Jaegeuk Kim via Linux-f2fs-devel wrote:
> > This patch should avoid the below warning which does not corrupt the metadata
> > tho.
> >
> > [   51.508120][  T253] F2FS-fs (dm-59): access invalid blkaddr:36
> > [   51.508156][  T253]  __f2fs_is_valid_blkaddr+0x330/0x384
> > [   51.508162][  T253]  f2fs_is_valid_blkaddr_raw+0x10/0x24
> > [   51.508163][  T253]  f2fs_truncate_data_blocks_range+0x1ec/0x438
> > [   51.508177][  T253]  f2fs_remove_inode_page+0x8c/0x148
> > [   51.508194][  T253]  f2fs_evict_inode+0x230/0x76c
> >
> > Fixes: 128d333f0dff ("f2fs: introduce device aliasing file")
> > Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> > ---
> >   fs/f2fs/node.c | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
> > index c04ee1a7ce57..06313e1eb884 100644
> > --- a/fs/f2fs/node.c
> > +++ b/fs/f2fs/node.c
> > @@ -1274,6 +1274,12 @@ int f2fs_remove_inode_page(struct inode *inode)
> >               return err;
> >       }
> >
> > +     /* The aliase file must be truncated successfully. */
> > +     if (unlikely(IS_DEVICE_ALIASING(inode))) {
> > +             f2fs_put_dnode(&dn);
> > +             return 0;
>
> Do we need to keep calling truncate_node() for device alias inode in
> f2fs_remove_inode_page()?
>
> Thanks,
>
> > +     }
> > +
> >       /* remove potential inline_data blocks */
> >       if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
> >                               S_ISLNK(inode->i_mode))
>

How about modifying like the below?

        /* remove potential inline_data blocks */
        if (!IS_DEVICE_ALIASING(inode) &&
            (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
                                S_ISLNK(inode->i_mode)))

Thanks,


>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ