Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753098AbbDXMUg (ORCPT ); Fri, 24 Apr 2015 08:20:36 -0400 Received: from helcar.hengli.com.au ([209.40.204.226]:51811 "EHLO helcar.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752220AbbDXMUd (ORCPT ); Fri, 24 Apr 2015 08:20:33 -0400 Date: Fri, 24 Apr 2015 20:20:13 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, torvalds@linux-foundation.org, smueller@chronox.de, davem@davemloft.net, linux-kernel@vger.kernel.org, bobbypowers@gmail.com Subject: Re: [PATCH] crypto: x86/sha512_ssse3 - fixup for asm function prototype change Message-ID: <20150424122012.GA31439@gondor.apana.org.au> References: <1429857429-13323-1-git-send-email-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1429857429-13323-1-git-send-email-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 31 On Fri, Apr 24, 2015 at 08:37:09AM +0200, Ard Biesheuvel wrote: > Patch e68410ebf626 ("crypto: x86/sha512_ssse3 - move SHA-384/512 > SSSE3 implementation to base layer") changed the prototypes of the > core asm SHA-512 implementations so that they are compatible with > the prototype used by the base layer. > > However, in one instance, the register that was used for passing the > input buffer was reused as a scratch register later on in the code, > and since the input buffer param changed places with the digest param > -which needs to be written back before the function returns- this > resulted in the scratch register to be dereferenced in a memory write > operation, causing a GPF. > > Fix this by changing the scratch register to use the same register as > the input buffer param again. > > Fixes: e68410ebf626 ("crypto: x86/sha512_ssse3 - move SHA-384/512 SSSE3 implementation to base layer") > Reported-By: Bobby Powers > Tested-By: Bobby Powers > Signed-off-by: Ard Biesheuvel Patch applied. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/