From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756289AbdKCNnE (ORCPT ); Fri, 3 Nov 2017 09:43:04 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:37978 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756198AbdKCNnC (ORCPT ); Fri, 3 Nov 2017 09:43:02 -0400 Date: Fri, 3 Nov 2017 21:42:03 +0800 From: Herbert Xu To: Andrey Ryabinin Cc: "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Linus Torvalds , Jeffrey Walton , Megha Dey , Tim Chen , Andy Lutomirski , Josh Poimboeuf , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 1/2] x86/crypto/sha256-mb: fix panic due to unaligned access Message-ID: <20171103134203.GA8811@gondor.apana.org.au> References: <20171016155131.10118-1-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171016155131.10118-1-aryabinin@virtuozzo.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 16, 2017 at 06:51:30PM +0300, Andrey Ryabinin wrote: > struct sha256_ctx_mgr allocated in sha256_mb_mod_init() via kzalloc() > and later passed in sha256_mb_flusher_mgr_flush_avx2() function where > instructions vmovdqa used to access the struct. vmovdqa requires > 16-bytes aligned argument, but nothing guarantees that struct > sha256_ctx_mgr will have that alignment. Unaligned vmovdqa will > generate GP fault. > > Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment > requirements. > > Fixes: a377c6b1876e ("crypto: sha256-mb - submit/flush routines for AVX2") > Reported-by: Josh Poimboeuf > Signed-off-by: Andrey Ryabinin > Cc: Both patches applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt