Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3972249imm; Sat, 25 Aug 2018 06:32:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaDcPTC5FztrvTYW+3rUesrEIpY/9MTAJto3g23CZBI8/Bfxn58UGeYP/9Kh0+lo6LC/sfP X-Received: by 2002:a65:4d0a:: with SMTP id i10-v6mr5876822pgt.23.1535203943848; Sat, 25 Aug 2018 06:32:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535203943; cv=none; d=google.com; s=arc-20160816; b=MZdMYH01sTvISLE+MGsjubWqLuzTwhbpM8Sd4lkyLvPw5CTehSTyIVbA6/h8bJnnHI 16xmpfZPYFpNoYhX3CVwKdwKCSd9FD5bxddcqFO9QYPq6UXddPlL418ZGItn3JWlijCx rataWDId1/XYJumDBBVnexk4p0na2tCG2zJHQq38mBI/xqGOb+UbQ4v8JxAA2voGjiUO nP8gQRHCI9MTHiea6nMgfLX6ZcwK1xsF1WtktKLvuJSqh6uC+hznEOVBtY4CyiIvbyvK PjbwNL03XqHMbLO+UMb7nDiNPDgTW8vPgt03K3S3v6OioAfk1hDn03pXu25V1RPKGjZa Cxhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=h4Z1WlW7jiitlTP9PR2VFPgoXl6WDAxrbSzQ1P/TKGo=; b=rA728d+6w8s/0C7pTGPzU89rV+hfpo8zoVwzFbeq/xTFxUHkr5VzJxb2998XkbaPta 95mznhXqd9ZdA0nEG4xBGTNZKUMdTRIUM0AWv2xVR0+X+GN81AVC+2Irh9T3MfQjCA5T r8sxU6HHFFf+LOuxZLGMmUG6JwxVIM1C4gu1F/jUyFPm6GpjU+tqd6MO2qDZhVmEVT3U n3Bv7e4Csn1gjWCjeDYhick6A6cgJBh/eeGfic58hyIiSx/haIRBaEGFEYTI8Su3pcdr hMVU1yIhubPJFs3d3r+cLFiygRas3IexYOUgzGS5iPqUX4t8beaZ8MWTVZyxXTCAvqSy 1UzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si5139923pfg.90.2018.08.25.06.31.31; Sat, 25 Aug 2018 06:32:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbeHYRHJ (ORCPT + 99 others); Sat, 25 Aug 2018 13:07:09 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:47252 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeHYRHJ (ORCPT ); Sat, 25 Aug 2018 13:07:09 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1ftYbl-00036w-5G; Sat, 25 Aug 2018 21:28:05 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1ftYbh-0003OC-JA; Sat, 25 Aug 2018 21:28:01 +0800 Date: Sat, 25 Aug 2018 21:28:01 +0800 From: Herbert Xu To: Dave Watson Cc: Mauro Rossi , linux-crypto@vger.kernel.org, Junaid Shahid , linux-kernel@vger.kernel.org, Stephan Mueller Subject: Re: [PATCH] crypto: aesni - Use unaligned loads from gcm_context_data Message-ID: <20180825132801.fnsr72cx4s2ohovy@gondor.apana.org.au> References: <20180815172942.mkk56gh6poqgjgnb@davejwatson-mba.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180815172942.mkk56gh6poqgjgnb@davejwatson-mba.local> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 15, 2018 at 10:29:42AM -0700, Dave Watson wrote: > A regression was reported bisecting to 1476db2d12 > "Move HashKey computation from stack to gcm_context". That diff > moved HashKey computation from the stack, which was explicitly aligned > in the asm, to a struct provided from the C code, depending on > AESNI_ALIGN_ATTR for alignment. It appears some compilers may not > align this struct correctly, resulting in a crash on the movdqa > instruction when attempting to encrypt or decrypt data. > > Fix by using unaligned loads for the HashKeys. On modern > hardware there is no perf difference between the unaligned and > aligned loads. All other accesses to gcm_context_data already use > unaligned loads. > > Reported-by: Mauro Rossi > Fixes: 1476db2d12 ("Move HashKey computation from stack to gcm_context") > Signed-off-by: Dave Watson Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt