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]
Message-ID: <bcb46f56-fd24-5352-8006-8e30c8e2ad72@infradead.org>
Date:   Fri, 15 Dec 2017 11:55:26 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Scott Bauer <scott.bauer@...el.com>
Cc:     dm-devel@...hat.com, snitzer@...hat.com, agk@...hat.com,
        linux-kernel@...r.kernel.org, keith.busch@...el.com,
        jonathan.derrick@...el.com
Subject: Re: [PATCH v3 1/2] dm-unstripe: unstripe RAID 0/dm-striped device

On 12/15/2017 07:27 AM, Scott Bauer wrote:
> [snip]
> On Wed, Dec 13, 2017 at 04:11:44PM -0800, Randy Dunlap wrote:
>>
>> 	                                  >=
>>
> 
> Thanks, good catch.
> 
> 
>>> +	tot_sec = i_size_read(bbdev->bd_inode) >> SECTOR_SHIFT;
>>> +	mod = tot_sec % target->chunk_sectors;
>>
>> Did you build this on 32-bit also?  Is that '%' OK on 32-bit?
> 
> I've looked at this a bit and still can't figure out why this
> modulo operation would operate differently on a 32 versus a 64
> bit platform? I know sector_t is config dependent but the
> sector_t should be promoted to 64 bit width during the modulo
> operation.
> 
> Are you wondering whether sector_t is the right type for any of
> the math in this file? Perhaps we should be safe and only use
> u64s?

Just wondering if it causes a call to some glibc __mod() function
and if so, the code should be using sector_div() -- oops, that's
a divide and you want a modulus.  Oh well, we can address it if
it becomes a problem.


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ