Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10186169ybi; Wed, 24 Jul 2019 17:55:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCnPWToDfStBHvTTbyR5D6frbHeKnugy3hj/ukzys+FbBtzrKvu820vts/43HmPrKew5TM X-Received: by 2002:aa7:8752:: with SMTP id g18mr13474621pfo.201.1564016156039; Wed, 24 Jul 2019 17:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564016156; cv=none; d=google.com; s=arc-20160816; b=VDktCwQQFYrQ4f6HINXIqKmXuDEHUtSkZspEBAV72VnmezBg0y2vw9xoaStNnReJwb nOwVSrT5ooOCfMypIV3oyb37N2EtaVaFDHnZ88Iy7WokwXF/vpmWPS8gVPAGn7op3lKa CTUL3PQRCGzOiWNY0BYYtvQ+T+h4i71+ofrKh1hz/kKagnhvb4O1z7nnEvGn+nRMxxuu d6vHxE0m2MXiEBD8SDKpkc1F5qneLZHldifej15JNX32IJggymHiOV0G0LPJ1Vqb1Jd8 z1Y8rXbETU5RWUkxFyyRuGX116pSPFGbhJG4BhzJkSIGBPkQcpSRk9VrfLhveeb9RQ5K X3dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DEX/9D+lEZVqjD8UECsdAF9gfWI3KJI9verDfdUCAjQ=; b=Yw//dMuPtI3JW8/fpoigq25TKbb6fY/F8ycjbkwQKUJSo8JGhjaEp3GPgDpPyLzBvR ASmkcSPOOYZ2myNEE1yWBOGtsfH2CUMzzPRSxlQZrLlavMheHfNRhYujDCVCbSB63SdG DmI4Vp7fdRneSE0UIxieCzhLcHS+rNnbl2Q4DS2ztjzzKntbTSg5KV0FrnofQamu1lJt lKa0UqPrReIdJGjs0C99Rh6jWBbAt2ltKnmWi2fl5n2ZlPf2d9XUD+bhg6qM7VLvnjiZ KYhewoy3g3qGfy4OxagWu6P4iqnhExI6t1n6vzgjNewTqxbhqxprWMLd8aULr2bAl8MF 8XVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qdTJeqE6; 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 cl7si16363435plb.267.2019.07.24.17.55.40; Wed, 24 Jul 2019 17:55:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=qdTJeqE6; 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 S2388875AbfGXTfr (ORCPT + 99 others); Wed, 24 Jul 2019 15:35:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:33538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389254AbfGXTfn (ORCPT ); Wed, 24 Jul 2019 15:35:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73EAF21951; Wed, 24 Jul 2019 19:35:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996942; bh=R2uVoCl7+JtEDoVTkZtGlMieRUdPFOP57pNTsyFkbTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qdTJeqE66PUyIsmqaJX3QS63FGRP0o71zqQCA+3x61ngklzEuWRjwfte178lxHVUA gSIJNfVyChvqLFsp5GZPLcsBlc0ZgOou1YdvJ+BrFlF2cZ2qAJO5OeeUh0wsDK5VGs sm2NuFewgZfmDBpqV9FTQWmfFunXriHI5fp7JRhU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Biggers , Christian Lamparter , Herbert Xu Subject: [PATCH 5.2 270/413] crypto: crypto4xx - fix blocksize for cfb and ofb Date: Wed, 24 Jul 2019 21:19:21 +0200 Message-Id: <20190724191755.539307524@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Lamparter commit 70c4997f34b6c6888b3ac157adec49e01d0df2d5 upstream. While the hardware consider them to be blockciphers, the reference implementation defines them as streamciphers. Do the right thing and set the blocksize to 1. This was found by CONFIG_CRYPTO_MANAGER_EXTRA_TESTS. This fixes the following issues: skcipher: blocksize for ofb-aes-ppc4xx (16) doesn't match generic impl (1) skcipher: blocksize for cfb-aes-ppc4xx (16) doesn't match generic impl (1) Cc: Eric Biggers Cc: stable@vger.kernel.org Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads") Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/amcc/crypto4xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1222,7 +1222,7 @@ static struct crypto4xx_alg_common crypt .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY, .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY, - .cra_blocksize = AES_BLOCK_SIZE, + .cra_blocksize = 1, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_module = THIS_MODULE, }, @@ -1302,7 +1302,7 @@ static struct crypto4xx_alg_common crypt .cra_priority = CRYPTO4XX_CRYPTO_PRIORITY, .cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY, - .cra_blocksize = AES_BLOCK_SIZE, + .cra_blocksize = 1, .cra_ctxsize = sizeof(struct crypto4xx_ctx), .cra_module = THIS_MODULE, },