From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935293AbcLOKOo convert rfc822-to-8bit (ORCPT ); Thu, 15 Dec 2016 05:14:44 -0500 Received: from smtp-out4.electric.net ([192.162.216.185]:62060 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751701AbcLOKOm (ORCPT ); Thu, 15 Dec 2016 05:14:42 -0500 From: David Laight To: "'Jason A. Donenfeld'" , Netdev , "kernel-hardening@lists.openwall.com" , LKML , "linux-crypto@vger.kernel.org" CC: Jean-Philippe Aumasson , Ted Tso Subject: RE: [PATCH v3 3/3] random: use siphash24 instead of md5 for get_random_int/long Thread-Topic: [PATCH v3 3/3] random: use siphash24 instead of md5 for get_random_int/long Thread-Index: AQHSVjrFGs9xs+Oy6kWKkFY8cKVNnKEIyv0w Date: Thu, 15 Dec 2016 10:14:33 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DB02401A1@AcuExch.aculab.com> References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214184605.24006-1-Jason@zx2c4.com> <20161214184605.24006-3-Jason@zx2c4.com> In-Reply-To: <20161214184605.24006-3-Jason@zx2c4.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Behalf Of Jason A. Donenfeld > Sent: 14 December 2016 18:46 ... > + ret = *chaining = siphash24((u8 *)&combined, offsetof(typeof(combined), end), If you make the first argument 'const void *' you won't need the cast on every call. I'd also suggest making the key u64[2]. David