From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754445AbcLOSwq (ORCPT ); Thu, 15 Dec 2016 13:52:46 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:44683 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752731AbcLOSwJ (ORCPT ); Thu, 15 Dec 2016 13:52:09 -0500 MIME-Version: 1.0 In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB02401A1@AcuExch.aculab.com> References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214184605.24006-1-Jason@zx2c4.com> <20161214184605.24006-3-Jason@zx2c4.com> <063D6719AE5E284EB5DD2968C1650D6DB02401A1@AcuExch.aculab.com> From: "Jason A. Donenfeld" Date: Thu, 15 Dec 2016 19:51:13 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/3] random: use siphash24 instead of md5 for get_random_int/long To: David Laight Cc: Netdev , "kernel-hardening@lists.openwall.com" , LKML , "linux-crypto@vger.kernel.org" , Jean-Philippe Aumasson , Ted Tso Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Thu, Dec 15, 2016 at 11:14 AM, David Laight wrote: > 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]. I'll do both. Thanks for the suggestion. Jason