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: <CAHp75VcrmiP0GWR-zCBmqc7zA6uiC4dD8-HDikmWZxyEwXkRLw@mail.gmail.com>
Date:	Tue, 12 Apr 2016 17:58:20 +0300
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Guenter Roeck <linux@...ck-us.net>,
	Wim Van Sebroeck <wim@...ana.be>,
	Haavard Skinnemoen <hskinnemoen@...il.com>,
	Hans-Christian Egtvedt <egtvedt@...fundet.no>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	kernel-testers@...r.kernel.org, linux-watchdog@...r.kernel.org
Subject: Re: [PATCH] watchdog: dw_wdt: dont build for avr32

On Tue, Apr 12, 2016 at 4:39 PM, Sudip Mukherjee
<sudipm.mukherjee@...il.com> wrote:
> On Tuesday 12 April 2016 06:36 PM, Guenter Roeck wrote:
>>
>> On 04/11/2016 10:51 PM, Sudip Mukherjee wrote:
>>>
>>> The build of avr32 allmodconfig fails with the error:
>>> ERROR: "__avr32_udiv64" [drivers/watchdog/kempld_wdt.ko] undefined!
>>>
>> This means there is a direct 64 bit divide operation in the driver,
>> which we should identify and fix.

This driver will quite likely never be used on AVR32. Do we need to
fix this due to some other architectures?

> yes, there is.
>
> in function: kempld_wdt_set_stage_timeout()
> remainder = do_div(stage_timeout64, prescaler);

> Any idea how to fix it?

Not easy, however, prescaler value is ((1 << 21) - 1) which someone
might consider as (1 << 21) with lost in precision.

Thus, shift on 20 bits right, add last bit to the value and shift on 1
bit right more.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ