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: <20191220212645.GA14042@jaegeuk-macbookpro.roam.corp.google.com>
Date:   Fri, 20 Dec 2019 13:26:45 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Chao Yu <yuchao0@...wei.com>,
        linux-f2fs-devel@...ts.sourceforge.net,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Chao Yu <chao@...nel.org>,
        Linux-Next <linux-next@...r.kernel.org>
Subject: Re: [RFC PATCH v5] f2fs: support data compression

On 12/19, Geert Uytterhoeven wrote:
> Hi,
> 
> On Mon, Dec 16, 2019 at 7:29 AM Chao Yu <yuchao0@...wei.com> wrote:
> >
> > This patch tries to support compression in f2fs.
> 
> 
> 
> > --- a/fs/f2fs/file.c
> > +++ b/fs/f2fs/file.c
> 
> > @@ -667,6 +719,24 @@ int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock)
> >         return err;
> >  }
> >
> > +int f2fs_truncate_blocks(struct inode *inode, u64 from, bool lock)
> > +{
> > +       u64 free_from = from;
> > +
> > +       /*
> > +        * for compressed file, only support cluster size
> > +        * aligned truncation.
> > +        */
> > +       if (f2fs_compressed_file(inode)) {
> > +               size_t cluster_size = PAGE_SIZE <<
> > +                                       F2FS_I(inode)->i_log_cluster_size;
> > +
> > +               free_from = roundup(from, cluster_size);
> 
> This is a 64-by-32 or 64-by-64 division, causing a link failure on
> 32-bit platforms:
> 
>     fs/f2fs/file.o: In function `f2fs_truncate_blocks':
>     file.c:(.text+0x1db4): undefined reference to `__udivdi3'
> 
> Please use DIV_ROUND_UP_ULL() instead.

Thanks, I applied it in:
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev

> 
> Reported-by: <noreply@...erman.id.au>
> 
> > +       }
> > +
> > +       return do_truncate_blocks(inode, free_from, lock);
> > +}
> 
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ