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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 23 Jun 2022 11:18:42 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Song Liu <song@...nel.org>
Cc:     open list <linux-kernel@...r.kernel.org>,
        linux-raid <linux-raid@...r.kernel.org>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] md/raid5: Fix divide type in raid5_make_request()



On 2022-06-23 11:15, Song Liu wrote:
> On Thu, Jun 23, 2022 at 9:56 AM Logan Gunthorpe <logang@...tatee.com> wrote:
>>
>> 0day reports a build failure on the hexagon architecture:
>>
>>   ld.lld: error: undefined symbol: __hexagon_udivdi3
>>      referenced by raid5.c
>>         md/raid5.o:(raid5_make_request) in archive drivers/built-in.a
>>      referenced by raid5.c
>>         md/raid5.o:(raid5_make_request) in archive drivers/built-in.a
>>      did you mean: __hexagon_udivsi3
>>         defined in: arch/hexagon/built-in.a(lib/udivsi3.o)
>>
>> This is caused by using DIV_ROUND_UP on a sector_t type.
>>
>> The actual value is known to be less than 256 so a wide 64bit divide
>> here is not desirable. Thus cast the argument to an int to ensure it
>> uses a 32bit divide.
> 
> I force pushed an update that uses DIV_ROUND_UP_SECTOR_T instead.
> I guess that should also work?

Ah, yes, that'll also fix the bug. I chose to cast to minimize the
performance impact of an unnecessarily wide divide. But I don't have any
strong basis to suggest the performance will be worse with the wider
division. So fix it whichever way you think is best.

Logan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ