Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3317899yba; Sat, 18 May 2019 14:29:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyxcA7XhInmp4ugO9pjm6VrhFRYyATZfZpb6VzZzI60tgRkS1a+tHAgKvYDPBt0xTb500J X-Received: by 2002:a17:902:21:: with SMTP id 30mr49970863pla.302.1558214941996; Sat, 18 May 2019 14:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558214941; cv=none; d=google.com; s=arc-20160816; b=LCvMVQB1dA4YrM0W/MtCZf7iqE2L9eSIKxs2h9eTArPE3wbMzn9PxLli4PD9akSCqw nN/0166uCAUte8fxrs9qUKGiWOdMi3prPoCrlL/gE8EJJwf1vv/MHx21PWq308nWs+oD PMVGBaBaxf6/++P5Go332yW82WdFBm1CLeplGlaUky+JpjM4dRBgA4VszRFX4sKaAphw wp9mWwWpCerS+3MS0BkynOBWImTVEAqlMD+R6ktRbhzYhH6oqwVt5dxarF1paKD3aIi5 HhkFABqlfOWA++elWCwfm6UIXhT+CmOrn/bQU2E7tEB86HB+vFMqHx4ul00Qzq7fZK9T 4c8Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=LR0/tiq4ddUgfYUX6hacaYLf6IMLrXRZI5ELFE1jzoc=; b=dg9usz7g0FRtyNwe3RGx+r4h9cC1bAzDTgfJvNhR38Iwh57HQoMGGyvxTkrLg1vA82 EyNKN7Mo2in1NrIA+Pmx2kcuxBzOry25/dHj5FXJwjfv71uc4ZmF1wS7gV9ewHNR37/D 43rwbc0693TUM3LCljaUQa1ZKsMGhFoOwchJHa7aKgzoio8VqHXKmg7zsyMDBOfKPEKZ JoKNjBNakJp86RA2AMfRB+6UQQYTtFEnTLP+ipWt7jovfWxk3sGlxKT6+zPBt9InBZse zezEZyM8uF0HzeDFoGv0PXDRzC3R6gpCWRXceS3oENTaHHXB3vG9LY3sGJ1xkrlfdM+o r3ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jqwsd98C; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si13216300pld.236.2019.05.18.14.28.29; Sat, 18 May 2019 14:29:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@gmail.com header.s=20161025 header.b=jqwsd98C; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729603AbfERV2P (ORCPT + 99 others); Sat, 18 May 2019 17:28:15 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37727 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728283AbfERV2P (ORCPT ); Sat, 18 May 2019 17:28:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id e15so10524964wrs.4 for ; Sat, 18 May 2019 14:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LR0/tiq4ddUgfYUX6hacaYLf6IMLrXRZI5ELFE1jzoc=; b=jqwsd98C4kebn39BeYA4RMN0gAgI0zfIg9aRelBXGFvjrqrRMrDdLZCeMFvYIxVSeg vX6/hCOSw/j9L6iZgmWi5xAumJb7ZCIN7TTAF6kIMy1n7yZMDVO0gbpEa8q77x/pcyRr UUsTvVpEzx77giFv3d/S4bLJUrxbIuo+TZpLzvSTs9ZiTWoQ79tJTqEl70FYg3li0hbk fBJo76vgins+RC5SlgAA9U2z8Z2Uz18qCRbXT7ZCiVdcdRLjfU++fTziHDPlzHvoBuBr NQWhK9EgYJwtfDLjbiGxNaXjwDmDZKPMozdbyHZD+EtiEVYQDfl+8vXtB5EG6pgBgWGq 46VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LR0/tiq4ddUgfYUX6hacaYLf6IMLrXRZI5ELFE1jzoc=; b=R7CFyVEGv6D4fbCp58FDWHLeOHobN4wic2HrLwYIf6J8FYEfrviuhiyj69psyb3KgX yqegvbv1PZ+OpZCDLvCeSx0T3PGovEhH77aTReryjsFQt95pCls2rwVLjMR3iYN4rUzu 8sQFBzkKHfR9/g78YTdCiGRQ+NnWALh0AwjIV7YwGviJrafEBeQqD5ElpBc3Hx+bx1Ch gv7jzWqvERz5mOMRfq8z9EN1hEtoE1Vwlr3Ub8YKsoIiRe4xA3qYckuaG8hKzGDJa3ge DflGx2qR/fiMblGd15dD9F04L8ezYQhlB3r7pfNRpN3apAWlsy5BSR2raUgverOpOEe4 DeDA== X-Gm-Message-State: APjAAAU2zMKqmo8gJJaK4LKV9tsq6GAZhs6iCe/4rLj664L39sPT63ac QyA77rKv2njNKhWMkzLAO/CU/61F X-Received: by 2002:a5d:54cc:: with SMTP id x12mr3109675wrv.303.1558214893559; Sat, 18 May 2019 14:28:13 -0700 (PDT) Received: from debian64.daheim (p4FD0962E.dip0.t-ipconnect.de. [79.208.150.46]) by smtp.gmail.com with ESMTPSA id y18sm13304227wmd.29.2019.05.18.14.28.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 May 2019 14:28:12 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.92) (envelope-from ) id 1hS6sG-0005a8-14; Sat, 18 May 2019 23:28:12 +0200 From: Christian Lamparter To: linux-crypto@vger.kernel.org Cc: Eric Biggers , Herbert Xu Subject: [PATCH 1/2] crypto: crypto4xx - fix blocksize for cfb and ofb Date: Sat, 18 May 2019 23:28:11 +0200 Message-Id: <20190518212812.21414-1-chunkeey@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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 --- drivers/crypto/amcc/crypto4xx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 0322ae8ac466..5f2709cffc5b 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1231,7 +1231,7 @@ static struct crypto4xx_alg_common crypto4xx_alg[] = { .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, }, @@ -1311,7 +1311,7 @@ static struct crypto4xx_alg_common crypto4xx_alg[] = { .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, }, -- 2.20.1