Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbcLNRuG (ORCPT ); Wed, 14 Dec 2016 12:50:06 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:60222 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753464AbcLNRtx (ORCPT ); Wed, 14 Dec 2016 12:49:53 -0500 MIME-Version: 1.0 In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB023F7BD@AcuExch.aculab.com> References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214035927.30004-3-Jason@zx2c4.com> <1e502c6b-cda3-c46d-2535-fcfb58f443a9@stressinduktion.org> <063D6719AE5E284EB5DD2968C1650D6DB023F7BD@AcuExch.aculab.com> From: "Jason A. Donenfeld" Date: Wed, 14 Dec 2016 18:49:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/4] secure_seq: use siphash24 instead of md5_transform To: David Laight Cc: Hannes Frederic Sowa , Netdev , "kernel-hardening@lists.openwall.com" , Andi Kleen , LKML , Linux Crypto Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 584 Lines: 12 On Wed, Dec 14, 2016 at 3:47 PM, David Laight wrote: > Just remove the __packed and ensure that the structure is 'nice'. > This includes ensuring there is no 'tail padding'. > In some cases you'll need to put the port number into a 32bit field. I'd rather not. There's no point in wasting extra cycles on hashing useless data, just for some particular syntactic improvement. __packed __aligned(8) will do what we want perfectly, I think. > I'd also require that the key be aligned. Yep, I'll certainly do this for the siphash24_aligned version in the v3.