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: <1461864170.2307.19.camel@HansenPartnership.com>
Date:	Thu, 28 Apr 2016 10:22:50 -0700
From:	James Bottomley <James.Bottomley@...senPartnership.com>
To:	zengzhaoxiu@....com, akpm@...ux-foundation.org, linux@...izon.com,
	peterz@...radead.org
Cc:	Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>,
	Richard Henderson <rth@...ddle.net>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Matt Turner <mattst88@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	James Hogan <james.hogan@...tec.com>,
	Michal Simek <monstr@...str.eu>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Ley Foon Tan <lftan@...era.com>,
	Jonas Bonn <jonas@...thpole.se>,
	"James E.J. Bottomley" <jejb@...isc-linux.org>,
	Helge Deller <deller@....de>,
	Chen Liqin <liqin.linux@...il.com>,
	Lennox Wu <lennox.wu@...il.com>, Rich Felker <dalias@...c.org>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, linux-alpha@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	uclinux-h8-devel@...ts.sourceforge.jp,
	linux-m68k@...ts.linux-m68k.org, linux-metag@...r.kernel.org,
	linux-mips@...ux-mips.org, nios2-dev@...ts.rocketboards.org,
	linux@...ts.openrisc.net, linux-parisc@...r.kernel.org,
	linux-sh@...r.kernel.org, sparclinux@...r.kernel.org
Subject: Re: [patch V3] lib: GCD: add binary GCD algorithm

On Thu, 2016-04-28 at 19:43 +0800, zengzhaoxiu@....com wrote:
> From: Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
> 
> Because some architectures (alpha, armv6, etc.) don't provide 
> hardware division, the mod operation is slow! Binary GCD algorithm 
> uses simple arithmetic operations, it replaces division with 
> arithmetic shifts, comparisons, and subtractions.
> 
> I have compiled successfully with x86_64_defconfig and 
> i386_defconfig.

What's the reason for wanting to optimize this and thus have to
maintain (and test) two separate code paths, which is a significant
expense? As far as I can see, gcd() is mosly used in finding optimal
clocks for operations, which is usually done at start of day and not
time critical.

James


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ