Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 21 Dec 2016 17:37:12 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: George Spelvin <linux@...encehorizons.net>
Cc: Andi Kleen <ak@...ux.intel.com>, David Miller <davem@...emloft.net>, 
	David Laight <David.Laight@...lab.com>, "Daniel J . Bernstein" <djb@...yp.to>, 
	Eric Biggers <ebiggers3@...il.com>, Eric Dumazet <eric.dumazet@...il.com>, 
	Hannes Frederic Sowa <hannes@...essinduktion.org>, 
	Jean-Philippe Aumasson <jeanphilippe.aumasson@...il.com>, kernel-hardening@...ts.openwall.com, 
	Linux Crypto Mailing List <linux-crypto@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, 
	Andy Lutomirski <luto@...capital.net>, Netdev <netdev@...r.kernel.org>, 
	Tom Herbert <tom@...bertland.com>, Linus Torvalds <torvalds@...ux-foundation.org>, 
	"Theodore Ts'o" <tytso@....edu>, Vegard Nossum <vegard.nossum@...il.com>
Subject: Re: HalfSipHash Acceptable Usage

Hi George,

On Wed, Dec 21, 2016 at 4:55 PM, George Spelvin
<linux@...encehorizons.net> wrote:
> Actually, DJB just made a very relevant suggestion.
>
> As I've mentioned, the 32-bit performance problems are an x86-specific
> problem.  ARM does very well, and other processors aren't bad at all.
>
> SipHash fits very nicely (and runs very fast) in the MMX registers.
>
> They're 64 bits, and there are 8 of them, so the integer registers can
> be reserved for pointers and loop counters and all that.  And there's
> reference code available.
>
> How much does kernel_fpu_begin()/kernel_fpu_end() cost?

In my experience, these functions are only worth calling when
processing more significant amounts of data. I don't have any
benchmarks, but when I _remove_ all of these calls in a kernel,
accelerated crypto gets noticeably faster (until the system crashes).
We can measure it, though.

By the way, if somehow SipHash becomes acceptably fast on x86, would
you consider HalfSipHash for hash tables to be no longer needed? Or do
you suspect that HalfSipHash will always be faster even on, say,
32-bit ARM.

Jason

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.