Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10423795ybi; Wed, 24 Jul 2019 22:58:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtjO1YiaUZinXV7htVjoKsl8DSrCoAth1dolwfvauWZzNDa72PpTHIYyehZJbd1YSZIi3M X-Received: by 2002:a17:90a:35e5:: with SMTP id r92mr92550436pjb.34.1564034333424; Wed, 24 Jul 2019 22:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034333; cv=none; d=google.com; s=arc-20160816; b=IIYoXzYX56fIVaqGWBUYd3uJFQEh7GucfX9jZtcSgTCHutLvBgva6jiSZYolqm0Uhc b9VbJOuhnquDDDEkgDcRtmpP6KtsnFJ1s0fVgqSTk4sb9cmNflsLBkE4WmVNfFf6cN2N JLiq56PdgQE5l6w5+BoKKbJvGfVERl+v0yBetQyYaU+Hrpc1db852WB+MlbYB3ZGX8MK oCfhW60AnjP4cHc9ZtUfYL4IVRhRx7wggGxMYJhBtM1N3dgRtcEFpgsafJxwX3jYEJ2p qTRhwAiOnNHf8IP64Hbu45atnX5GFMU3ETQRwRvCrX3tOZyzfYjkY6+SM0meBjQJsLnb pHLw== 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=SWl2lOLsGz4WjRLwdINUHEQ+7VJ1vmPS/jFHD4no8Y8=; b=KONclLsBiuUXtLzbpcgcqQSaSbzp4GauVFlwmqkWD42FY89TK0XDpWzg3BJJOXqOmT /4lilP6D8/NhIGl1uOg0au2X1Z1Ak0q+QwW7nXc8Z+R9Vx36OweCBIsV+vY8QpjOhFcC iWCnGMyj7uqO9CHjjBwZCvHnBGTbRtoNof2XBINGifnsOFpCLA2+arwKP78lWLQEJU7k oZfei5aJklu33mU+Eb2/6MBnWBa9jYta31NACa6nu2P3W5bQxtBniGST7Y7lgQbswgKO 4dtAmzjVEMY3ODYsZW4ZlZGwfaVXkY5eAg5eJewhAaaz70DGKfPzDq95b3d4v47zZw6c n7Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v4H0Pb1D; 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 z12si9766258pfc.99.2019.07.24.22.58.39; Wed, 24 Jul 2019 22:58:53 -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=v4H0Pb1D; 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 S2390884AbfGYFmc (ORCPT + 99 others); Thu, 25 Jul 2019 01:42:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:57428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390867AbfGYFma (ORCPT ); Thu, 25 Jul 2019 01:42:30 -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 E27BA21880; Thu, 25 Jul 2019 05:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033349; bh=njcevMEyVf4qON5xIzjBhRXVYstq/87hRiG0n5sGX8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v4H0Pb1DoQtLp86WCdSEay4qR1dzzGMaU5LkOAH4R4FvWEbaXetceFXxZqw+WANql jNxZkP8jKwmlDgTnHtypp0+CtY1419NMfp3h2fEWsnY3moct6ruVZyVS7vgqhiqVxP sz/YoZ2HJtrXlvSvtLGh7ZZf+GwrPY/lDBOCQrQc= 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 4.19 178/271] crypto: crypto4xx - fix blocksize for cfb and ofb Date: Wed, 24 Jul 2019 21:20:47 +0200 Message-Id: <20190724191710.398534455@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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 @@ -1226,7 +1226,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, }, @@ -1245,7 +1245,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, },