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:   Wed, 23 Nov 2016 22:05:41 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Jaegeuk Kim <jaegeuk@...nel.org>
Cc:     Chao Yu <yuchao0@...wei.com>, Yunlei He <heyunlei@...wei.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Fan Li <fanofcode.li@...sung.com>,
        linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: fix 32-bit build

On Wednesday, November 23, 2016 10:42:26 AM CET Jaegeuk Kim wrote:
> 
> Unfortunately, the sector number is usually a 64-bit number, and
> we guarantee that bdev_zone_size() returns a power-of-two number.

The sentence no longer makes sense. Maybe

Fortunately, bdev_zone_size() is guaranteed to return a power-of-two
number, so we can replace the % operator with a cheaper bit mask.

> @@ -693,7 +693,8 @@ static int __f2fs_issue_discard_zone(struct f2fs_sb_info *sbi,
>         }
>         sector = SECTOR_FROM_BLOCK(blkstart);
>  
> -       if (sector % bdev_zone_size(bdev) || nr_sects != bdev_zone_size(bdev)) {
> +       if (sector & (bdev_zone_size(bdev) - 1) ||
> 

looks good, thanks for following up!

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ